Contact usRequest a demo

Sending SMS text messages from Unblu with Twilio

If your organization wants to offer its clients the possibility to communicate with its agents using SMS text messages, you can enable Unblu’s Twilio integration. To do so, you must create and configure an SMS external messenger.

The Account Configuration interface guide describes how to create an SMS external messenger in the Unblu UI. Alternatively, you can use the web API endpoint /externalmessengers/create with type set to SMS. You must provide the following information:

twilioAccountSid

A unique key that identifies a specific Twilio parent account or subaccount. The Account SID is a credential and acts as a username.

twilioAuthToken

The promoted authentication token used to authenticate future API requests.

phoneNumber

The phone number text messages should be sent from. This information also comes from Twilio.

The web API also provides endpoints to manage SMS external messengers; for more information, refer to the Unblu web API reference.

Choosing a phone number

Twilio recommend that you use a phone number from the same country as the people you want to send text messages. If your organization services clients in multiple countries, the recommended approach is to create separate SMS external messengers for each country, each with a local phone number.

For information on obtaining a phone number, refer to Twilio phone number availability and their capabilities on the Twilio website.

Language detection

If your organization services customers in multiple language regions, you probably want incoming chat request to be triaged directly to agents who speak the language a text message was written in. To this end, Unblu uses the Lingua library to detect which language the first incoming message of a conversation is written in. It calculates confidence values for the likelihood that the incoming message from an external messenger is in one of a number of languages. If the difference between the confidence values of the two most likely languages falls below a certain threshold, the default account language is used instead.

The threshold for the difference between the confidence values is set with the configuration property com.unblu.externalmessenger.sms.languageDetectionMaximumRelativeDistance.

For a list of the languages Lingua supports, refer to Which languages are supported.

Sending text messages

By default, text messages that agents send appear on the recipient’s phone as the agent entered them.

Since the phone number that the text message comes from doesn’t necessarily give the recipient enough information to determine who the message is from, you might want to expand on the agent’s message with additional general information.

The text property com.unblu.conversation.message.externalMessengerTemplateAgent lets you embed the text of the agent’s message in a message. You can also automatically add the agent’s name to the text message.

Whose messages the text property is applied to depends on the configuration property com.unblu.externalmessenger.useAgentMessageTemplate.

Limitations sending text messages

You should be aware of the following limitations when sending and receiving SMS text messages with Unblu:

  • Unblu doesn’t support inbound MMS messages. Nowadays, many telephone network operators send an SMS with a link to the original image rather than the MMS itself, and this SMS doesn’t comes from the original phone number. As a result, it isn’t possible for Unblu to assign the message to the correct visitor phone number.

  • SMS text messages including files aren’t supported and result in an error.

See also