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 Delivery feedback 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 email@example.com.
Please note that this is only required to see SMS delivery events on the 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 -
- Go to your Sinch dashboard -> SMS -> APIs -> select your service plan id and configure the callback URL as shown below:
- 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 available at MoEngage Dashboard > Settings > General.
Changes to your Sinch REST API request
To capture the delivery receipts from Sinch, there are a few things to note here
- 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).
Please note that any delivery events without this uid field will be rejected by MoEngage.
- To track the 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 -
"body": "Hi there! How are you?",
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 the MoEngage dashboard user profile as shown below:
The different events that you would be able to see on the MoEngage dashboard are as below -
- SMS Sent
- SMS Delivered
- 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.