We use live chat at Twilio for our support and sales departments and customers frequently ask similar questions, so we created TwilioBot in order to answer some of these frequently asked questions.
What it does
TwilioBot is an informational chat bot that queries APIs to answer questions about pricing, documentation, system status and FAQs for Twilio's various products (SMS, Voice, Video, Chat, Authy, etc)
Challenges we ran into
It was sometimes difficult to predict the utterance for a given intent and sometimes lex mismatched utterances to the wrong intent.
Another challenge was to be able to format responses into tables. We achieved this by having our lambda functions return JSON objects.
Slot values were sometimes difficult to parse. For example, sometimes slot values include pronouns, different capitalization, or plural vs singular and we had to normalize these before processing.
It's not possible to rename an intent through the console, so if you need to rename an intent you have to rebuild it from scratch or use the API.
Accomplishments that we're proud of
Integrating AWS Lex into Twilio Programmable Chat. Unlike Slack, Facebook Messenger and Twilio SMS there wasn't any documentation on how to integrate AWS Lex into Programmable Chat and we were excited to make it work.
What we learned
- Shorter utterances are usually more effective
- How to call Twilio APIs from lambda
- How to test lambda functions locally
What's next for TwilioBot
- Allow agents to @TwilioBot while talking to the customer to query information. For example if a customer asks for pricing, an agent could say "@TwilioBot how much does sms cost in Brazil?" in order to render a table of pricing information
- Allow customers to talk to TwilioBot while waiting in the queue for an agent
- Add more intents and refine existing ones. For example, allow customers to specify the # of messages or minutes when asking about sms and voice pricing.
- Use a version of this bot for voice with AWS Polly