Learn more about Twilio Autopilot specific features that can be used with the Jovo Framework.
The Twilio Autopilot platform allows you to build, train, and deploy bots that work across web and mobile chat, SMS, WhatsApp, and your contact center.
The platform is not completely integrated into the Jovo ecosystem yet. While you can use the framework to provide the logic for your bot, the language model has to be created on the Autopilot Developer Platform.
After creating your Autopilot bot, you simply have to set each task to redirect to the endpoint your Jovo project is running on:
All of the Autopilot specific objects and functions are accessed using the
The object will only be defined if the incoming request is from Autopilot. Because of that, you should first check wether it's defined or not before accessing it:
Some of Autopilot's features are integrated directly into the framework while others are not.
The integrated ones are
Play are Autopilot specific,
Listen where integrated into the basic functionalities of the framework, i.e.
tell() is the same as
ask is the same as the combination of the
Besides that, the
$autopilotBot object provides the
setActions() function, which allows you to set the array of actions yourself.
That way you can use any of the functionality provides by the Autopilot platform:
To play audio files in your response, you use the
$audioPlayer object and its
play() function has the following parameters:
||The url to the hosted mp3 file||string||yes|
||The number of times the file should be looped||number||yes|
To add a card to your response use the
showStandardCard() function has the following parameters:
||The body of the card||string||yes|
||Either an image or an array of images||image||image||no|
||Tag of the image||string||no|
||The url to the hosted jpg or png file||string||yes|
Incoming requests from Twilio Autopilot don't specify wether the request is from a new session or an existing one. Parts of the Jovo functionality depends on that information, e.g. the
If you want to use these features, you have to save the session ID in the database. You can do it by adding the following configuration to your project:
After that, entries in your database will have the following schema: