CPaaS and Google DialogFlow Ai in Action
Dialogflow is a Google-owned developer tool for human–computer interaction based on natural language conversations. Dialogflow is closely related to Google Assistant, a virtual buddy for smartphones that performs tasks and answers users’ question in a natural language.
Build natural and rich conversational experience
DialogFlow gives users new ways to interact with your product by building engaging voice and text-based conversational interfaces, such as voice apps and chatbots, powered by AI.
Connect with users on your website, mobile app, the Google Assistant, Amazon Alexa, Facebook Messenger, and other popular platforms and devices.
What is Restcomm?
Restcomm is a CPaaS (Communication Platform as a Service) Enabler running in the cloud. It provides a developer-friendly RESTful API (Application Programming Interface) and a no-code visual designer to build real-time Voice, Messaging applications in minutes!
In this tutorial we will show you how easy it is to build SMS Chat bot powered by AI using Dialog Flow and Restcomm Cloud.
What we’re building today is a coffee ordering SMS application powered by Google’s machine learning AI + Restcomm Cloud.
This DialogFlow agent allows your app to help users order coffee drinks, snacks, and other merchandise from a coffee shop.
User: I’d like a coffee to go.
User: Can I get a small iced latte with low fat milk?
User: Two medium cappuccinos please.
User: Can I get three doughnuts please?
User: I’d love to get a bagel with cream cheese.
User: I’m hungry.
User: I would like to order a gift card with $50 on it. User: I’m looking for a present.
To exemplify how this process can be implemented I have divided the architecture into the following components:
DialogFlow and Google setup:
Follow the step-by-step instructions here to setup DialogFlow and clone the quick start Restcomm DialogFlow App
Once you have setup the sample app on your web server of choice, you’re only a couple of steps away from completing the SMS bot by pointing a Virtual Number to the sample app URL.
- Create an RVD application on Restcomm Cloud
2 . Choose Application Type
3 . Provide a description to your newly created Restcomm Application “e.g DialogFlow”
4 . In this step we will configure the application to send the incoming SMS to the Restcomm DialogFlow App and wait for a response. Once a response is received from DialogFlow, we will forward it to the mobile subscriber over SMS.
The Service URL is where we have installed the Restcomm DialogFlow App, and the parameter SMS contains the body of the message, we also setup and configure the Http Headers Authorization Parameter which is required to authenticate the request with the Restcomm DialogFlow App.
To achieve this we will create a custom variable “reply” then send it to the $core_from (original sender) of the message.
5 . All we have to do now is Save and link a phone number to this RVD application
6. Registering a phone number on Restcomm
7 . Linking the phone number to the application
8 . Start a conversation with the SMS Chat bot by sending “hello” to +1602–324–8965, the response you’ll get will come from DialogFlow via Restcomm
Communication service providers CPaaS Enabled by Restcomm can take this sample to demonstrate what CPaaS can do for F&B (Food and Beverage) Enterprises to roll out exceptional two way ordering experience for customers.
DialogFlow comes with many pre-built agents from Hotel Booking to Coffee ordering and simple web search, you can take those sample Ai powered apps and connect to any IVR or SMS flow on Restcomm Cloud.