Kaleyra

Understand how to integrate Kaleyra with CleverTap for WhatsApp communication.

🚧

Support For Integration

This integration is completed by Kaleyra, and they are dedicated to maintaining and enhancing it. The CleverTap and Kaleyra integration has undergone stringent testing to ensure seamless functionality. For any support or query resolution, contact Kaleyra.

Introduction

CleverTap users can leverage the following WhatsApp capabilities of Kaleyra to communicate with their customers to:

  • Send just-in-time offers to customers to drive purchases
  • Gather feedback on the services
  • Keep customers informed and more

Prerequisites For Integration

Following are the prerequisites:

  • WhatsApp add-on enabled on the CleverTap account in addition to the basic or essentials price plan.
  • WhatsApp onboarding for the phone number to be used with CleverTap is completed.
  • Kaleyra WhatsApp Business API.

Integrate Kaleyra with CleverTap

This process involves the following three steps:

  1. Find Kaleyra Details.
  2. Configure CleverTap Dashboard.
  3. Set Up CleverTap Callbacks in Kaleyra.

Find Kaleyra Details

We recommend keeping the API key and HTTP Endpoint handy before starting with the configuration on the CleverTap dashboard. To do so:

  1. Get the CleverTap endpoint URL from the Kaleyra support team.
  2. To get the API keys:
    i. Log into your Kaleyra account.
    ii. From the left menu bar, click Developers. The API Keys page appears.
    iii. Hover over the API key to view the API Key and the SID.
    iv. Click the ellipses icon (...) at the right end of the API Key list and click Edit.
Kaleyra API View

Kaleyra API View

You can view the following details:

  • API Name
  • Whitelisted IP Addresses: The whitelisted IP addresses for the API Key.
  • API Domain: The base URL to send the API requests.
  • SID (Security Identifier): Unique SID of your kaleyra account. This value is the same for all your API Keys.
  • API Key: API key details.
  1. Click the copy icon next to the API Key to copy the API to the clipboard.
1144

Kaleyra API Keys

Configure CleverTap Dashboard

To configure the CleverTap dashboard:

  1. Go to Settings > Channels > WhatsApp > WhatsApp Connect from the CleverTap dashboard.
  2. Click + Provider and Log in to Facebook.
Kaleyra Provider Setup

Kaleyra Provider Setup

  1. Enter the following details:

Field

Description

Provider

Select Generic (Other) from the dropdown list.

Nickname

Enter the nickname as Kaleyra to identify the provider easily.

WhatsApp Business Number

Enter your approved WhatsApp number with your country code.

To view the approved WhatsApp number, navigate to Channels > WhatsApp Manage > Configurations > filter by Approved Status from Kaleyra's Dashboard.

From the Number column, copy the mobile number with the country code.

Request Type

Ensure that the Request Type is POST.

HTTP End Point

Enter the CleverTap endpoint URL provided by the Kaleyra support team.

Headers

Select Headers under the Body section and add the following key-value pairs:

  • In the Key field, enter API key, and in the Value field, enter the API Key value from your Kaleyra application. To get the API Key details, refer to View API Key and SID.

  • In the Key field, enter sid; in the Value field, enter the SID value retrieved from your Kaleyra application. To get the sid details, refer to View API Key and SID.

  • In the Key field, enter kaleyra-host, and in the Value field, enter https://api.kaleyra.io/ as API domain URL from your Kaleyra application.

  • In the Key field, enter inbound-message-callback-url, and in the Value field, copy and paste the inbound message callback URL.

  • In the Key field, enter delivery-report-callback-url, and in the Value field, copy and paste the delivery report callback URL.

  1. To make this service provider as the default provider to send a WhatsApp message, select the Mark this as default checkbox.
  2. To automatically reply to users who message on WhatsApp but are not tracked on the CleverTap dashboard, select the Set auto-reply for users not tracked on CleverTap checkbox.
  3. (Optional) You can set the Maximum Concurrent API requests anywhere between 30 to 1000 requests. Consider your requirement and the provider's limitations to define this value.
  4. Click Save.

Set Up CleverTap Callbacks in Kaleyra

📘

Naming WhatsApp Templates

Template names and language variants must be unique for each provider configuration. This means that you can use the same template name once for each provider configuration.

For example, if you have multiple provider configurations, such as Phone_1, phone_2, you can use the same template name once within Phone_1 and Phone_2.

CleverTap callbacks are already configured in send message API request headers. You must enable a custom callback URL provided by the Kaleyra support team.

To set up the custom callback URL:

  1. Log into your Kaleyra.io account.
  2. Click user profile in the top right bar,
  3. Click Settings.
1366

Kaleyra Settings

  1. Navigate to the Settings tab
1366

Settings Tab

  1. In the Enable WhatsApp Callback URLs field, enter the HTTP Endpoint shared by the Kaleyra Support team to configure the WhatsApp Callback.
  2. Click Save.
1366

Enable WhatsApp Callbacks

To enable incoming messages callback URL in Kaleyra:

  1. Sign in to your Kaleyra.io account.
  2. On Kaleyra's dashboard page, click Channels from the left menu bar.
    The Channels page appears.
  3. From the WhatsApp section, click Manage. The WhatsApp Dashboard page appears.
1366

Kaleyra Dashboard

  1. Click Configurations. The Configurations page appears.
1366

Kaleyra Configuration

  1. Locate the number you have configured in CleverTap > Click the ellipsis > click Edit. The Edit Number pop-up appears.
1137

Kaleyra Configuration

  1. Enter the incoming message URL provided by the Kaleyra Support team in the Incoming URL field.
437

Setup Incoming Callback URL

  1. Add the following two query parameters:
  • ? followed by inbound_message_callback_url= and paste the Inbound Message Callback URL from the CleverTap's Provider page.
  • & followed by payload_version= and then enter the Payload Version in the Body section of the CleverTap's Provider page.

Find Template Details

You need to add the details of your pre-approved templates on the CleverTap dashboard. To find the details of your pre-approved templates on Kaleyra, navigate to the Template section from the Kaleyra dashboard. You can replicate these pre-approved templates in CleverTap to start sending campaigns. Refer to the section below to understand how to add templates in CleverTap.

Add Message Template

To create WhatsApp campaigns, you must have pre-approved WhatsApp message templates saved on the CleverTap dashboard.

To add the message templates:

  1. Go to Settings > Channels > WhatsApp > WhatsApp Connect from the CleverTap dashboard.
  2. Enter the Provider Nickname in the Search field.
  3. Select the Templates tab, and click +Template.
2174

Create a New Template

  1. Enter the template name in the Namespace field.
  2. Choose the type of template header (Text or Media). For Media headers, you can use Image, Video, Document, and Location.
  3. You can choose to use the Limited Time Offer template for your message. For more information, refer to Limited Time Offer Template.
  4. Enter the message content.
  5. Select Footer to add a footer text and a button (Quick Reply or a Call To Action).
  6. Select the Language in which you want to display the message.
2036

Define Template Content

  1. Click Save Template.

Test Message Template

You can send a test message using the saved templates from the CleverTap dashboard as follows:

  1. Right-click the ellipsis below the template.
  2. Click Send Test WhatsApp.
  3. Select the test profiles or manually enter the mobile number to whom you want to send the message and click Send Test.
1304

Test a Message Template

The success or failure response appears on the dashboard. If the message is not delivered, you can copy the response payload and share it with the Kaleyra team to debug the issue, as shown in the following figure:

728

Validate the Test Response

Create Campaign

To create a WhatsApp campaign using Kaleyra as the provider, refer to Create a WhatsApp Campaign.

Creating a Journey

To create a WhatsApp journey using Kaleyra as the provider, refer to Create a WhatsApp Journey.