Articles on: Channels

Adding a Twilio Messaging Service

Twilio recently optimized its platform to accommodate programmatic SMS messaging at scale. This upgrade allows for the creation of a messaging service, which enables you to dedicate multiple local Twilio numbers to a single channel, and improve SMS delivery with phone number intelligence via the Programmable SMS features available in your Account Portal.

Sender Intelligence

Twilio Sender intelligence allows you to rely on Twilio backend logic to select the best phone number for every message. Whether it's using multiple numbers to send high volume messages or the same local recognizable number for each person to increase response rate, the aim is to remove the burden of carrier routing and regulations through four dynamic features:

Area Code Geo-Match - creates a local experience by automatically using local phone numbers with area codes that match or overlay your recipient's phone number when sending messages to the US and Canada.

Sticky-Sender - ensures consistency for message recipients by selecting the same From phone number you previously used in conversation with a given customer.

Fallback to Long Code - reattempts message delivery using a long code phone number when select messages sent with a Short Code have not been successfully delivered.

Channel Relationships

Twilio's Geo-Match and Sticky-Sender features ensure that the relationships between your phone numbers and contacts remain constant from your first broadcast.

When multiple channels of the same type are connected to your Nyaruka account, the channel that the contact last messaged will be prioritized. Contacts can be locked-in to a relationship with a specific channel (they'll only receive messages from this channel). Geo-Match and Sticky-Sender ensure that even if your contact sends a message to the wrong channel, they'll always receive a response from the same number.

Content Intelligence

Messages with special characters or attachments can be lost in transmission due to ever-changing carrier specs. A Messaging Service allows you to automatically format every message to ensure your content stays intact. These are the features that allow you to do so:

Smart Encoding - character encoding is dynamically adjusted per carrier so that double-byte characters and even Emoji are delivered as intended.

Outbound Message Concatenation - long outbound messages are automatically segmented and encoded for re-assembly to meet destination carrier requirements.

Adding a Twilio Messaging Service

Follow these instructions to setup your own messaging service and add it to your account:

Login to your Twilio account and click on Messaging under Develop. Then, click the Services tab:

Create a new messaging service by first clicking on Create Messaging Services button on the right-hand side, and go through the steps.

In a separate tab, login to your textit account, navigate to the Add Channel page, and select Twilio Messaging Service option:

Copy your Messaging Service SID from your Twilio portal.

On the Add Twilio Messaging Service channel page, select your country and paste your Messaging Service SID in the appropriate box and Submit:

On the following page, copy the the request URL that we provide you:

Next, head back to Twilio and click 'Senders' under Services. A Sender represents a channel, number type, or messaging type that can receive and send messages using the Twilio Messaging API. Twilio's built in features can help you choose the right Sender for you. After choosing a phone number, then set your Sender Selection Settings. We suggest using all of the options to optimize your Messaging Service.
Select a phone number.

Next, you will integrate your Messaging Service. Click on 'Integrations' to the left of the page and then choose 'Send a webhook'. In the 'Request URL' field, you'll add the Request URL we've provided for you on the Twilio Messaging Service Configuration page in your textit account (Step 6) and use the HTTP Post option.

You also use this URL as your Callback URL in order to receive the delivery status of your Twilio messages:

And Save.

Your Twilio Messaging Service is now fully integrated and ready to use.

You can continue configuring your Messaging Service in your Twilio account within the 'Content Settings' page:

Followed by the 'A2P & Compliance' tab:

And finally the 'Opt-Out Management' tab, where you can edit opt-out, opt-in & help keywords, set language-specific keywords, and country-code keywords.

Start a flow to test out your service.

Note: Twilio trial numbers are not sufficient for testing- you will not be able to send or receive real messages with a trial number! 

Helpful Hints

You can reuse the same Twilio account within multiple workspaces but make sure the phone numbers connected are different and not used with a Twilio Messaging Service in multiple workspaces. Messaging errors can come up when you've connected a single Twilio account across workspaces and individual phone numbers within are duplicated- Twilio won't know where to send and receive your messages!

Seeing issues? You'll first need to remove the channel number from the TMS within your Twilio account, disconnect the channel having issues within your TextIt workspace, and finally reconnect- making sure your individual phone number is now only added to one workspace.

Questions? Send us a message via the support widge in the bottom right hand corner of your browser.

Updated on: 15/12/2023

Was this article helpful?

Share your feedback


Thank you!