You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
152
152
153
153
154
-
### Revenue and currency
154
+
### Revenue and currency properties
155
155
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:
156
156
157
157
```js
@@ -216,7 +216,7 @@ When you call Group from any of any server-side libraries or mobile sources in c
216
216
> Intercom supports NSString, NSNumber or NSNull type values on iOS.
217
217
218
218
## 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:
Copy file name to clipboardExpand all lines: src/connections/sources/catalog/libraries/mobile/kotlin-android/destination-plugins/intercom-kotlin-android.md
+27-30Lines changed: 27 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,21 +2,19 @@
2
2
title: Analytics Kotlin Intercom Plugin
3
3
id: 54521fd725e721e32a72eec6
4
4
---
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.
6
6
7
7
## Getting Started
8
8
9
9
1. From the Segment Destinations page click **Add Destination**.
10
10
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.
12
12
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`.
16
14
17
15
## Adding the dependency
18
16
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:
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.
51
49
52
50
## Identify
53
51
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:
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)
69
67
70
68
> 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`.
74
70
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.
76
72
- Trait values must be no longer than 255 characters
77
73
78
74
79
75
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.
80
76
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.
82
78
83
79
Intercom knows when your app is backgrounded and comes alive again, so you won't need to re-register your users.
84
80
@@ -97,7 +93,7 @@ Segment maps the following Intercom standard attributes on Identify.
97
93
| remaining `traits`|`customAttributes`| Custom attributes for this user. |
98
94
99
95
> 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.
101
97
102
98
#### Collect Context
103
99
@@ -107,7 +103,7 @@ The fields collected from the [context object](/docs/connections/spec/common/) a
107
103
108
104
## Track
109
105
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:
> Because Intercom only associates Track events with known users, an Identify call with a `userId` is required before Track events are associated properly.
121
117
122
118
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
+
125
122
126
123
```js
127
124
price: {
@@ -130,20 +127,20 @@ price: {
130
127
}
131
128
```
132
129
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.
134
131
135
132
### 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.
137
134
138
135
### Limited Events
139
136
140
-
Intercomonly 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.
141
138
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.
143
140
144
141
## Group
145
142
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:
147
144
148
145
```java
149
146
analytics.group("user-123", buildJsonObject {
@@ -158,7 +155,7 @@ Segment supports Intercom companies in all sources. Users can be put into multip
158
155
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.
159
156
160
157
> 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.
@@ -173,10 +170,10 @@ When you call Group from any of any server-side libraries or mobile sources in c
173
170
174
171
175
172
> 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.
177
174
178
175
## 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:
180
177
181
178
```java
182
179
intercom.logout()
@@ -186,6 +183,6 @@ When `reset` is called The bundled mobile SDK `reset` method un-registers a user
186
183
187
184
### Arrays and Objects
188
185
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.
190
187
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