Skip to content

Commit 935ba35

Browse files
author
Borys Bielinskyi
committed
Make corrections to Airship destination based on provided feedback
1 parent e37d71f commit 935ba35

File tree

1 file changed

+100
-14
lines changed
  • src/connections/destinations/catalog/airship

1 file changed

+100
-14
lines changed

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

Lines changed: 100 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Airship Destination
55

66
Airship gives brands the data, channels, orchestration and services they need to deliver push notifications, emails, SMS, in-app messages, and more to the right person at the right moment — building trust, boosting engagement, driving action, and growing value.
77

8-
[Airship Cloud-mode Destination integration](https://docs.airship.com/partners/segment/#destination) enables users to set Airship Tags and Custom Events through Segment's `identify`, `track`, and `group` API calls.
8+
[Airship Cloud-mode Destination integration](https://docs.airship.com/partners/segment/#destination) enables users to set Airship tags, attributes, and custom events through Segment's `identify`, `track`, and `group` API calls.
99

1010
Segment `track` API calls are received by Airship as Custom Events. The traits of the Segments `identify` API call are interpreted as either `tags` or `attributes`. Tags are all traits that contains a boolean value (either `true` or `false`). A trait which contains a non-boolean value -- and is known to Airship -- becomes an attribute.
1111

@@ -35,7 +35,7 @@ Follow these steps to configure the integration
3535
5. For `attributes`, first [predefine them in Airship](https://docs.airship.com/guides/messaging/user-guide/audience/segmentation/attributes/#add-attributes).
3636

3737
## Requirements
38-
To use the Segment Destination integration, you must implement `Named Users` in Airship. The Segment UserID must match the Named User ID in Airship. If your `named_user_id` and `UserID` do not match, Airship will not be able to associate `identify` or `track` events to the proper user in Airship. You will not be able to issue automated messages or to attach user attributes from Segment within Airship.
38+
To use the Segment Destination integration, you must implement `Named Users` in Airship. The Segment UserID must match the Named User ID in Airship. If your `named_user_id` and `UserID` do not match, Airship will not be able to associate `identify`, `track`, or `group` events to the proper user in Airship. You will not be able to issue automated messages or to attach user attributes from Segment within Airship.
3939

4040
See [Tags and Named Users](https://docs.airship.com/guides/audience/tags-named-users/) or the [Named Users API](https://docs.airship.com/api/ua/#tag/named-users) for more information about configuring named users.
4141

@@ -81,8 +81,6 @@ analytics.track('Product Clicked', {
8181

8282
The `track` API calls are sent to Airship as `track` events. As soon as a `track` event is received, Airship will create a custom event. The properties of the the `track` event are automatically added as properties on the custom event. If `revenue` is present for the `track` event, then it is set as the value of the custom event.
8383

84-
Note that a custom event will not be created for a `track` event which has more than 20 properties.
85-
8684
**Segment Track Events to Airship Custom Events**
8785
Airship custom events are used to trigger automated messages for Mobile App, Web Notifications, Email, and SMS messages.
8886

@@ -94,21 +92,109 @@ Custom events and tags sent from Segment are automatically populated within Airs
9492

9593
## Group
9694

97-
For more information about the [group API call](https://segment.com/docs/connections/spec/group/) review the Segment spec. An example call would look like:
95+
For more information about the [group API call](https://segment.com/docs/connections/spec/group/) review the Segment spec.
96+
97+
When you call `group`, the integration sets either Airship tags or attributes for
98+
corresponding Segment traits. A *named user* must exist in Airship for the corresonding
99+
value of `userID` in Segment.
100+
101+
**UserID in Segment group API call**
98102

99103
```
100-
analytics.group('1234', {
101-
name: 'Initech',
102-
industry: 'Technology',
103-
employees: 329,
104-
plan: 'enterprise',
105-
totalBilled: 830
106-
});
104+
{
105+
...
106+
"userId": "test-user-69w86c"
107+
...
108+
}
109+
```
110+
111+
**Named user in the correspnding Airship payload***
112+
```
113+
{
114+
"audience": {
115+
"named_user_id": "test_user-69w86c"
116+
},
117+
...
118+
}
119+
```
120+
121+
Airship tags are set for those Segment traits that contain a boolean value (either `true`
122+
or `false`). All tags from `group` API calls are added to the `segment-integration-group` tag
123+
group.
124+
125+
**A Segment group call containing boolean traits**
126+
107127
```
128+
...
129+
"traits:" {
130+
"hiring": true,
131+
"has-remote-employees": false,
132+
...
133+
}
134+
...
135+
```
136+
137+
**Setting the corresponding Airship tags**
138+
139+
```
140+
...
141+
"add": {
142+
"segment-integration-group": ["hiring"]
143+
},
144+
"remove": {
145+
"segment_integration-group": ["has-remote-employees"]
146+
}
147+
...
148+
```
149+
150+
For Segment traits that contain values of other types, such as numeric or text, Airship sets custom attributes. The integration maps the Segment group trait `name` to the Airship predefined attribute `company`. All other traits are prefixed with `airship_segment_group_`. Names of nested traits also include their parent traits delimited by underscore (_).
108151

109-
When you call `group`, Segment sends a custom attribute to Airship with the name `airship_segment_group_<groupId>`, where `<groupId>` is the group's ID passed as one of its parameters. For example, if the group's ID is `1234` then the custom attribute name is `airship_segment_group_1234`. The value of the custom attribute is `true`.
152+
**A Segment group call containing non-boolean traits**
110153

111-
To take advantage of `group` features as tags, set up a tag group called `segment-integration-group` in Airship. A *named user* must exist for the `userID`.
154+
```
155+
...
156+
"traits": {
157+
"name": "Initech",
158+
"industry": "Technology",
159+
"employees": 329,
160+
"address": {
161+
"city": "Portland",
162+
...
163+
}
164+
}
165+
...
166+
```
167+
168+
**Setting the corresponding Airship attributes**
169+
```
170+
...
171+
"attributes": [
172+
{
173+
"action": "set",
174+
"key": "company",
175+
"value": "Initech",
176+
...
177+
},
178+
{
179+
"action": "set",
180+
"key": "airship_segment_group_industry",
181+
"value": "Technology",
182+
...
183+
},
184+
{
185+
"action": "set",
186+
"key": "airship_segment_group_employees",
187+
"value": 329,
188+
...
189+
},
190+
{
191+
"action": "set",
192+
"key": "airship_segment_group_address_city",
193+
"value": "Portland",
194+
...
195+
}
196+
...
197+
```
112198

113199
# Leveraging this data in Airship
114200

0 commit comments

Comments
 (0)