Create the perfect Callbot with CSML Studio and Twilio Voice!
Loading...
Loading...
Designing a callbot is very different from designing a text-based chatbot. There are however some extra rules to make a successful callbot:
Keep your all your sections short. Nobody wants to listen to (and can remember) a huge block of text!
This integration supports both speech and DTMF (keypad) inputs. When you can, let the caller use the number keypad on their phone, as it has much better success rates than speech to text!
It is impossible/difficult to know in advance what language a user will speak, so we recommend using a different phone number/TwiML app for each language that you intend to serve with this chatbot.
All conversations start at the welcome_flow define in the channel. Callbot conversations never continue where they left off.
To hung up on a user, simply reach a goto end
.
By default, there is a timeout of 5s on every hold
. If the user does or says nothing, the conversation stops.
Twilio has a web interface to test your chatbot on your TwiML App page. You can use it to test your bot!
Note: this web interface does not support the CallForwarding component.
As you can expect, not all CSML components work well with a callbot, as there is no support for any visual component. However you can use all of the following components:
Text
Question
Audio
Typing
Wait
Callbots on CSML Studio also support an additional custom component, CallForwarding
. This allows redirecting the user to a different phone number. This is very useful in a triage type of chatbots: when the request is qualified enough, you can simply redirect the user to the right person or service!
Each call made to CSML Studio will have a number of metadata, based on what information is provided by Twilio. An example _metadata
object would look like this:
For now, you can not create multilingual Twilio callbots as the language is set in the channels settings. However, this feature can be added upon request, so let us know if you need it!
How to configure a callbot on CSML Studio with Twilio Voice
To get started, you will need to create a Twilio account and purchase a phone number in the country of your choice. . The only point of attention is that you must make sure that the number you purchase has Voice capabilities. Please keep in mind that depending on your country of origin, the requirements may differ, and Twilio may ask you for business verification. Keep track of this phone number (including the country code) as you are going to need to add it later to CSML Studio!
TwiML is Twilio's own markup language for connecting with their programmable interfaces. You will need to create a new app by and clicking on Create a new app, then fill the Voice Request URL and provide with this URL: .
Once you have created this app, find its Application SID by clicking on its name again on the list of TwiML apps, and keep this information for later.
To setup your Twilio Callbot in CSML Studio, you will simply need to visit the Channels section and create a new Twilio (Voice) channel. Then simply fill the required fields with the information you gathered earlier.
Once you click on Submit, your bot is ready to use!
You will then need to link this Application with the phone number you created earlier. To do so, visit the , and click on your number to configure it. Under Voice & Fax, select Accept incoming voice calls, configure with TwiML App and pick the TwiML App we provided earlier.
The last step is to provide CSML Studio with means to make sure that the requests that are sent to the Twilio Voice endpoint are indeed coming from Twilio. To do so, and copy your Account SID and Auth Token, found under API Credentials:
About the Language field: as Twilio provides Speech-To-Text and Text-To-Speech capabilities, it must know in advance in what language the user is supposed to speak. . You must specify the full ISO locale code (i.e en-US
, fr-FR
...).