Braze Device Mode Integration

Send events to Braze in RudderStack device mode.

After you have successfully instrumented Braze as a destination in RudderStack, follow this guide to correctly send your events to Braze in device mode.

Add Braze integration

warning
Make sure to add the Braze integration to your project before sending events to Braze in device mode.

Depending on your integration platform, follow these steps:

Limitations for React Native and Flutter sources

Braze requires different App Keys for Android and iOS platforms. Currently, there is no way to provide App Keys per platform when using the React Native or Flutter SDKs with the Braze integration. This is a known limitation — the RudderStack team has a planned item to fix it in the near future.

You can work around this limitation by creating separate integrations and sources for Android (Java) and iOS (Obj-C). See the below sections for detailed steps.

Step 1: Create separate integrations

Create two Braze destination integrations in the RudderStack dashboard:

  • Braze Android: Configure this integration with your Android App Key.
  • Braze iOS: Configure this integration with your iOS App Key.

Step 2: Create separate sources

Create two sources in the RudderStack dashboard:

  • Flutter / React Native Android (Java)
  • Flutter / React Native iOS (Obj-C)

Step 3: Connect sources to destinations

  1. Connect the Flutter Android (Java) source to the Braze Android (Java) destination.
  2. Connect the Flutter iOS (Obj-C) source to the Braze iOS (Obj-C) destination.

Step 4: Platform-specific SDK initialization

During SDK initialization, use platform checks to conditionally initialize the appropriate RudderStack SDK.

The example code snippets for Flutter and React Native are shown below:

Use platform-specific Braze App Identifier keys

announcement

This feature is currently in Beta and behind a feature flag. It is expected to be generally available by March 31, 2026.

Contact RudderStack Support to enable this feature for your account.

For device mode connections, you can configure platform-specific (Android, iOS, and web) Braze App Identifier keys while setting up your Braze destination. This is useful especially when connecting cross-platform SDK sources like React Native and Flutter, while also allowing Android and iOS sources to be configured to the same Braze destination.

To use this feature:

  1. Enable the Enable Platform-specific App Identifier Keys setting in the Connection settings.
  2. Configure the relevant App Identifier keys based on your connected sources.

How App Identifier key selection works

The Braze device mode integration looks for platform-specific App Identifier keys first. If unavailable, it uses the Default App Identifier Key instead.

Note that:

  • An older version of the device mode integration will continue to work with the default App Identifier key.
  • If you remove the default App Identifier key and configure platform-specific App Identifier keys, you must upgrade to the latest version of the device mode integration highlighted below:
SDKMinimum supported integration version
Android (Kotlin)1.1.1
iOS (Swift)1.0.1
React Native2.1.0
Flutter2.5.0
Android (Java) — Legacy2.1.1
iOS (Obj-C) — Legacy4.2.1

Migration example

Scenario

Suppose you have three sources connected to three separate Braze destinations in your current setup:

  • Android source (A) → Braze destination (B1)
  • iOS source (B) → Braze destination (B2)
  • JavaScript source (C) → Braze destination (B3)

Each destination is configured with platform-specific keys.

What you want to achieve

You want to consolidate these connections to a single Braze destination (B3, for example) that supports all the platform-specific App Identifier keys, simplifying your overall setup.

Steps

  1. Upgrade your SDK integrations: Upgrade your Android and iOS SDK integrations to the minimum versions that support platform-specific App Identifier keys. See the supported versions table above for details.

  2. Enable platform-specific keys: In your existing Braze destination B3 (previously connected only to the JavaScript source), enable the Enable Platform-specific App Identifier Keys toggle in the Connection settings and specify the platform-specific key for the JavaScript source.

  3. Connect additional sources: Connect your Android (A) and iOS (B) sources to the Braze destination.

  4. Add platform-specific keys: Configure the Android and iOS App Identifier keys in the destination settings.

  5. Remove old destinations: Delete the older separate Braze destinations (B1 and B2) that are no longer needed.

After completing these steps, all three sources (Android, iOS, and JavaScript) send events to a single Braze destination configured with platform-specific App Identifier keys.

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.
  • When they log into their app.
  • When they update their information.

A sample identify call is shown below:

rudderanalytics.identify("1hKOmRA4GRlm", {
  email: "alex@example.com",
  name: "Alex Keener"
});

Set custom user ID (externalId)

In mobile device mode, that is, when using Android (Java), iOS (Obj-C), React Native, or Flutter as source, you need to pass externalId in your identify events. Otherwise, Braze uses userId to identify the user.

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

The following code snippet shows how to add an externalId to your identify event using the React Native SDK:

const options = {
  externalIds: [
    {
      id: "<your_external_id>",
      type: "brazeExternalId",
    },
  ],
}
rudderClient.identify(
  "1hKOmRA4GRlm",
  {
    email: "alex@example.com",
    gender: "male",
  },
  options
)
warning
Make sure to send the identify event containing the externalId before sending any subsequent track events. That way, RudderStack is able to successfully persist the externalId information in all the future events.

Track

The track event lets you record the customer events along with any associated properties.

A sample track call is shown below:

rudderanalytics.track("Product Added", {
  numberOfRatings: "12",
  name: "item 1"
});

Order Completed

When you use the track call for an Order Completed event, RudderStack sends the product information present in the event to Braze as purchases.

A sample Order Completed event is shown:

rudderanalytics.track("Order Completed", {
  userId: "1hKOmRA4GRlm",
  currency: "USD",
  products: [
    {
      product_id: "123454387",
      name: "Game",
      price: 15.99
    }
  ]
});

Page

The page event lets you record your website’s page views, with the additional relevant information about the viewed page.

A sample page call is as shown:

rudderanalytics.page("Cart", "Cart Viewed", {
  path: "/cart",
  referrer: "test.com",
  search: "term",
  title: "test_item",
  url: "http://test.in"
});

Delta management for identify and track calls

If you are sending events to Braze in device mode, you can save costs by deduplicating your identify calls. To do so, enable the Deduplicate Traits dashboard setting. RudderStack then sends only the changed or modified attributes (traits) to Braze.

info
RudderStack recommends reviewing Braze’s data points policy to fully understand how this functionality can help you avoid data overages.

Advanced features

This section covers some advanced Braze operations that you can perform using RudderStack.

Send push notification events

Depending on your iOS (Obj-C) SDK version, follow these steps to send push notification events to Braze:

Send in-app message events

info
This feature is available in the iOS (Obj-C) SDK device mode integration starting from version 1.4.0.
  1. Add the following line to your Podfile for Braze IAM support:
pod 'BrazeUI'
  1. Navigate to your Xcode app project directory and run pod install.
  2. Import the BrazeUI SDK in your AppDelegate.m file:
@import BrazeUI;
  1. Add a static variable to your AppDelegate.m file to keep a reference to the Braze instance throughout your app’s lifetime:
static Braze *braze;
  1. Add the following code in your AppDelegate.m file just after the RudderStack iOS (Obj-C) SDK initialization snippet:
  1. Add the configureIAM method in the AppDelegate.m file:

Questions? We're here to help.

Join the RudderStack Slack community or email us for support