Skip to content

Commit bbf4c47

Browse files
committed
Adds documentation about Group calls and relationship properties to the Userlist documentation
1 parent 072b16f commit bbf4c47

File tree

1 file changed

+83
-21
lines changed
  • src/connections/destinations/catalog/userlist

1 file changed

+83
-21
lines changed

src/connections/destinations/catalog/userlist/index.md

Lines changed: 83 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,114 @@
22
rewrite: true
33
title: Userlist Destination
44
---
5+
56
[Userlist](https://userlist.com/?utm_source=segmentio&utm_medium=docs&utm_campaign=partners) allows you to send behavior-based messages to your SaaS users. It's great for onboarding users as well as nurturing them throughout their journey.
67

78
This destination is maintained by Userlist. For any issues with the destination, [contact the Userlist Support team](mailto:[email protected]).
89

910
{% include content/beta-note.md %}
1011

11-
1212
## Getting Started
1313

1414
{% include content/connection-modes.md %}
1515

16-
1. From the Segment web app, click **Catalog**.
17-
2. Search for "Userlist" in the Catalog, select it, and choose which of your sources to connect the destination to.
18-
3. Enter the "Push API Key" into your Segment Settings UI which you can find from your [Userlist Push API settings](https://app.userlist.com/settings/push).
16+
1. From the Segment web app, click **Catalog**.
17+
2. Search for "Userlist" in the Catalog, select it, and choose which of your sources to connect the destination to.
18+
3. Enter the "Push API Key" into your Segment Settings UI which you can find from your [Userlist Push API settings](https://app.userlist.com/settings/push).
1919

20-
_**NOTE:** The Userlist Destination does not support tracking of anonymous users, so make sure to call `identify` before calling `track`. If you do call `track` on unidentified users, you will receive a 400 error which you can disregard if it was intentional._
20+
_**NOTE:** The Userlist Destination does not support tracking of anonymous users, so make sure to call `identify` before calling `track` or `group`. If you do call `track` or `group` on unidentified users, you will receive a 400 error which you can disregard if it was intentional._
2121

2222
## Identify
2323

2424
If you're not familiar with the Segment Specs, take a look to understand what the [Identify method](https://segment.com/docs/connections/spec/identify/) does. An example call would look like:
2525

26-
analytics.identify('userId123', {
27-
28-
name: 'John Doe',
29-
role: 'Owner',
30-
createdAt: '2019-03-21T12:12:54.735+01:00'
31-
});
26+
```javascript
27+
analytics.identify('userId123', {
28+
29+
name: 'John Doe',
30+
role: 'Owner',
31+
createdAt: '2019-03-21T12:12:54.735+01:00'
32+
});
33+
```
3234

3335
Identify calls will be sent to Userlist as user records. If the `userId` is already known, it'll update the user record, otherwise it'll create a new one.
3436

3537
Here's how Segment fields map to Userlist users:
3638

37-
| Segment field | Userlist field | Description
38-
|-------------|---------------|-----------
39-
| `userId` | `identifier` | The unique identifier for this user. |
40-
| `traits` | `properties` | Additional properties describing the user. |
41-
| `traits.email` | `email` | The user's email address. |
42-
| `traits.createdAt` | `signed_up_at` | The time when the user was created. |
43-
39+
| Segment field | Userlist field | Description |
40+
| ------------------ | -------------- | ------------------------------------------ |
41+
| `userId` | `identifier` | The unique identifier for this user. |
42+
| `traits` | `properties` | Additional properties describing the user. |
43+
| `traits.email` | `email` | The user's email address. |
44+
| `traits.createdAt` | `signed_up_at` | The time when the user was created. |
4445

4546
## Track
4647

4748
If you're not familiar with the Segment Specs, take a look to understand what the [Track method](https://segment.com/docs/connections/spec/track/) does. An example call would look like:
4849

49-
analytics.track('Project created', {
50-
projectName: 'Party Planning'
51-
});
50+
```javascript
51+
analytics.track('Project created', {
52+
projectName: 'Party Planning'
53+
});
54+
```
5255

5356
Track calls will be sent to Userlist as a new event. You may send additional properties to describe the event in more detail. Both the event name and additional properties will be stored with the event and normalized to snake case (`project_created` and `project_name`) automatically within Userlist.
57+
58+
To associate an event with both a user and a company, please include the company's identifier as `context.groupId` on the Track call:
59+
60+
```javascript
61+
analytics.track(
62+
'Project created',
63+
{
64+
projectName: 'Party Planning'
65+
},
66+
{
67+
context: {
68+
groupId: 'companyId123'
69+
}
70+
}
71+
);
72+
```
73+
74+
## Group
75+
76+
If you're not familiar with the Segment Specs, take a look to understand what the [Group method](https://segment.com/docs/connections/spec/group/) does. An example call would look like:
77+
78+
```javascript
79+
analytics.group('companyId123', {
80+
name: 'Segment'
81+
});
82+
```
83+
84+
| Segment field | Userlist field | Description |
85+
| ------------------ | -------------- | ------------------------------------------ |
86+
| `groupId` | `identifier` | The unique identifier for this company. |
87+
| `traits` | `properties` | Additional properties describing the user. |
88+
| `traits.name` | `name` | The company's name. |
89+
| `traits.createdAt` | `signed_up_at` | The time when the user was created. |
90+
91+
Group calls will be sent to Userlist as company records. If the `groupId` is already known, it'll update the company record, otherwise it'll create a new one.
92+
93+
Userlist supports custom properties to describe the relationship between users and groups (such as the user's role in a company). You can pass relationship properties in a Group call by using Userlist specific extensions.
94+
95+
```javascript
96+
analytics.group(
97+
'companyId123',
98+
{
99+
name: 'Segment'
100+
},
101+
{
102+
integrations: {
103+
Userlist: {
104+
extensions: {
105+
relationship: {
106+
properties: {
107+
role: 'owner'
108+
}
109+
}
110+
}
111+
}
112+
}
113+
}
114+
);
115+
```

0 commit comments

Comments
 (0)