Sinch Data Integration

Introduction

At times, you may want to send sms from Sinch REST API directly instead of sending sms via a campaign on MoEngage dashboard. This is generally the recommended approach for your transactional use-cases like payment updates, OTP etc.

The Data Integration with Sinch allows you to capture the sms delivery reports in MoEngage for messages sent directly using Sinch REST API.

Scope of Integration

This Integration allows you to track sms delivery receipts like SMS Sent, SMS Delivery Failed and SMS Delivered in Moengage.

Enabling the Sinch Data Integration for your MoEngage account

This integration can only be enabled on demand. If you have a use-case to forward sms delivery receipts from Sinch to MoEngage for your transactional messages sent via Sinch, you can reach out to your Moengage Customer Success Manager or write to support@moengage.com.

Please note that this is only required to see sms delivery events on MoEngage dashboard for sms that you send directly using sinch API. For sms sent via MoEngage campaigns, this is not required.

Configurations on the Sinch Dashboard

To setup this data integration, please follow the below steps -

  1. Go to your sinch dashboard -> SMS -> APIs -> select your service plan id and configure the callback URL as shown below -
    Screen_Shot_2020-09-01_at_6.01.04_PM.png

  2. Add webhook URL - https://api.moengage.com/v1/deliveryfeedback/sinch/<your_app_key> on the sinch dashboard where app_key is the app_key of your MoEngage account and available on your MoEngage dashboard here. (Settings -> App Settings)

Changes to your Sinch REST API request 

To capture the delivery receipts from Sinch, there are a few things to note here

  1. When sending sms via Sinch API directly, it is mandatory that you send a key value pair for uid under client_reference. The value of uid should be the same as the value of the ID (also called the customer_id) on the MoEngage user profile (see reference below)

    Screen_Shot_2020-08-12_at_11.58.45_AM.png

    Please note that any delivery events without this uid field will be rejected by MoEngage.

  2. To track category, you need to add the key - "cat" under client_reference in your sinch sms API request. This is not mandatory.

A sample Sinch REST API request with uid and other moengage params would be like below -

{
"from": "12345",
"to": [
"123456789"
],
"body": "Hi there! How are you?",
"client_reference": "$uid=123456789759339206$cat=category_name"
}

 

Events tracked in MoEngage

Once the configurations are done on the Sinch dashboard and you are passing the mandatory uid parameter in your API request to Sinch, you will start seeing events on MoEngage dashboard user profile as shown below -

Screen_Shot_2020-09-01_at_6.16.12_PM.png

The different events that you would be able to see on the MoEngage dashboard are as below - 

  1. SMS Sent
  2. SMS Delivered
  3. SMS Delivery Failed

Please note that if we are unable to find a user with the uid present in the event request from Sinch, MoEngage will create a new user. This might affect your stats and total user count in moengage so always ensure to send a correct value for uid in your Sinch REST API request.

 

Was this article helpful?
0 out of 0 found this helpful