Low code Chatbot from Watson Assistant integrated with Twilio

Standard Post with Image


Low-code chatbot from Watson Assistant integrated with Twilio

Enterprises rank customer experience as one of the prime differentiators towards their competitive advantage-building initiatives. It is also a way to define and differentiate their brands, as well as build and maintain a loyal customer base. However, this comes with another inevitable factor of cost affecting the Return on Investment (ROI). IBM Watson claims to achieve a return on their virtual agent investment by providing customers with fast, straightforward, and accurate answers to their questions at reduced cost. This effort explores and documents a low-code approach and usage of Natural Language Processing (NLP) techniques hosted on scalable cloud systems integrated with Twilio-based solutions for delivering SMS, WhatsApp, Voice, Video, email, and IoT messages.


Conversational Artificial Intelligence (AI) has become a mainstream capability offering for enterprises where human-digital system interactions occur frequently at work, at home, and on the go. Solutions and tools of this kind in the conversational AI space, known as bots, chatbots, or virtual assistants, are emerging to the next stage, where these bots start talking to each other, too.

Watson Assistant is IBM's chatbot with the capability of interacting with business systems using natural human languages. Watson is a combination of a technically robust conversational platform with developer and line-of-business (LOB) tools serving a broad scope. This facilitates enterprises to build and train low-code AI solutions to serve a wide range of use cases across applications, devices, and channels.

IBM Watson Assistant is a cloud-based AI solution that allows one to create, train, and deploy chatbots with very little or no technical knowledge. The user-friendly interface makes it simple to construct dynamic dialogue flows.


Create a Chatbot

Go to and log in. Make an account with your email address and a password. A screen similar to this will be visible.


Enter the details such as Assistant name, Description, Language and click on Create assistant. Assistant is created successfully after this step.

Then a screen similar to this will be visible.


Click on Actions in the menu bar


A screen similar to this will appear.


Click on “Create a new action.” Initialize the new action as the example below and click on save.


Now the new action is created to pay the credit bill. Now type the conversation in the "Assistant Says" dialog box; in this example, it is "What type of transfer would you like to make?"


Then define the customer response; click on ‘Options’.


Then a screen similar to this will be visible.


Type the Options as required, In this example it says “Saving , NEFT, UPI”

Click on Apply after setting the options.


Now click on ‘New step’ to add another step to the conversation.


Type the text "When would you like to do this transaction?" in the ‘Assistant’ to be displayed next. In the "Define Customer Response" set, set the response type to Date. The result after adding new step is as follows.


Again, click on New Step to add another step to the dialogs.

Type in the "Assistant Says" box, "Please enter the amount."

Set the Define Customer Response as Currency type.


The screen looks similar to this after this step.


Create a new step and type the message in the "Assistant says" box. In this example, it is "The amount has been successfully transferred."


As this is the final step, select the option in "And then" to end the action, as shown in the example. Now, go back to the home menu and select the "Publish" option.


Now click on the “Publish” option


Now go back to the home menu and press “Preview” option.


A screen similar to this will appear.


Copy the link given in the box and open it in a new browser. Here you can test your Chatbot.


Thus, we have successfully deployed our first chatbot.


Twilio's programmable application programming interfaces (APIs) are a set of building blocks that enable developers to create the exact consumer experiences they need.

Throughout the customer experience, Twilio can be used to deliver SMS, WhatsApp, Voice, Video, email, and even IoT. All you have to do now is incorporate its API into your application.

Create a Twilio account using your email address, and copy the Account SID and Auth token from the Account settings.

On the IBM Watson Assistant Home page, select the option 'Integrations' from the menu. In addition, select the 'SMS with Twilio' option.


Integrate the chatbot from this option, giving the details previously collected from the Twilio account: Account SID, Account Token, and Phone Number. Click Next, and then finish integrating with Twilio.


Install the required libraries using the pip package manager. Using python version 3.5

pip install --upgrade ibm-watson

pip install --requests>=2.0

pip install  --dateutil>=2.5.3



To get started, go to the IBM Cloud Dashboard page.

In Watson's service, in the left menu bar, select Manage Users and go to the     Identity and Access Management.

In the Users tab, click on Create an IBM Cloud API key.