Chapter 4 — Step by step guide to creating a Chatbot using IBM Watson
Here we are going to develop a chat bot using IBM Watson service and integrate it with Facebook Messenger. It is a 3-step process.
Step 1: IBM Setup
At first, we need to login to IBM console using the link https://console.bluemix.net/
Go to catalog, select AI and then Watson-Assistant (formerly Conversation)
Give Service name as DIGIOTAI-DICEBOT
Choose region: London
Select a resource group: default
Pricing Plans: Lite
Click on Create
Now click on Launch tool
Click on Skills
Click on Create new and name it as
Name:DIGIOTAI
Click on Create
Now choose Intents (Intents are the user queries for which bot replies.)
Click on Add Intent
Intent name: #Greeting
Add User examples(queries asked by user) as
- Hi
- Hello
- What’s up
Similarly add other Intents
Intent: #Service
Add User examples:
- I want to know the services provided by DIGIOTAI solutions.
Intent: #IOT_Service
Add User examples:
- Can you provide more details about IOT services?
Once all Intents are ready then go to Dialog
Click on Create new
Click on the three dots in welcome node
Choose add node below
Name the node as Greet
In the section If assistant recognizes:
Choose #Greetings
Then respond with
Choose text
Enter response text as
- Hello, this is DICE-BOT powered by IBM Watson. Welcome to DIGIOTAI solutions. How can I help you?
Now click the 3 dots in Greet node and select add a node below
Name the node as Services
In the section If assistant recognizes:
Choose #Services
Then respond with
Choose text
Enter response text as
- We provide services around:
1) IOT
2) Datascience
3) Blockchain
4) AR-VR-MR
5) Cognitive & AI
Now click the 3 dots in Service node and select add a node below
Name the node as IOTService
In the section If assistant recognizes:
Get DIGIOTAI’s stories in your inbox
Join Medium for free to get updates from this writer.
Choose #IOT_Service
Then respond with
Choose as text
Enter response text as
- Thank you, your request has been sent to info@digiotai.com. You will get a reply soon.
Once you are done with dialog creation go to step 2
Step 2: Creating a Facebook Messenger App
Login to https://developers.facebook.com/
Now select My Apps then Add New App
CreateNew App ID window will be displayed
Display Name: DIGIOTAI
Contact Email:keep it as default
Click on Create App ID
Complete security check and click on Submit.
Step 3: Integrating IBM Watson Chatbot with Messenger
Go to the Skill we built in Step 1
Click on deploy
Choose Add to an assistant
Create new
Name: DIGIOTAI
Click on create
Choose add existing skill
Select DIGIOTAI skill we created in Step 1
Under Integrations choose Add integrations
Choose Facebook Messenger
Now we need to fill the Configuration for Facebook Messenger
Step 3.1: Application Secret:
APP Secret Key:58eb675219a5498f5412338057b2da69
Go to Messenger App (DIGIOTAI) and click on settings then basic a window will be displayed where we can find the APP Secret Key.
Step 3.2: Page Access Token:EAAFgi4tgzC8BAAQMqgyMoGxYQ4VG6gXGpPrZBRk3rtvWrOzahglKJv7AVNmFeSriWBjv3XsuCFFxEB4P09wGZCn8L6XMMSVZBv7cjg1gCOPFNhQhVjJH41oTX6npbxKzM6Ry3ZAuwsZAnHWkw8gwwZB0UY46eAD1WgYZBtuXzygawZDZD
Go to Messenger APP and click + symbol next to products and choose setup Messenger icon.
Go to Token Generation
Select DIGIOTAI Solutions Pvt Ltd. page from drop down menu then a token will be generated
Verify Token: hello
Step 3.3: Generate callback URL
Click on generate call back URL
Once it is done, a call back URL will be generated which is used for configuring messenger webhooks.
Now we need to setup webhooks
Go to Messenger APP (DIGIOTAI) and choose Messenger then scroll down till Webhooks
Choose setup webhooks
Fill the following details in the window
Call back URLhttps://assistant-facebook-eu-gb.watsonplatform.net/public/message/a1fd2afa-dbdb-4e76-8dfe-0b6cd75fb321
Verify Token:hello
Subscription Field:
Messages
Message_deliveries
Messaging_postbacks
Message_reads
Messaging_optionss
Click on Verify and Save
After that page will be refreshed and webhooks verification will be completed.
Now we need to select the page DIGIOTAI solutions Pvt Ltd. from the dropdown menu
Click on subscribe.
Now DICE-BOT is ready to reply to DIGIOTAI Solution Pvt Ltd 's customer queries.
Video Narrative of the above process flow is listed below:








