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
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:
The Braze integration v1.0.0 and above requires minimum SDK version (minSdk) of 25.
Follow the steps in this section to add Braze to your Kotlin project.
In your module (app-level) Gradle file (usually <project>/<app-module>/build.gradle.kts or <project>/<app-module>/build.gradle), add the following dependencies for the RudderStack-Braze integration:
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.
Replace FLUTTER_ANDROID_WRITE_KEY and FLUTTER_IOS_WRITE_KEY with the actual write keys from your respective Flutter sources (for Android (Java) and iOS (Obj-C)) created in Step 2.
Replace REACT_NATIVE_ANDROID_WRITE_KEY and REACT_NATIVE_IOS_WRITE_KEY with the actual write keys from your respective React Native sources (for Android (Java) and iOS) created in Step 2.
Use platform-specific Braze App Identifier keys
This feature is currently in Beta and behind a feature flag. It is expected to be generally available by March 31, 2026.
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:
Enable the Enable Platform-specific App Identifier Keys setting in the Connection settings.
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:
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
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.
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.
Connect additional sources: Connect your Android (A) and iOS (B) sources to the Braze destination.
Add platform-specific keys: Configure the Android and iOS App Identifier keys in the destination settings.
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.
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.
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:
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.
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.
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:
You must assign the delegate object using center.delegate = self synchronously before your app finishes launching - preferably in application:didFinishLaunchingWithOptions.
// - Register the device token with Braze
-(void)application:(UIApplication*)applicationdidRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken{if([RudderBrazeFactoryinstance].integration){[[RudderBrazeFactoryinstance].integrationdidRegisterForRemoteNotificationsWithDeviceToken:deviceToken];}}
Make sure that RudderBrazeFactory is initialized before making calls to this push API.
Since the Braze push API is designed as an instance method, it relies on the SDK that is correctly initialized beforehand. To do this, you can utilize the dispatch_after API.
Enable push handling:
// - Add support for silent notification
-(void)application:(UIApplication*)applicationdidReceiveRemoteNotification:(NSDictionary*)userInfofetchCompletionHandler:(void(^)(UIBackgroundFetchResult))completionHandler{if([RudderBrazeFactoryinstance].integration){[[RudderBrazeFactoryinstance].integrationdidReceiveRemoteNotification:userInfofetchCompletionHandler:completionHandler];}}// - Add support for push notifications
-(void)userNotificationCenter:(UNUserNotificationCenter*)centerdidReceiveNotificationResponse:(UNNotificationResponse*)responsewithCompletionHandler:(void(^)(void))completionHandler{if([RudderBrazeFactoryinstance].integration){[[RudderBrazeFactoryinstance].integrationdidReceiveNotificationResponse:responsewithCompletionHandler:completionHandler];}}// - Add support for displaying push notification when the app is currently running in the foreground
-(void)userNotificationCenter:(UNUserNotificationCenter*)centerwillPresentNotification:(UNNotification*)notificationwithCompletionHandler:(void(^)(UNNotificationPresentationOptions))completionHandler{if(@available(iOS14,*)){completionHandler(UNNotificationPresentationOptionList|UNNotificationPresentationOptionBanner);}else{completionHandler(UNNotificationPresentationOptionAlert);}}
Braze recommends invoking the push integration code within the application’s main thread.
Add the following code to your AppDelegate file under the didFinishLaunchingWithOptions method:
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.