Skip to content

Commit 68bda53

Browse files
committed
resolve intercom-kotlin edits
1 parent 6fa2e55 commit 68bda53

File tree

3 files changed

+31
-34
lines changed

3 files changed

+31
-34
lines changed

src/connections/sources/catalog/libraries/mobile/apple/destination-plugins/adobe-swift.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Open your Package.swift file and add the following to the `dependencies` section
5454

5555
## Using the Plugin in your App
5656

57-
Open the file where you setup and configure the Analytics-Swift library. Add this plugin to the list of imports.
57+
Open the file where you set up and configured the Analytics-Swift library. Add this plugin to the list of imports.
5858

5959
```
6060
import Segment

src/connections/sources/catalog/libraries/mobile/apple/destination-plugins/intercom-swift.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Open your Package.swift file and add the following to the `dependencies` section
4848

4949
## Using the plugin in your app
5050

51-
Open the file where you setup and configure the Analytics-Swift library. Add this plugin to the list of imports.
51+
Open the file where you set up and configured the Analytics-Swift library. Add this plugin to the list of imports.
5252

5353
```
5454
import Segment
@@ -151,7 +151,7 @@ analytics.track(name: "Product Purchased", properties: OrderCompletedProperties(
151151
When you make a Track call from any of the server-side libraries or mobile sources in cloud-mode (for example, without the beta Segment mobile Intercom SDK installed), you must include either the `userId` or `email` of a user already recorded in Intercom.
152152

153153

154-
### Revenue and currency
154+
### Revenue and currency properties
155155
If you send `properties.revenue` and `properties.currency` to Intercom, Segment formats those properties according to [Intercom's Monetary Amount](https://developers.intercom.com/intercom-api-reference/reference/submit-a-data-event#metadata-object){:target="_blank"} and sends them to Segment as:
156156

157157
```js
@@ -216,7 +216,7 @@ When you call Group from any of any server-side libraries or mobile sources in c
216216
> Intercom supports NSString, NSNumber or NSNull type values on iOS.
217217
218218
## Reset
219-
When `reset` is called The bundled mobile SDK `reset` method un-registers a user in Intercom. When users want to log out of your app and you call Segment's `reset` method, Segment calls:
219+
The bundled mobile SDK `reset` method un-registers a user in Intercom. When users want to log out of your app and you call Segment's `reset` method, Segment calls:
220220

221221
```swift
222222
Intercom.logout()

src/connections/sources/catalog/libraries/mobile/kotlin-android/destination-plugins/intercom-kotlin-android.md

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,19 @@
22
title: Analytics Kotlin Intercom Plugin
33
id: 54521fd725e721e32a72eec6
44
---
5-
[Intercom](https://www.intercom.com/){:target="_blank"} makes customer messaging apps for sales, marketing, and support, connected on one platform. The Intercom Destination Plugin is open-source.You can browse the Kotlin code for [Android](https://github.com/segment-integrations/analytics-kotlin-intercom/tree/main){:target="_blank"} on GitHub.
5+
[Intercom](https://www.intercom.com/){:target="_blank"} makes customer messaging apps for sales, marketing, and support, connected on one platform. The Intercom Destination Plugin is open-source. You can browse the Kotlin code for [Android](https://github.com/segment-integrations/analytics-kotlin-intercom/tree/main){:target="_blank"} on GitHub.
66

77
## Getting Started
88

99
1. From the Segment Destinations page click **Add Destination**.
1010
2. Search for "Intercom" and select it in the results that appear.
11-
3. Choose which Source to connect Intercom to.
11+
3. Select a source to connect to your Intercom destination.
1212
4. Authorize your Intercom account in Segment and select the Intercom Account to sync with Segment.
13-
5. [Find your "App ID" in the Intercom UI](https://docs.intercom.com/faqs-and-troubleshooting/getting-set-up/where-can-i-find-my-app-id){:target="_blank"} or by navigating to the Gear Menu and clicking on "App Settings" followed by "API Keys". It should look something like `9iefb489`.
14-
15-
This means you should remove Intercom's snippet from your page.
13+
5. [Find your "App ID" in the Intercom UI](https://docs.intercom.com/faqs-and-troubleshooting/getting-set-up/where-can-i-find-my-app-id){:target="_blank"} or by navigating to the Gear Menu and selecting App Settings > API Keys. It should look something like `9iefb489`.
1614

1715
## Adding the dependency
1816

19-
To install the Segment-Intercom integration, simply add this line to your gradle file:
17+
To install the Segment-Intercom integration, add this line to your gradle file:
2018

2119
```
2220
implementation com.segment.analytics.kotlin.destinations:intercom:<latest_version>
@@ -29,9 +27,9 @@ implementation(com.segment.analytics.kotlin.destinations:intercom:<latest_versio
2927
```
3028

3129

32-
## Using the Plugin in your App
30+
## Using the plugin in your app
3331

34-
Open the file where you setup and configure the Analytics-Kotlin library. Add this plugin to the list of imports.
32+
Open the file where you set up and configured the Analytics-Kotlin library. Add this plugin to the list of imports.
3533

3634
```
3735
import com.segment.analytics.kotlin.destinations.intercom.IntercomDestination
@@ -47,11 +45,11 @@ Just under your Analytics-Kotlin library setup, call `analytics.add(plugin = ...
4745
analytics.add(plugin = IntercomDestination(applicationContext))
4846
```
4947

50-
Your events will now begin to flow to Intercom in Device mode.
48+
Your events will now begin to flow to Intercom in device-mode.
5149

5250
## Identify
5351

54-
If you're not familiar with the Segment Specs, take a look to understand what the [Identify method](/docs/connections/spec/identify/) does. An example call would look like:
52+
If you're not familiar with the Segment Spec, take a look to understand what the [Identify method](/docs/connections/spec/identify/) does. An example call would look like:
5553

5654
```java
5755
analytics.identify("user-123", buildJsonObject {
@@ -65,20 +63,18 @@ analytics.identify("user-123", buildJsonObject {
6563
});
6664
```
6765

68-
When you call Identify, Segment creates or updates the user in Intercom using their [Users API](https://developers.intercom.com/reference#users){:target="_blank"}. Segment does not currently support creation of leads.
66+
When you call Identify, Segment creates or updates the user in Intercom using their [Contacts API](https://developers.intercom.com/docs/references/rest-api/api.intercom.io/Contacts/contact/){:target="_blank"}. Segment does not currently support creating [leads](https://developers.intercom.com/docs/references/rest-api/api.intercom.io/Contacts/MergeContact)
6967

7068
> info ""
71-
> Intercom associates Track events with known users. An Identify call with a `userId` is required before Track events are associated properly. Segment's bundled mobile SDKs also require that `identify` be called prior to `track`, but accepts setting an unknown user in Intercom using the `anonymousId`.
72-
73-
Keep reading for more information about the Identify call depending on the source type you send it from.
69+
> Intercom associates Track events with known users. An Identify call with a `userId` is required before Track events are associated properly. Segment's bundled mobile SDKs also require that Identify be called prior to Track, but accepts setting an unknown user in Intercom using the `anonymousId`.
7470
75-
- Passing `traits.company` creates a new Intercom Company if the `company_id` does not match a known company. See the [Intercom contact model documentation](https://developers.intercom.com/intercom-api-reference/reference/the-contact-model){:target="_blank"} for more details.
71+
- Passing `traits.company` creates a new Intercom Company if the `company_id` does not match an existing `company_id`. See the [Intercom contact model documentation](https://developers.intercom.com/intercom-api-reference/reference/the-contact-model){:target="_blank"} for more details.
7672
- Trait values must be no longer than 255 characters
7773

7874

7975
Intercom supports both logged-in or logged-out users. You must register your users with Intercom before you can talk to them or see what they do in your app. This means that Identify must be called before Track.
8076

81-
Intercom allows users to choose to track only known or only unknown users, as well as both. Segment supports the ability to track both by checking for logged in users (determined by the `userId`) and falling back to setting the user as "Unidentified" when this is not present.
77+
Intercom allows you to track only known or only unknown users, or all users regardless of identification status. Segment supports the ability to track all users regardless of identification status by checking for logged in users (determined by the `userId`) and falling back to setting the user as "Unidentified" when this is not present.
8278

8379
Intercom knows when your app is backgrounded and comes alive again, so you won't need to re-register your users.
8480

@@ -97,7 +93,7 @@ Segment maps the following Intercom standard attributes on Identify.
9793
| remaining `traits` | `customAttributes` | Custom attributes for this user. |
9894

9995
> info ""
100-
> Intercom supports values of type String, Long, Float, Double, Boolean, Character, Byte, Short or Integer on Android. Pass Android traits using camel case to conform with Java convention.
96+
> Intercom supports String, Long, Float, Double, Boolean, Character, Byte, Short or Integer type values on Android. Pass Android traits using camel case to conform with Java convention.
10197
10298
#### Collect Context
10399

@@ -107,7 +103,7 @@ The fields collected from the [context object](/docs/connections/spec/common/) a
107103

108104
## Track
109105

110-
If you're not familiar with the Segment Specs, take a look to understand what the [Track method](/docs/connections/spec/track/) does. An example call would look like:
106+
If you're not familiar with the Segment Spec, take a look to understand what the [Track method](/docs/connections/spec/track/) does. An example call would look like:
111107

112108
```java
113109
analytics.track("View Product", buildJsonObject {
@@ -120,8 +116,9 @@ analytics.track("View Product", buildJsonObject {
120116
> Because Intercom only associates Track events with known users, an Identify call with a `userId` is required before Track events are associated properly.
121117
122118

123-
### Revenue and currency
124-
If you send `properties.revenue` and `properties.currency`, Segment formats that according to [Intercom's Monetary Amount](https://developers.intercom.com/intercom-api-reference/reference/submit-a-data-event#metadata-object){:target="_blank"} and send it as:
119+
### Revenue and currency properties
120+
If you send `properties.revenue` and `properties.currency` to Intercom, Segment formats those properties according to [Intercom's Monetary Amount](https://developers.intercom.com/intercom-api-reference/reference/submit-a-data-event#metadata-object){:target="_blank"} and sends them to Segment as:
121+
125122

126123
```js
127124
price: {
@@ -130,20 +127,20 @@ price: {
130127
}
131128
```
132129

133-
The bundled mobile integrations also check `properties.total` if `properties.revenue` is not present, and assign the total value as the amount value.
130+
If `properties.revenue` is not present, the bundled mobile integrations check `properties.total` and assign the total value as the `properties.revenue` or amount value.
134131

135132
### Limited Properties
136-
Intercom can only store [five event properties](http://docs.intercom.io/Intercom-for-user-analysis/Tracking-User-Events-in-Intercom#metadata-support){:target="_blank"} per event. That means if you send an event to Segment with more than five properties, Intercom only shows the first five properties.
133+
Intercom can only store [5 event properties](http://docs.intercom.io/Intercom-for-user-analysis/Tracking-User-Events-in-Intercom#metadata-support){:target="_blank"} per event. If you send an event to Segment with more than 5 properties, Intercom only shows the first 5 properties.
137134

138135
### Limited Events
139136

140-
Intercom only allows a total of 120 unique _active_ event names. If you're sending Segment more than 120 unique event names, Intercom only accepts the first 120 events that their servers see, and the rest throw an error.
137+
In Intercom, an "Active" event is an event that hasn't been archived. Intercom only allows a total of 120 unique _active_ event names. If you're sending Segment more than 120 unique event names, Intercom only accepts the first 120 events that their servers encounter. Any additional unique event names will result in an error.
141138

142-
In Intercom, an "Active" event is an event that hasn't been archived. If you archive an event, it makes it inactive and removes it from your 120 active events. If you need to bring your account back under the 120 event limit, archive some events from in the Intercom UI by navigating to **Settings > (workspace name) data > Events**, then click on the event to archive.
139+
If you need to bring your account back under the 120 event limit, archive some events from in the Intercom UI by navigating to **Settings > (workspace name) data > Events**, then click on the event to archive.
143140

144141
## Group
145142

146-
If you're not familiar with the Segment Specs, take a look to understand what the [Group method](/docs/connections/spec/group/) does. An example call would look like:
143+
If you're not familiar with the Segment Spec, take a look to understand what the [Group method](/docs/connections/spec/group/) does. An example call would look like:
147144

148145
```java
149146
analytics.group("user-123", buildJsonObject {
@@ -158,7 +155,7 @@ Segment supports Intercom companies in all sources. Users can be put into multip
158155
When you call Group from any of any server-side libraries or mobile sources in cloud-mode (without Segment's mobile Intercom SDK installed), you must include either the `userId` or `email` of an existing user in Intercom.
159156

160157
> info ""
161-
> In order for the Company Sessions Count to update within Intercom, the company must first be recorded in an `identify` call.
158+
> In order for the Company Sessions Count to update within Intercom, the company must first be recorded in an Identify call.
162159
163160

164161
| Segment Parameter | Intercom Parameter | Description |
@@ -173,10 +170,10 @@ When you call Group from any of any server-side libraries or mobile sources in c
173170

174171

175172
> info ""
176-
> Intercom supports values of type `String`, `Long`, `Float`, `Double`, `Boolean`, `Character`, `Byte`, `Short` or `Integer` on Android. Pass Android traits using camel case to conform with Java convention.
173+
> Intercom supports `String`, `Long`, `Float`, `Double`, `Boolean`, `Character`, `Byte`, `Short` or `Integer` type values on Android. Pass Android traits using camel case to conform with Java convention.
177174
178175
## Reset
179-
When `reset` is called The bundled mobile SDK `reset` method un-registers a user in Intercom. When users want to log out of your app and you call Segment's `reset` method, Segment calls:
176+
The bundled mobile SDK `reset` method un-registers a user in Intercom. When users want to log out of your app and you call Segment's `reset` method, Segment calls:
180177

181178
```java
182179
intercom.logout()
@@ -186,6 +183,6 @@ When `reset` is called The bundled mobile SDK `reset` method un-registers a user
186183

187184
### Arrays and Objects
188185

189-
Intercom doesn't support custom arrays or objects. This means that if you want to send a certain user `trait` or event `property` to Intercom, you must send them at the top level.
186+
Intercom doesn't support custom arrays or objects. If you want to send a certain user `trait` or event `property` to Intercom, you must send them at the top level instead of in an array or object.
190187

191-
This limitation does not apply, however, for mapping `company` objects on [Identify calls](/docs/connections/spec/identify/). Segment continues to handle that in the same way as before. This is only applicable for any custom traits or properties.
188+
This limitation does not apply if you are mapping custom traits or properties to `company` objects on [Identify calls](/docs/connections/spec/identify/).

0 commit comments

Comments
 (0)