Braze Destination
UpdatedAbout this integration
Braze is a platform that helps you send messages across multiple platforms to engage customers and foster loyalty. The source data that you send to Braze adds and updates users. You can take advantage of user data and the source events sent to braze to trigger and personalize messages.
What mode should I use?
Our Braze destination supports cloud and direct modes. In general, we recommend that you use the cloud mode destination so that you capture data in Customer.io and can easily debug your implementation, capture a history of events, and so on.
But there are very few functional differences between these destinations besides the sources they support. Both modes support the same actions.
Getting started: cloud mode
Go to the Data Pipelines tab and click Connections.
Click Add New under Destinations.
Select the Braze destination.
(Optional) Select the sources that you want to connect to this destination. You can always connect sources to your destination later. We’ll only show you eligible sources.
Configure your destination.
Api Key: Created under Developer Console in the Braze Dashboard.
App Id: The app identifier used to reference specific Apps in requests made to the Braze API. Created under Developer Console in the Braze Dashboard.
Endpoint: Your Braze REST endpoint. See more details
Click Enable Destination.
Identifiers in Braze
Braze calls require an external_id
or a braze_id
. We map userId
from source events to Braze’s external_id
. The braze_id
is essentially Braze’s anonymous ID.
So, if you haven’t identified a user by userId
, we use the braze_id
—which is just Braze’s anonymous Identifier. Otherwise, when you’ve identified someone, we’ll use the external_id
.
Cloud mode actions
When you’re done setting up your destination, you can go to the Actions tab to see how we map source events to your destination.
Update User Profile
Default Trigger: type = “identify”
Update a user’s profile attributes in Braze
- _update_existing_only booleanSetting this flag to true will put the API in “Update Only” mode. When using a “user_alias”, “Update Only” mode is always true.
- braze_id string
Default:
The unique user identifier$.properties.braze_id
- country string
Default:
The country code of the user$.context.location.country
-
- latitude number
Default:
The current users’s latitude.$.context.location.latitude
- longitude number
Default:
The user’s longitude.$.context.location.longitude
-
- Custom Attributes* any typeKey-value pairs you want to set on this person.
- date_of_first_session string (date-time)The date the user first used the app
- date_of_last_session string (date-time)The date the user last used the app
- dob string (date-time)The user’s date of birth
- email string
Default:
The user’s email$.traits.email
- email_click_tracking_disabled booleanSet to true to disable the click tracking for all links within a future email, sent to this user.
- email_open_tracking_disabled booleanSet to true to disable the open tracking pixel from being added to all future emails sent to this user.
- email_subscribe stringThe user’s email subscription preference: “opted_in” (explicitly registered to receive email messages), “unsubscribed” (explicitly opted out of email messages), and “subscribed” (neither opted in nor out).
- external_id string
Default:
The unique user identifier$.userId
-
- id stringA person’s facebook ID/name.
- likes array of [ strings ]This person’s likes as stated in their bio.
- num_friends integerThe number of Facebook friends the user has.
- first_name string
Default:
The user’s first name$.traits.firstName
- gender stringThe user’s gender: “M”, “F”, “O” (other), “N” (not applicable), “P” (prefer not to say) or nil (unknown).
Accepted values:
M
,F
,O
,N
,P
- home_city string
Default:
The user’s home city.$.traits.address.city
- image_url string
Default:
URL of image to be associated with user profile.$.traits.avatar
- language stringThe user’s preferred language.
- last_name string
Default:
The user’s last name$.traits.lastName
- marked_email_as_spam_at string (date-time)The date the user marked their email as spam.
- phone string
Default:
The user’s phone number$.traits.phone
- push_subscribe stringThe user’s push subscription preference: “opted_in” (explicitly registered to receive push messages), “unsubscribed” (explicitly opted out of push messages), and “subscribed” (neither opted in nor out).
-
- app_id stringThe ID of the application the token belongs to.
- device_id stringIf you don’t provide this field, one will be randomly generated for you.
- token stringThe device token for this device/app combination.
- time_zone stringThe user’s time zone name from the IANA Time Zone Database (e.g., “America/New_York” or “Eastern Time (US & Canada)”). Only sets valid time zone values.
-
- followers_count integerThe number of followers.
- friends_count integerThe number of friends/people the account follows.
- id integerThe twitter ID.
- screen_name stringThe user’s Twitter handle.
- statuses_count integerThe number of posts/statuses.
Track Event
Default Trigger: type = “track” and event != “Order Completed”
Record custom events in Braze
- _update_existing_only booleanSetting this flag to true will put the API in “Update Only” mode. When using a “user_alias”, “Update Only” mode is always true.
- braze_id string
Default:
The unique user identifier$.properties.braze_id
- enable_batching booleanIf true, Segment will batch events before sending to Braze’s user track endpoint. Braze accepts batches of up to 75 events.
- external_id string
Default:
The unique user identifier$.userId
- name string
Default:
The event name$.event
-
- Event Properties* any typeAdditional key-value pairs you want to send along with the event.
- time string (date-time)
Default:
When the event occurred.$.receivedAt
Track Purchase
Default Trigger: event = “Order Completed”
Record purchases in Braze
- _update_existing_only booleanSetting this flag to true will put the API in “Update Only” mode. When using a “user_alias”, “Update Only” mode is always true.
- braze_id string
Default:
The unique user identifier$.properties.braze_id
- external_id string
Default:
The unique user identifier$.userId
- products array of [ objects ]Any array of objects, where each object represents a product in the purchase
- Product Properties* any typeProperties about the purchase, like the price, name, quantity, etc.
-
- Event Properties* any typeAdditional key-value pairs you want to send along with the event.
- time string (date-time)
Default:
When the event occurred.$.receivedAt
Create Alias
Default Trigger: event = “Create Alias”
Create new user aliases for existing identified users, or to create new unidentified users.
- alias_label stringA label indicating the type of alias
- alias_name stringThe alias identifier
- external_id stringThe external ID of the user to create an alias for.
Identify User
Identifies an unidentified (alias-only) user. Use alongside the Create Alias action, or with user aliases you have already defined.
- external_id stringThe external ID of the user to identify.
Getting started: direct mode
Go to the Data Pipelines tab and click Connections.
Click Add New under Destinations.
Select the Braze destination.
(Optional) Select the sources that you want to connect to this destination. You can always connect sources to your destination later. We’ll only show you eligible sources.
Configure your destination. See Configuration Settings below for information about individual configuration parameters.
Click Enable Destination.
Direct mode settings
Setting | Default | Description |
---|---|---|
Sdk Version | 4.6 | The version of the Braze SDK to use |
Api Key | Found in the Braze Dashboard under Manage Settings → Apps → Web | |
Endpoint | sdk.iad-01.braze.com | Your Braze SDK endpoint. See more details |
Allow Crawler Activity | Allow Braze to log activity from crawlers. See more details | |
Allow User Supplied Javascript | To indicate that you trust the Braze dashboard users to write non-malicious Javascript click actions, set this property to true. If enableHtmlInAppMessages is true, this option will also be set to true. See more details | |
Defer Until Identified | If enabled, this setting delays initialization of the Braze SDK until the user has been identified. When enabled, events for anonymous users will no longer be sent to Braze. | |
App Version | Version to which user events sent to Braze will be associated with. See more details | |
Content Security Nonce | Allows Braze to add the nonce to any <script> and <style> elements created by the SDK. See more details | |
Device Property Allowlist | By default, the Braze SDK automatically detects and collects all device properties in DeviceProperties. To override this behavior, provide an array of DeviceProperties. See more details | |
Disable Push Token Maintenance | By default, users who have already granted web push permission will sync their push token with the Braze backend automatically on new session to ensure deliverability. To disable this behavior, set this option to true | |
Do Not Load Font Awesome | Braze automatically loads FontAwesome 4.7.0 from the FontAwesome CDN. To disable this behavior set this option to true. | |
Enable Logging | Set to true to enable logging by default | |
Enable Sdk Authentication | Set to true to enable the SDK Authentication feature. | |
In App Message Z Index | By default, the Braze SDK will show In-App Messages with a z-index of 1040 for the screen overlay, 1050 for the actual in-app message, and 1060 for the message's close button. Provide a value for this option to override these default z-indexes. | |
Localization | en | By default, any SDK-generated user-visible messages will be displayed in the user's browser language. Provide a value for this option to override that behavior and force a specific language. The value for this option should be a ISO 639-1 Language Code. |
Automatically Display Messages | true | When this is enabled, all In-App Messages that a user is eligible for are automatically delivered to the user. If you'd like to register your own display subscribers or send soft push notifications to your users, make sure to disable this option. |
Manage Service Worker Externally | If you have your own service worker that you register and control the lifecycle of, set this option to true and the Braze SDK will not register or unregister a service worker. See more details | |
Minimum Interval Between Trigger Actions in Seconds | 30 | Provide a value to override the default interval between trigger actions with a value of your own. See more details |
No Cookies | By default, the Braze SDK will store small amounts of data (user ids, session ids), in cookies. Pass true for this option to disable cookie storage and rely entirely on HTML 5 localStorage to identify users and sessions. See more details | |
Open Cards in New Tab | By default, links from Card objects load in the current tab or window. Set this option to true to make links from cards open in a new tab or window. | |
Open in App Messages in New Tab | By default, links from in-app message clicks load in the current tab or a new tab as specified in the dashboard on a message-by-message basis. Set this option to true to force all links from in-app message clicks open in a new tab or window. | |
Require Explicit in App Message Dismissal | By default, when an in-app message is showing, pressing the escape button or a click on the greyed-out background of the page will dismiss the message. Set this option to true to prevent this behavior and require an explicit button click to dismiss messages. | |
Safari Website Push Id | If you support Safari push, you must specify this option with the website push ID that you provided to Apple when creating your Safari push certificate (starts with "web", e.g. "web.com.example.domain"). | |
Service Worker Location | By default, when registering users for web push notifications Braze will look for the required service worker file in the root directory of your web server at /service-worker.js. If you want to host your service worker at a different path on that server, provide a value for this option that is the absolute path to the file, e.g. /mycustompath/my-worker.js. VERY IMPORTANT: setting a value here limits the scope of push notifications on your site. For instance, in the above example, because the service ,worker file is located within the /mycustompath/ directory, appboy.registerAppboyPushMessages MAY ONLY BE CALLED from web pages that start with http://yoursite.com/mycustompath/. | |
Session Timeout in Seconds | 1800 | By default, sessions time out after 30 minutes of inactivity. Provide a value for this configuration option to override that default with a value of your own. |
Direct mode actions
When you’re done setting up your destination, you can go to the Actions tab to see how we map source events to your destination.
You may need to add actions for this destination
While we often have default triggers for actions, we don't always add those actions as defaults. You may need to add actions to make sure that you're sending all the data that you want to send to your destination. See our actions page for help setting up actions.
Update User Profile
Default Trigger: type = “identify” or type = “group”
Updates a users profile attributes in Braze
Track Event
Default Trigger: type = “track” and event != “Order Completed”
Reports that the current user performed a custom named event.
Track Purchase
Default Trigger: type = “track” and event = “Order Completed”
Reports that the current user made an in-app purchase.
Debounce Middleware
Default Trigger: type = “identify” or type = “group”
When enabled, it ensures that only events where at least one changed trait value are sent to Braze, and events with duplicate traits are not sent. Debounce functionality requires a frontend client to work. Therefore, it cannot be used with server-side libraries or with Engage.