Skip to content

Commit 95fc296

Browse files
committed
Merge branch 'develop' into DOC-527-IG
2 parents 2c521a9 + f0206f2 commit 95fc296

File tree

3 files changed

+59
-34
lines changed

3 files changed

+59
-34
lines changed

src/connections/spec/common.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,10 @@ Other libraries only collect `context.library`, any other context variables must
276276
| screen.height | |||
277277
| screen.width | |||
278278
| traits | |||
279-
| userAgent || ||
279+
| userAgent || ||
280280
| timezone | |||
281281

282-
- IP Address is not collected by Segment's libraries, but instead filled in by Segmen'ts servers when it receives a message for **client side events only**.
282+
- IP Address isn't collected by Segment's libraries, but is instead filled in by Segment's servers when it receives a message for **client side events only**.
283283
- The Android library collects `screen.density` with [this method](/docs/connections/spec/common/#context-fields-automatically-collected).
284284

285285
## Integrations

src/engage/profiles/user-subscriptions/set-user-subscriptions.md

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,25 +47,37 @@ For example, a user might reach out to you after accidentally unsubscribing to y
4747
4848
-->
4949

50-
## Managing user subscriptions with Segment APIs
50+
## Manage user subscriptions with Segment APIs
5151

52-
Use Segments APIs to manage user subscriptions programmatically on an ongoing, real-time basis. You can choose between a [standard `track` call](/docs/connections/spec/track/), for non-critical subscription updates, or the [Public API](https://api.segmentapis.com/docs/){:target="_blank"}, for critical updates that require immediate confirmation, like unsubscribes.
52+
With Segment's APIs, you can manage user subscriptions programmatically on a real-time basis. Use the APIs for ongoing subscription status updates, like when users subscribe to your marketing campaigns on a website form or modify their subscription from within a notification center.
5353

54-
Managing subscriptions with Segment's APIs allows you to handle continuous updates of subscription statuses, like when users subscribe to your marketing campaigns on a website form or modify their subscription from within a notification center.
54+
### The Track call compared to the Public API Identify call
5555

56-
### Receive subscription confirmation with the Public API
56+
To update Engage user subscriptions with Segment's APIs, first choose between a [standard Track call](/docs/connections/spec/track/), for non-critical subscription updates, or the [Public API Identify call](https://api.segmentapis.com/docs/){:target="_blank"}, for critical updates that require immediate confirmation, like unsubscribes.
5757

58-
To receive an API response that confirms Segment has both received and processed subscription status requests, use Segment's [Public API](https://api.segmentapis.com/docs/spaces/#replace-messaging-subscriptions-in-spaces){:target="_blank"}.
58+
When you use the Track call, Segment replies with a standard HTTP `200 OK` status response code if it successfully received the request. Because the Track call updates user traits asynchronously, though, the `200 OK` code indicates that Segment has received, but not yet processed, the request. As a result, use the Track call for non-critical subscription updates, like form signups on your website or adding a subscription from within the user's notification center.
5959

60-
For example, if a user updates their subscription state in your notification center:
60+
When you make Identify calls to Segment's Public API, however, you'll get an immediate response that confirms that Segment both received and processed the request. Use the Public API, then, for unsubscribes, so users immediately find out if their subscription updated.
6161

62-
1. Use the [Public API](https://api.segmentapis.com/docs/spaces/#replace-messaging-subscriptions-in-spaces){:target="_blank"} synchronous call to update their subscription state.
63-
2. The API returns an immediate success or failure response.
64-
3. For successful requests, Segment instantly updates subscription states in your workspace. `Subscribed` email and phone numbers will receive messages from Engage campaigns that they are a part of.
65-
4. You can then display successful updates or error messages with users in your notification center.
62+
### Format the Identify call payload
6663

67-
## The `track` call versus using the Public API
64+
For Segment to process the subscription status request, your Identify call payload must include at least one object with a subscription contact vector, the subscription type, and the subscription status.
6865

69-
When you use the `track` call, Segment replies with a standard HTTP `200 OK` status response code if it successfully received the request. Because the `track` call updates user traits asynchronously, though, the `200 OK` code indicates that Segment has received, but not yet processed, the request. As a result, use the `track` call for non-critical subscription updates, like form signups on your website or adding a subscription from within the user's notification center.
66+
The following array contains example objects that update both SMS and email subscription statuses:
7067

71-
When you make calls to Segment's Public API, however, you'll get an immediate response that confirms that Segment both received and processed the request. Use the Public API, then, for user unsubscribes. If a user unsubscribes from your marketing campaigns within their notification center, they'll know immediately whether or not their request was processed.
68+
```json
69+
"messaging_subscriptions": [
70+
{
71+
"key": "(123) 555-5555",
72+
"type": "SMS",
73+
"status": “SUBSCRIBED” | “UNSUBSCRIBED”| “DID_NOT_SUBSCRIBE”
74+
},
75+
{
76+
77+
"type": "EMAIL",
78+
"status": “SUBSCRIBED” | “UNSUBSCRIBED”| “DID_NOT_SUBSCRIBE”
79+
}
80+
]
81+
```
82+
83+
For successful requests, Segment instantly updates subscription states in your workspace. You can then display successful updates or error messages with users in your notification center.

src/personas/computed-traits.md

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Account-level examples:
3434
- Total Logins by Account 30 Days
3535
- Emails Opened by Account 90 Days
3636

37-
![](images/1525835194991.png)
37+
![An event counter trait run over the course of a week](images/1525835194991.png)
3838

3939
### Aggregation
4040

@@ -48,27 +48,27 @@ Account-level use cases
4848
- Total Minutes Watched 30 Days
4949
- Avg Order Size Last 180 Days
5050

51-
![](images/1525835663131.png)
51+
![An aggregation trait run over the course of 90 days](images/1525835663131.png)
5252

5353
### Most Frequent
5454

55-
A most frequent user-level computed trait will return the **most common value** for an **event property**. This is helpful to create traits like `preferred_product_viewed` or `most_commonly_viewed_category` that tell you what a user's preferred product, or content category might be. Note that the most frequent computed trait requires the event property to have been tracked at least twice. In the case of a tie, we return the first alphabetical value. For account-level computed traits, you can also return the most frequent **user trait**. This is helpful when you want to determine which user has performed an event the most frequently. For example, you might to return the email of the user in an account most actively viewing your app.
55+
A most frequent user-level computed trait will return the **most common value** for an **event property**. This is helpful to create traits like `preferred_product_viewed` or `most_commonly_viewed_category` that tell you what a user's preferred product, or content category might be. Note that the most frequent computed trait requires the event property to have been tracked at least twice. In the case of a tie, Segment returns the first alphabetical value. For account-level computed traits, you can also return the most frequent **user trait**. This is helpful when you want to determine which user has performed an event the most frequently. For example, you might to return the email of the user in an account most actively viewing your app.
5656

5757
User-level examples:
5858
- Favorite Blog Post
5959
- Top Purchase Category
6060

61-
![](images/1525836239527.png)
61+
![A most frequent product-viewed trait](images/1525836239527.png)
6262

6363
Account-level examples:
6464
- Most frequent product viewed
6565
- Most active user
6666

67-
![](images/1542073415630.png)
67+
![A most frequent order-completed trait](images/1542073415630.png)
6868

6969
### First
7070

71-
The first user-level trait returns the first event property value we have seen. This is common for creating traits like `first_page_visited` based on the page name. For accounts, the first computed trait could also return a trait like `first_user_signup`, to calculate the first user to use your product.
71+
The first user-level trait returns the first event property value Segment has seen. This is common for creating traits like `first_page_visited` based on the page name. For accounts, the first computed trait could also return a trait like `first_user_signup`, to calculate the first user to use your product.
7272

7373
User-level examples:
7474
- First seen timestamp
@@ -78,23 +78,23 @@ Account-level examples:
7878
- First email opened
7979
- First user signup
8080

81-
![](images/1525836568474.png)
81+
![The first event-seen trait builder](images/1525836568474.png)
8282

8383
### Last
8484

85-
The last trait returns the last event property value we have seen. This is common for creating traits like `last_utm_campaign` to help you calculate last-touch attribution for paid advertising.
85+
The last trait returns the last event property value Segment has seen. This is common for creating traits like `last_utm_campaign` to help you calculate last-touch attribution for paid advertising.
8686

8787
User-level examples:
8888
- Last seen at
8989
- Last utm parameter
9090

91-
![](images/1525836818177.png)
91+
![The last event-seen trait builder](images/1525836818177.png)
9292

9393
Account-level examples:
9494
- Last unsubscribe timestamp
9595
- Last user active
9696

97-
![](images/1542073887657.png)
97+
![An account-level last page-viewed trait](images/1542073887657.png)
9898

9999
### Unique List
100100

@@ -105,7 +105,7 @@ Example use cases:
105105
- Unique categories
106106
- Unique games played
107107

108-
![](images/1525837083070.png)
108+
![The unique list trait builder](images/1525837083070.png)
109109

110110

111111
### Unique List Count
@@ -116,13 +116,13 @@ User-level examples:
116116
- Unique products viewed count
117117
- Unique categories count
118118

119-
![](images/1525837374378.png)
119+
![The unique list count builder](images/1525837374378.png)
120120

121121
Account-level examples:
122122
- Unique products viewed
123123
- Unique visitors count
124124

125-
![](images/1542074153487.png)
125+
![An account-level unique list trait](images/1542074153487.png)
126126

127127
## Conditions
128128

@@ -148,13 +148,26 @@ The following operators are available.
148148

149149
Personas sends user-level computed Traits to destinations using the [Identify call](/docs/connections/spec/identify/) for user traits, or using the [Track call](/docs/connections/spec/track/) for event properties. Segment includes the trait value and property in the identify and track calls.
150150

151-
For example, the name of a computed trait is added to the user profile as a trait, and the trait's value is set to the value of the computed trait. Segment sends an identify or track call when the trait is computed, depending on the destination configuration. If a computed trait counts the number of times a user visits your pricing page, and the user visits your pricing page five times, Segment sends an identify call with the property `pricing_page_visits: 5`.
151+
For example, the name of a computed trait is added to the user profile as a trait, and the trait's value is set to the value of the computed trait. Segment sends an identify or track call when the trait is computed, depending on the destination configuration. If a computed trait counts the number of times a user visits your pricing page, and the user visits your pricing page five times, Segment sends an identify call with the property `pricing_page_visits: 5`.
152152

153153
Learn more about [Computed trait generated events here](/docs/personas/using-personas-data/#computed-trait-generated-events). The trait name corresponds to the snake cased name that you see in the trait settings, for example `most_viewed_page_category`. See the [list of Personas-compatible destinations](/docs/personas/using-personas-data/#compatible-personas-destinations)
154154

155-
![](images/1525837601768.png)
155+
![Editing a computed trait's settings](images/1525837601768.png)
156156

157-
For account-level computed traits, you have the option to send either a [group](/docs/connections/spec/group/) call and/or [identify](/docs/connections/spec/identify/) call. Group calls will send one event per account, whereas identify calls will send an identify call for each user in the account. This means that even if a user hasn't performed an event, we will still set the account-level computed trait on that user. Because most marketing tools are still based at the user level, it is often important to map this account-level trait onto each user within an account. See [Account-level Audiences](/docs/personas/audiences/account-audiences) for more information.
157+
For account-level computed traits, you have the option to send either a [group](/docs/connections/spec/group/) call and/or [identify](/docs/connections/spec/identify/) call. Group calls will send one event per account, whereas identify calls will send an identify call for each user in the account. This means that even if a user hasn't performed an event, Segment will still set the account-level computed trait on that user. Because most marketing tools are still based at the user level, it is often important to map this account-level trait onto each user within an account. See [Account-level Audiences](/docs/personas/audiences/account-audiences) for more information.
158+
159+
## Editing Realtime Traits
160+
161+
Personas supports the editing of realtime Traits, which allows you to make nuanced changes to existing Traits in situations where cloning or building from scratch may not suit your use case.
162+
163+
To edit a realtime Trait, follow these steps:
164+
165+
1. In your Personas Space, select the **Computed Traits** tab.
166+
2. Select the realtime Trait you want to edit.
167+
3. Select the **Builder** tab and make your edits.
168+
4. Select **Save Computed Trait** to confirm your edits.
169+
170+
Personas then processes your Trait edits. While the edit task runs, the trait remains locked and you can't make further changes. Once Personas has finished incorporating your changes, you'll be able to access your updated Trait.
158171

159172

160173
## Accessing your Computed Traits using the Profiles API
@@ -182,17 +195,17 @@ returns:
182195

183196
You can read the [full Profile API docs](/docs/personas/profile-api/) to learn more.
184197

185-
## Downloading your Computed Trait as a CSV
198+
## Downloading your Computed Trait as a CSV file
186199

187200
You can download a copy of your trait by visiting the the computed trait overview page.
188-
![](images/trait_overview.png)
201+
![Downloading a CSV file of computed traits in the Segment](images/trait_overview.png)
189202
Computed Trait CSVs are generated on demand. Before you can download the CSV, you will need to generate it. There are three different options for formatting:
190203
- **Unformatted:** Contains three columns. The first contains the user or account key, the second contains the trait value and the third is a JSON object containing the external IDs. Generating this CSV is by far the fastest of the three options. [Download example unformatted CSV](files/trait_csv_format_a.csv)
191204
- **Distinct columns for unique external IDs (with indexed columns for ID types with multiple values):** Contains the same first three columns as the unformatted CSV. Additional columns are added for each distinct external ID type. When a single row has more than one value for a given external ID type, for example a user with three email addresses, _additional columns with indexed headers are added_, (`email`, `email_1`, `email_2`). [Download example formatted CSV with indexed columns](files/trait_csv_format_b.csv)
192205
- **Distinct columns for unique external IDs (with additional rows for ID types with multiple values):** Contains the same first three columns as the unformatted CSV. Additional columns are added for each distinct external ID type. When a single row has more than one value for a given external ID type, for example a user with two email addresses, _additional rows are added with the first three columns repeated (user or account key, trait value and external IDs JSON)._ [Download example formatted CSV with additional rows](files/trait_csv_format_c.csv)
193206
<table>
194207
<tr>
195-
<td>![](images/large_trait_csv.png)</td>
208+
<td>![Handling large CSV file downloads](images/large_trait_csv.png)</td>
196209
<td width="45%">Generating a CSV can take a substantial amount of time for large traits (around 30 seconds for a formatted CSV with 1 million rows). For CSVs that are expected to take over 20 seconds, the Segment app displays an estimated generation time. After clicking Generate, it is recommended that you leave the modal and page open while the CSV is created.
197210
(If the trait recalculates between when you click Generate and when you download the file, you might want to regenerate the file. The CSV is a snapshot from when you clicked Generate, and could be outdated.)</td>
198211
</tr>

0 commit comments

Comments
 (0)