Business Messaging Guide v1
Business Messaging
Version 1

Integrate with Braze

Copy link

Sendbird Business Messaging allows you to integrate with Braze, a multi-channel marketing tool. To send notifications using Braze, you must install Sendbird Business Messaging Builder, a Chrome extension that provides a user-friendly interface for sending notifications. Select Braze on the Integrations page under Settings > Business Messaging on Sendbird Dashboard to start setting up.

Note : Before integrating with Braze, you need to create a template on Sendbird Dashboard first.


Set up your integration

Copy link

To set up your Braze integration, turn on the Event callback option and fill in Braze REST endpoint and Braze REST API key.

List of configurations

Copy link

When the following information is entered and saved, the Braze integration is added to your Sendbird Dashboard.

ConfigurationDescription

Event callback

Determines whether to send the delivery and read status of a notification to Braze. For more information, see details on Braze custom events.

Braze REST endpoint

Specifies the Braze REST Endpoint. You can find the project credentials on Braze's documentation guide.

Braze REST API key

Specifies the Braze REST API key. You can find the project credentials on your Braze Dashboard under Settings > Developer Console > API Settings > Rest API Keys.


Install Sendbird Business Messaging Builder

Copy link

Install Sendbird Business Messaging Builder as a Chrome extension. You can also find the extension link on Settings > Business Messaging > Integrations > Braze in Sendbird Dashboard. Once installed, click on the Sendbird Business Messaging Builder extension on your Chrome browser and click Go to Settings. On the settings window, you need to add your App ID and API Token in order to load the created templates to the Sendbird Business Messaging Builder.


Map Sendbird user ID to Braze user ID

Copy link

Braze creates a user profile for each person who uses your app. User profiles have a set of default fields, such as email, phone number, and language. But you can also add more identifiers to the user's custom attributes. In order to map a Sendbird user ID to a Braze user ID, you need to add a Sendbird user ID as a custom identifier. Refer to the code below.

Braze.getInstance(context).getCurrentUser().setCustomUserAttribute(
  "sendbird_id", "<Sendbird User ID>")

To learn more about updating the user profile, see Braze's documentation guide.


Set up campaign metrics

Copy link

If you've turned on the Event callback feature on Sendbird Dashboard, a notification's delivery receipt and read receipt events can be integrated with Braze's custom events. You can monitor the notifications' conversion rate and relevant events in Settings > Manage Settings > Custom Events > + Add Custom Event on Braze's dashboard. Follow the steps below to integrate events for metrics.

  1. Go to Manage Settings on the left menu bar.
  2. On the Custom Events tab, select + Add Custom Events.
  3. A Create New Custom Events pop-up will appear. Enter an event name, such as Sendbird notification status, and click Save.
  4. Once you’ve created a custom event, find the event name on the table and select Manage Properties.
  5. In a Properties for your event pop-up window, select Add event properties and enter a value for the status property. Then, choose String for the property type.

See the following JSON payload example of the callback.

{
  "external_id": "user-1@sendbird.com", // The user's external ID.
  "name": "My First Campaign",          // The name value you’ve set in Editor
                                        // during the notification creation.
  "properties": {
    "status": "READ"                    // The status of a notification. Either SENT
                                        // or READ.
  }
}

Create a webhook template

Copy link

Before sending any notifications through a Campaign or Canvas, you need to add a webhook template in order to send a notification through the Sendbird server. Sendbird supports two different endpoints for sending notifications through the Braze integration, which are single and multi. The following table compares the different use cases between the single and multi endpoints.

single vs. multi

Copy link
EndpointDescription

single

Specifies the endpoint for sending a notification to users as a specific event takes place. The notification is sent directly to the target users in real-time and it's highly recommended to use single with Braze Canvas. If you send a bulk of notifications at once through this endpoint, the request may be rate-limited.

multi

Specifies the endpoint for sending a notification to a massive group of users. It's highly recommended to use multi with Braze Campaign. The notification isn't sent in real-time but it can be sent to a large group of target users at once without running into rate limit issues.

Once you decide which endpoint you want to use, follow the steps below to create and save a webhook template.

  1. Go to Templates & Media on the left menu bar on Braze Dashboard and select the Webhook Templates tab on the top. Then, you will see a Sendbird template under Predesigned Webhook Template.
  2. Edit template information.
  3. Copy a Braze Integration endpoint URL and Braze Integration API Token under Settings > Business Messaging > Integrations > Braze in Sendbird Dashboard and paste them into Webhook URL in the Compose tab and Api-Token in the Settings tab.

Send a notification

Copy link

You can now send a notification on the Braze dashboard. When creating a new Canvas or Campaign, select Webhook for Messaging Channel and choose the webhook template for Sendbird. You can now select the template you created on Sendbird Dashboard to send your notification.