After you have successfully instrumented Braze as a destination in RudderStack, follow this guide to correctly send your events to Braze in cloud mode.
Find the open source transformer code for this destination in the GitHub repository.
Identify
You can use the identify call to identify a user in Braze in any of the below cases:
When the user registers to the app for the first time.
Braze gives first preference to the externalId field in the identify event to identify the user. If externalId is absent, it falls back to the userId field.
Make sure to send the identify event containing the externalId before sending any subsequent track events so that RudderStack is able to persist the externalId information successfully.
You can explicitly set a custom user ID in the externalId field of your identify event. Note that if externalId is absent, RudderStack automatically sets the userId as the externalId field before sending the event to Braze.
The following code snippet shows how to add an externalId to your identify event using the JavaScript SDK, before sending it to the Braze destination:
You can send the user traits to Braze as nested custom attributes and perform add, update, and remove operations on them. To do so, turn on the Use Custom Attributes Operation dashboard setting while setting up the Braze destination.
You can send the user traits as nested custom attributes in your identify events in the following format:
To deep merge the updated custom attributes with the existing attributes, set mergeObjectsUpdateOperation to true within the event’s properties object, as seen above.
You can also set the user traits as custom user attributes in the track, page, or screen events by pass traits as a contextual field in the event, as shown:
Note that once you send a group event, RudderStack sends a custom attribute to Braze with the name as ab_rudder_group_<groupId> and the value as true.
For example, if the groupId is 12345, then RudderStack creates a custom attribute with the name ab_rudder_group_12345 and sends it to Braze with its value to true.
When you send the above event, RudderStack removes the user with previousUserId from Braze and merges all the associated fields with the user having newUserId.
Delta management for identify and track calls
You can save costs by deduplicating the data sent to Braze via identify and track calls. To do so, enable the Deduplicate Traits dashboard setting. RudderStack then sends only the changed or modified attributes (traits) to Braze.
RudderStack recommends reviewing Braze’s data points policy to fully understand how this functionality can help you avoid data overages.
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.