Complaint through Facebook
Facebook Reservation Fulfillment to Slack channel
Small restaurant owners have so much on their plate, literalty. That's why we are building a voice and text chat bot and connecting it to a phone system that greets and answers questions on the their behalf.
Customers can communicate with a restaurant through:
- Phone call
Slack is mostly used for fulfillment, where reservations and complaints are sent to reservations and complaints channel (which should be private)
The video above is NOT a demo. Here is a playlist of a practical demo that walks you through different scenarios. https://www.youtube.com/watch?v=Bq_vR_40xr8&list=PLCFG4vqMIVWCYyWnE0bcckVLwONVc6Ybc
The repository contain temporary username/password to access the bot and other related resources.
What it does
WavyBot is a restaurant assistant that can answer customers' questions, reservation requests and complaints. Restaurant owners have so much on their plate, literaly! WavyBot is built with AWS Lex to bring the power of AI to restaurant of any size.
When a customer tries to reach a restaurant either through Phone, SMS, Facebook or Slack, WavyBot will understand user request based on the configured intents:
How We built it
We initially split the work, where one focused on integrating Lex with phone calls, SMS, Facebook and slack while the other focused on implementing functionality in Lex, Lambda and DynamoDB.
We built WavyBot with the following AWS Services:
- Lex (Build intents and conversational model)
- Lambda (Handle Lex intents, fulfill reservations and complaints)
- DynamoDB (business information, reservation & complaints)
- Cloudformation (Build all resources)
To create a complete experience to restaurant owners we integrated with the channels they are usually reached at:
- Phone Number (through WavyCloud which uses Twilio to power its phone service for both Voice and SMS)
- Facebook (Lex Channels)
- Slack (Lex Channels)
Challenges we ran into
- Integrating a phone system to work with Lex took long time. We tried different service providers to find that Twilio has the most responsive speech recognition (We tried Tropo, Nexmo, Bandwidth and Twilio)
- Using Lambda to Interface DynamoDB with Lex to prompt the user when an invalid input was given
- There was no way to accept a sentence in Lex, so we ended up using an empty custom slot type
- Turning the hours into being grouped together and played back in a way thats nice to the user was tricky
- Debugging Lambda functions by looking at Cloudwatch logs was painful. Eventually, we started testing functions locally after understanding input format from Lex
- Conclusion statement didn't work as expected and we had to add the message in Lambda
Accomplishments that we're proud
- Building a system that can helps restaurant owners run their business more professionally and effectively
- Integrating phone calls into Lex which is not a standard inegration
- Configure and create Lex Chatbot programatically using boto3 rather than manually creating it in the Console (we hope to see Cloudformation support)
What we learned
- AWS Infrastructure and how to create resources without AWS Console using AWS CloudFormation
- Lex concepts (intent, utterances, slots and channels)
What's next for WavyBot
We would like to explore more of what AWS Lex provides:
- Response Cards
- Versioning and aliases
- Generating voice using SSML to add voice personality to the bot
WavyBot will be integrated and provided for free to business owners who wish to serve their customers through Facebook. We will continue to integrate with social media channels where restaurants' owners are present.
Premium integration will be provided for Restaurant who wish to have their phone system on the cloud using WavyCloud.