Business Messaging Guide v2
Business Messaging
Version 2

Integrate with CleverTap

Copy link

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

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


Set up your integration

Copy link

To set up your CleverTap integration, turn on the Event callback option and fill in the Project ID, Passcode, and API endpoint.

List of configurations

Copy link

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

ConfigurationDescription

Event callback

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

Project details

Specifies the project ID and passcode found under Settings > Project on the CleverTap dashboard.

CleverTap API endpoint

Specifies the CleverTap API endpoint. Copy and paste the API endpoint under API in the CleverTap documentation based on your data center region.


Install Sendbird Business Messaging Builder

Copy link

Install Sendbird Business Messaging Builder as a Chrome extension. You can also find the extension link on Business Messaging > Integrations > CleverTap 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 CleverTap user ID

Copy link

CleverTap creates a user profile for each person who uses your client 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 CleverTap user ID, you need to add a Sendbird user ID as a custom identifier. Refer to the example code for CleverTap's Android SDK below.

HashMap<String, Object> profileUpdate = new HashMap<String, Object>();
profileUpdate.put("SendbirdID", "<Sendbird User ID>");

cleverTap.pushProfile(profileUpdate);

To learn more about updating the user profile, see CleverTap'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 CleverTap's custom events. When an event takes place in a Sendbird channel, the Sendbird server uses CleverTap's upload events API to create an event in CleverTap. The following is a JSON payload example of the callback. You can track the message's conversion rate with the value in the status field.

{
  "evtName": "My First Campaign", // The Event name value you’ve set in Editor
                                  // during the notification creation.
  "evtData": {
    "status": "READ",             // The status of a notification. Either SENT
                                  // or READ.
    "target_id": 123123           // The campaign or journey ID.
  }
}

Create a webhook template

Copy link

Before sending any notifications through a Campaign or Journey, you need to add a webhook template on the CleverTap Dashboard under Settings > Engage > Channels > Webhooks in order to send a notification through Sendbird. Sendbird supports two different endpoints for sending notifications through the CleverTap integration, which are realtime and batch. The following table compares the different use cases between the realtime and batch endpoints.

realtime vs. batch

Copy link
EndpointDescription

realtime

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 the realtime endpoint with CleverTap Journey. If you send a bulk of notifications at once through this endpoint, the request may be rate-limited.

batch

Specifies the endpoint for sending a notification to a massive group of users. It's highly recommended to use the batch endpoint with CleverTap 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, select the + Add Webhook button and fill in the necessary information.

List of webhook parameters

Copy link
ParameterDescription

Name

Specifies the webhook name. We recommend you name the webhook as Sendbird realtime or Sendbird batch for each endpoint.

Method

Specifies which action to take through the endpoint. This must be set to POST.

Destination URL

Specifies the CleverTap integration endpoint to use. They can be found on Sendbird Dashboard under Business Messaging > Integrations > CleverTap. These endpoints may look like this:

realtime: https://api-{app_id}.notifications.sendbird.com/clevertap/notifications/realtime

batch: https://api-{app_id}.notifications.sendbird.com/clevertap/notifications/batch

Header parameters

Specifies the API token to authenticate. Add a key-value pair with Api-token as a key, and copy and paste the CleverTap Integration API token from Sendbird Dashboard under Business Messaging > Integrations > CleverTap as a value.


Send a notification

Copy link

You can now send a notification on the CleverTap dashboard. Select Sendbird as the Messaging Channel when creating a new Campaign. When creating a new Journey, select Webhook as the Messaging Channel. Then under Webhook, choose the webhook template for Sendbird. You can now go to the Editor page and select the template you created on Sendbird Dashboard to send your notification.