Twilio integrations
Jos Barteling avatar
Written by Jos Barteling
Updated over a week ago

Simplesat allows you to create a CSAT, NPS, CES or 5-star survey that you can embed in your Twilio SMS messages.


Authenticating with Twilio

To authenticate with Twilio you'll first need to get your Account SID and AuthToken from Twilio.
Head over to your Twilio account, you'll find the Account SID and AuthToken under account info.

Click authenticate, then fill in the Account SID and AuthToken.

You're now authenticated with Twilio! πŸŽ‰


Use a webhook to send an SMS survey using Twilio

Simplesat can receive data from any webhook, format this, and then send a survey through Twilio.

Here's an example of how this might look:
​

Scroll down to use a webhook to send an SMS survey, then click activate integration.

Once the integration has successfully activated you'll need copy the webhook URL and set this up in the application you want to trigger the surveys from. Please contact Simplesat support if you need any help setting this up.

After that's done temporarily disable the integration again to configure some settings.

Next, scroll down to field mapping.

Here you'll need to map some data before the integration works.

At account SID fill in your Twilio account SID.

At from number fill in the number from which you'd like to send an SMS message.

At to number select use data from response, then select the recipient phone number from your webhook data.

The webhook will need to have fired once while the integration was active for the fields to be detected. Please contact Simplesat support if you have any trouble setting this up.

Note: If the data you're sending is part of an array, then it will send a survey for each item in that array. For example mapping the phone number of this array

[{"phoneNumber": 123},{"phoneNumber": 456}]

will send an SMS message to both 123 and 456.

At message fill in your SMS message. Include your survey URL inside this message. Most survey URLs are very long and SMS message have a 160 character limit, so you can either use Twilio's link shortening service or remove all parameters.

The bold part of this url is the minimum required data for the URL to work:

https://api.simplesat.io/api/rating/xxxxxxxxxxxxxxxxxxxxx/<ticket.id>/?source=someplatform&extra=data&goes=here

However, by deleting this it won't automatically capture any customer data, so the responses will either be anonymous or ask recipients for their information.

If you'd like to capture this data automatically, then please contact Simplesat support to embed the related ticket ID in your URL.

Afterwards we can use the ticket ID to pull the related ticket/customer data through one of the other integrations. That way the survey URL won't end up being long.

Filling in media URL is optional. Using this will send an MMS instead of an SMS, raising the character limit to 1600 characters. However, sending media using Twilio is only available in the US and Canada.

Once it's all set it it should look somewhat like this:

Click save, then activate the integration again.

Link shortening

Twilio provides a service to shorten links in SMS messages. However, this is not available under all plans, and Twilio charges an additional cost for every message sent with a shortened URL.

More information about link shortening can be found here under features > engagement suite > link shortening/click tracking and message scheduling

Deactivate your integration, then scroll down to field mapping.

Set shorten urls to true and fill in your messaging service SID.

Please make sure that the from number is assigned to the correct messaging service in Twilio.

Click save and activate the integration again.


Try it out!

Trigger the webhook and check your SMS messages. Then open the link and click any rating that you like. Once you do, new feedback should instantly show up in your Simplesat dashboard. 🎊

If you run into any issues let us know and we'll be happy to help troubleshoot. πŸ™Œ

Did this answer your question?