Braze Destination

Updated

About 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

  1. Go to the Data Pipelines tab and click Connections.

  2. Click Add New under Destinations.

  3. Select the Braze destination.

  4. (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.

  5. Configure your destination.

    1. Api Key: Created under Developer Console in the Braze Dashboard.

    2. 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.

    3. Endpoint: Your Braze REST endpoint. See more details

    Setup your destination
    Setup your destination

  6. 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.

The actions for your destination
The actions for your destination

Update User Profile

Default Trigger: type = “identify”

Update a user’s profile attributes in Braze

  • _update_existing_only boolean
    Setting 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: $.properties.braze_id

    The unique user identifier
  • country string

    Default: $.context.location.country

    The country code of the user
    • latitude number

      Default: $.context.location.latitude

      The current users’s latitude.
    • longitude number

      Default: $.context.location.longitude

      The user’s longitude.
    • Custom Attributes* any type
      Key-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: $.traits.email

    The user’s email
  • email_click_tracking_disabled boolean
    Set to true to disable the click tracking for all links within a future email, sent to this user.
  • email_open_tracking_disabled boolean
    Set to true to disable the open tracking pixel from being added to all future emails sent to this user.
  • email_subscribe string
    The 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: $.userId

    The unique user identifier
    • id string
      A person’s facebook ID/name.
    • likes array of [ strings ]
      This person’s likes as stated in their bio.
    • num_friends integer
      The number of Facebook friends the user has.
  • first_name string

    Default: $.traits.firstName

    The user’s first name
  • gender string
    The 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: $.traits.address.city

    The user’s home city.
  • image_url string

    Default: $.traits.avatar

    URL of image to be associated with user profile.
  • language string
    The user’s preferred language.
  • last_name string

    Default: $.traits.lastName

    The user’s last name
  • marked_email_as_spam_at string  (date-time)
    The date the user marked their email as spam.
  • phone string

    Default: $.traits.phone

    The user’s phone number
  • push_subscribe string
    The 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 string
      The ID of the application the token belongs to.
    • device_id string
      If you don’t provide this field, one will be randomly generated for you.
    • token string
      The device token for this device/app combination.
  • time_zone string
    The 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 integer
      The number of followers.
    • friends_count integer
      The number of friends/people the account follows.
    • id integer
      The twitter ID.
    • screen_name string
      The user’s Twitter handle.
    • statuses_count integer
      The number of posts/statuses.

Track Event

Default Trigger: type = “track” and event != “Order Completed”

Record custom events in Braze

  • _update_existing_only boolean
    Setting 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: $.properties.braze_id

    The unique user identifier
  • enable_batching boolean
    If 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: $.userId

    The unique user identifier
  • name string

    Default: $.event

    The event name
    • Event Properties* any type
      Additional key-value pairs you want to send along with the event.
  • time string  (date-time)

    Default: $.receivedAt

    When the event occurred.

Track Purchase

Default Trigger: event = “Order Completed”

Record purchases in Braze

  • _update_existing_only boolean
    Setting 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: $.properties.braze_id

    The unique user identifier
  • external_id string

    Default: $.userId

    The unique user identifier
  • products array of [ objects ]
    Any array of objects, where each object represents a product in the purchase
    • Product Properties* any type
      Properties about the purchase, like the price, name, quantity, etc.
    • Event Properties* any type
      Additional key-value pairs you want to send along with the event.
  • time string  (date-time)

    Default: $.receivedAt

    When the event occurred.

Create Alias

Default Trigger: event = “Create Alias”

Create new user aliases for existing identified users, or to create new unidentified users.

  • alias_label string
    A label indicating the type of alias
  • alias_name string
    The alias identifier
  • external_id string
    The 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 string
    The external ID of the user to identify.

Getting started: direct mode

  1. Go to the Data Pipelines tab and click Connections.

  2. Click Add New under Destinations.

  3. Select the Braze destination.

  4. (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.

  5. Configure your destination. See Configuration Settings below for information about individual configuration parameters.

  6. Click Enable Destination.

Direct mode settings

SettingDefaultDescription
Sdk Version4.6The version of the Braze SDK to use
Api KeyFound in the Braze Dashboard under Manage Settings → Apps → Web
Endpointsdk.iad-01.braze.comYour Braze SDK endpoint. See more details
Allow Crawler ActivityAllow Braze to log activity from crawlers. See more details
Allow User Supplied JavascriptTo 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 IdentifiedIf 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 VersionVersion to which user events sent to Braze will be associated with. See more details
Content Security NonceAllows Braze to add the nonce to any <script> and <style> elements created by the SDK. See more details
Device Property AllowlistBy 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 MaintenanceBy 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 AwesomeBraze automatically loads FontAwesome 4.7.0 from the FontAwesome CDN. To disable this behavior set this option to true.
Enable LoggingSet to true to enable logging by default
Enable Sdk AuthenticationSet to true to enable the SDK Authentication feature.
In App Message Z IndexBy 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.
LocalizationenBy 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 MessagestrueWhen 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 ExternallyIf 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 Seconds30Provide a value to override the default interval between trigger actions with a value of your own. See more details
No CookiesBy 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 TabBy 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 TabBy 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 DismissalBy 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 IdIf 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 LocationBy 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 Seconds1800By 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.

Copied to clipboard!
  Contents
Is this page helpful?