Skip to content

Commit aa4b5ed

Browse files
authored
Merge pull request #6748 from segmentio/doc-923-braze
Braze Linked Audiences Docs
2 parents a172a74 + 0f1f76a commit aa4b5ed

6 files changed

+197
-0
lines changed

Diff for: src/engage/audiences/linked-audiences-braze.md

+197
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
---
2+
title: Using Linked Audiences with Braze
3+
plan: engage-foundations
4+
beta: true
5+
hidden: true
6+
---
7+
8+
9+
Linked Audiences allows you [dynamically personalize email messages](https://www.braze.com/docs/user_guide/personalization_and_dynamic_content/liquid){:target="_blank"} in Braze using the predefined traits of any Linked Audience profile and the attributes of any entities used to match the profile into the audience.
10+
11+
The following topic is intended for a Technical Marketer and Data Engineer to complete together while setting up their Linked Audience.
12+
13+
## Supported Braze Engagement Tools
14+
15+
The following engagement tools are available for use with Linked Audiences in Segment:
16+
17+
| Type | Description |
18+
| ------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------- |
19+
| [Action-based Campaigns](https://www.braze.com/docs/user_guide/engagement_tools/campaigns/building_campaigns/delivery_types/triggered_delivery/){:target="_blank"} | Trigger and dynamically personalize campaigns with rich entity context. |
20+
21+
## Segment Destination Actions
22+
23+
Segment sends data from your Linked Audiences to actions-based destinations. For example, you could send account information for the audience profiles with past due accounts to an email platform.
24+
25+
You can configure multiple triggers per audience (For example: one for account entry, and one for account exit).
26+
27+
28+
| Segment Destination Action | How does it work? | How does Braze store the data? | Braze API Endpoint |
29+
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
30+
| [Track Event](/docs/connections/destinations/catalog/braze-cloud-mode-actions/#track-event) | Segment sends personalization payload information into Braze as [Braze Profile custom events](https://www.braze.com/docs/user_guide/data_and_analytics/custom_data/custom_events/){:target="_blank"}. The entity personalization payload is contained in the `events` parameter within API calls. Segment appends Profile Traits as objects (or event properties) and Entity Context as nested objects. | [Event objects](https://www.braze.com/docs/api/objects_filters/event_object/){:target="_blank"} or [Nested objects in custom events](https://www.braze.com/docs/user_guide/data_and_analytics/custom_data/custom_events/nested_objects/){:target="_blank"} | [track API endpoint](https://documenter.getpostman.com/view/4689407/SVYrsdsG?version=latest#4cf57ea9-9b37-4e99-a02e-4373c9a4ee59){:target="_blank"} |
31+
| [Update User Profile](https://segment.com/docs/connections/destinations/catalog/braze-cloud-mode-actions/#update-user-profile){:target="_blank"} | Segment sends personalization payload information into Braze as [Braze profile custom attributes](https://www.braze.com/docs/user_guide/data_and_analytics/custom_data/custom_attributes/){:target="_blank"}. The entity personalization payload is contained in the `attributes` parameter in API calls. | [User attributes object](https://www.braze.com/docs/api/objects_filters/user_attributes_object){:target="_blank"} or [Nested Custom Attributes](https://www.braze.com/docs/user_guide/data_and_analytics/custom_data/custom_attributes/nested_custom_attribute_support/){:target="_blank"} | [track API endpoint](https://documenter.getpostman.com/view/4689407/SVYrsdsG?version=latest#4cf57ea9-9b37-4e99-a02e-4373c9a4ee59){:target="_blank"} |
32+
33+
## Braze Action-based Delivery Campaign
34+
35+
Braze's [Action-Based Delivery campaigns](https://www.braze.com/docs/user_guide/engagement_tools/campaigns/building_campaigns/delivery_types/triggered_delivery/){:target="_blank"} store the entity personalization payload as [nested objects in custom events](https://www.braze.com/docs/user_guide/data_and_analytics/custom_data/custom_events/nested_objects/){:target="_blank"}.
36+
37+
### Prerequisites
38+
39+
Complete the following setup steps before you configure an action based delivery campaign in Braze.
40+
41+
In Segment, ensure you have:
42+
43+
- Set up your [Linked Audience](/docs/engage/audiences/linked-audiences/).
44+
- A copy of your Linked Audience [Event Personalization Payload](/docs/engage/audiences/linked-audiences#showhide-preview), event name, and Braze user id.
45+
- Set up [Braze as an actions destination](/docs/connections/destinations/catalog/braze-cloud-mode-actions/).
46+
- Set up a [Track Event destination action](/docs/connections/destinations/catalog/braze-cloud-mode-actions/#track-event) and the relevant trigger using the [Linked Audiences](/docs/engage/audiences/linked-audiences/) workflow.
47+
48+
In Braze, ensure you have:
49+
50+
- Permissions to access the application, or access to someone with permissions.
51+
- Created all Segment profiles as Braze profiles using the [Update User Profile destination action](/docs/connections/destinations/catalog/braze-cloud-mode-actions/#update-user-profile) through [Connections](/docs/connections/) or [Reverse ETL](/docs/connections/reverse-etl/). This is a [requirement for the profiles to receive an action-based campaign](https://www.braze.com/docs/user_guide/engagement_tools/testing/race_conditions/#targeting-new-users){:target="_blank"}.
52+
- Created a Braze profile that has an email address you can access. You'll use this profile for campaign testing in a later step.
53+
- Familiarity with the [Liquid templating syntax](https://www.braze.com/docs/user_guide/personalization_and_dynamic_content/liquid){:target="_blank"}.
54+
55+
### Step 1: Set up a Braze action-based Delivery Campaign
56+
57+
To use Linked Audiences you must set up an action-based delivery campaign in Braze.
58+
59+
In Braze, do the following:
60+
61+
1. Create a new [email Campaign](https://www.braze.com/docs/user_guide/message_building_by_channel/email){:target="_blank"}.
62+
2. [Create an email using the HTML Editor](https://www.braze.com/docs/user_guide/message_building_by_channel/email/html_editor/creating_an_email_campaign/){:target="_blank"} and [personalize it using Liquid tags](https://www.braze.com/docs/user_guide/personalization_and_dynamic_content/liquid){:target="_blank"}.
63+
1. Reference your [personalization payload schema](/docs/engage/audiences/linked-audiences/#showhide-preview) from Segment to determine what properties to include in your message.
64+
2. Translate the Segment event properties in the payload schema into Liquid syntax for [custom events](https://www.braze.com/docs/user_guide/data_and_analytics/custom_data/custom_events){:target="_blank"}, and enter it in the Braze HTML editor. See the following personalization [examples](#liquid-examples-to-use-in-braze) for more details on how you can personalize your campaign.
65+
3. Next, [schedule your campaign delivery](https://www.braze.com/docs/user_guide/engagement_tools/campaigns/building_campaigns/delivery_types){:target="_blank"}:
66+
1. Select [Action-based delivery](https://www.braze.com/docs/user_guide/engagement_tools/campaigns/building_campaigns/delivery_types/triggered_delivery/#step-1-select-a-trigger-event){:target="_blank"} > [**New Trigger Action**](https://www.braze.com/docs/user_guide/engagement_tools/campaigns/building_campaigns/delivery_types/triggered_delivery/#step-1-select-a-trigger-event){:target="_blank"}: [**Perform Custom Event**](https://www.braze.com/docs/user_guide/data_and_analytics/custom_data/custom_events){:target="_blank"} > **Add Trigger**.
67+
2. Search for and select the name of the Segment custom event you previously set up and tested in Segment.
68+
3. Select **Delivery Controls** > [**Allow users to become re-eligible to receive campaigns**](https://www.braze.com/docs/user_guide/engagement_tools/campaigns/building_campaigns/delivery_types/reeligibility/#campaigns){:target="_blank"} checkbox, and select 0 minutes. This is necessary for [Step 2: Test your campaign flow](#step-2-test-your-campaign-flow) so that you don’t have to wait for a user to become re-eligible while testing. You can adjust these settings after you have finished testing.
69+
4. Select your target Audience:
70+
1. Add a filter to [target users without a segment](https://www.braze.com/docs/user_guide/engagement_tools/campaigns/building_campaigns/targeting_users/#without-segment){:target="_blank"}.
71+
2. Search for and select the name of the Segment custom event you previously set up and tested in Segment.
72+
3. Select **More than 0 times** as the timeframe for this filter.
73+
5. Update any additional settings that apply to your campaign, then [review and deploy](https://www.braze.com/docs/user_guide/message_building_by_channel/email/html_editor/creating_an_email_campaign/#step-5-review-and-deploy){:target="_blank"} your campaign and continue to [Step 2: Test your campaign flow](#step-2-test-your-campaign-flow).
74+
75+
### Step 2: Test your campaign flow
76+
77+
1. Open the Segment app and send yourself a test email for review. Add your Braze user id and click **[Send test event to destination](/docs/engage/audiences/linked-audiences/#step-3-send-a-test-event-to-your-destination)**. Review the email you received, and ensure it is formatted properly.
78+
79+
![A screenshot of the test event page](/docs/engage/images/send-test-event.png)
80+
81+
2. If the event is sent successfully to Braze, you will see a `“message”: “success”` response in Segment.
82+
3. Open Braze and check your [campaign dashboard](https://www.braze.com/docs/user_guide/message_building_by_channel/email/reporting_and_analytics/email_reporting){:target="_blank"} (Braze > *[Your Unique Campaign]* > Analytics) to confirm that Braze sent the message. It can take up to 15 minutes for Braze to send the email.
83+
4. If your email doesn’t look the way you want it to, adjust the [Liquid syntax](https://www.braze.com/docs/user_guide/personalization_and_dynamic_content/liquid/using_liquid/#using-liquid-1){:target="_blank"} in Braze and send another test event in Segment. See the following [personalization examples](#liquid-examples-to-use-in-braze) for more specific details.
84+
5. When you’re finished testing your campaign, proceed to [Enable your Linked Audience](/docs/engage/audiences/linked-audiences/#step-4-enable-your-linked-audience).
85+
86+
## Liquid examples to use in Braze
87+
88+
Use the following examples as context and information to experiment with setting up your campaign in Braze.
89+
90+
The following is an example of what your payload data might look like with nested payload properties:
91+
92+
93+
```js
94+
{
95+
"event": "abandoned_carts_linked_audience",
96+
"properties": {
97+
"first_name": "Andrew",
98+
"last_name": "Shopper",
99+
"shopping_cart__id": "123",
100+
"shopping_cart__products": [
101+
{
102+
"id": "324",
103+
"product_name": "Premium Tennis Shoes",
104+
"product_price": "$140",
105+
"__entity": "product"
106+
},
107+
{
108+
"id": "489",
109+
"product_name": "Premium Jacket",
110+
"product_price": "$200",
111+
"__entity": "product"
112+
}
113+
],
114+
"__entity": "cart"
115+
}
116+
}
117+
```
118+
119+
The following helps translate your payload data into Liquid syntax:
120+
121+
- To reference a specific event property:
122+
- Use the following liquid syntax: <code>{% raw %}{{event_properties.event_property_name}}{% endraw %}</code>
123+
- An example of this property might look like: <code>{% raw %}{{event_properties.first_name}}{% endraw %}</code>
124+
- To reference nested event properties within an Array:
125+
- Use the following liquid syntax: <code>{% raw %}{{event_property_name.[#_that_represents_specific_entry_in_array].nested_event_property_name }}{% endraw %}</code>
126+
- An example of this property might look like: <code>{% raw %}{{event_properties.shopping_cart__products[0].product_name}}{% endraw %}<code>
127+
128+
### Basic email example
129+
130+
Use the Segment payload data you [copied when setting up your Linked audience](/docs/engage/audiences/linked-audiences#showhide-preview) to build an abandoned cart email campaign that includes specific information for the product in a customer’s shopping cart.
131+
132+
When an email is sent, it lists the specific product and its related price in your customer’s shopping cart. It might look like the following screenshot:
133+
134+
![A screenshot of an email, with the name, item, and price personalized.](/docs/engage/images/braze-cart-simple.png)
135+
136+
This is an example of what your email formatted using [HTML](https://www.braze.com/docs/user_guide/message_building_by_channel/email/html_editor/creating_an_email_campaign/){:target="_blank"} and [Liquid](https://www.braze.com/docs/user_guide/personalization_and_dynamic_content/liquid){:target="_blank"} might look like in Braze:
137+
138+
{% raw %}
139+
140+
```html
141+
Hi {{event_properties.first_name}},
142+
<br />
143+
<br />
144+
Did you forget to checkout?<br />
145+
<br />
146+
We noticed you added some items to your shopping cart including this item: <br />
147+
<br />
148+
<b>Product Name: </b>
149+
{{event_properties.shopping_cart__products[0].product_name}}
150+
<br />
151+
<b>Product Price: </b>
152+
{{event_properties.shopping_cart__products[0].product_price}} USD
153+
<br />
154+
<br />
155+
156+
Quick, now is your chance to own this item before it sells out!
157+
```
158+
159+
{% endraw %}
160+
161+
162+
### Advanced email example
163+
164+
Use the Segment payload data you [copied when setting up your Linked audience](/docs/engage/audiences/linked-audiences#showhide-preview) to build an abandoned cart email campaign where you can use an [iteration tag](https://www.braze.com/docs/user_guide/personalization_and_dynamic_content/liquid/supported_personalization_tags/#iteration-tags){:target="_blank"} to run a block of code repeatedly. In this example, you can use a for loop to list all of the products and their related prices in a customer’s shopping cart.
165+
166+
When an email is sent, it lists all of the products and their related prices in your customer’s shopping cart. It might look like the following:
167+
168+
![A screenshot of an abandoned cart email, with a personalized name, two items, and prices for those items.](/docs/engage/images/braze-cart-advanced.png)
169+
170+
This is an example of what your email formatted using [HTML](https://www.braze.com/docs/user_guide/message_building_by_channel/email/html_editor/creating_an_email_campaign/){:target="_blank"} and [Liquid](https://www.braze.com/docs/user_guide/personalization_and_dynamic_content/liquid){:target="_blank"} might look like in Braze:
171+
172+
{% raw %}
173+
174+
```html
175+
Hi {{event_properties.first_name}},
176+
<br />
177+
<br />
178+
Did you forget to checkout?<br />
179+
<br />
180+
We noticed you added some items to your shopping cart. Here's what you left: <br />
181+
<br />
182+
183+
{% for products in event_properties.shopping_cart__products %}
184+
<b>Product Name: </b>
185+
{{products.product_name}}
186+
<br />
187+
<b>Product Price: </b>
188+
{{products.product_price}} USD
189+
<br />
190+
<br />
191+
192+
{%endfor%}
193+
194+
Quick, now is your chance to own these items before they sell out!
195+
```
196+
197+
{% endraw %}

Diff for: src/engage/images/braze-cart-advanced.png

57.8 KB
Loading

Diff for: src/engage/images/braze-cart-simple.png

56.3 KB
Loading

Diff for: src/engage/images/braze_advanced_email.png

94.7 KB
Loading

Diff for: src/engage/images/braze_basic_email.png

87.8 KB
Loading

Diff for: src/engage/images/send-test-event.png

41.7 KB
Loading

0 commit comments

Comments
 (0)