DEV Community

Cover image for Building a chatbot🤖 with Watson Assistant to automate online shopping
Ivana
Ivana

Posted on • Edited on

Building a chatbot🤖 with Watson Assistant to automate online shopping

During the pandemic, online shopping experienced explosive growth. Chatbots and automation have quickly become key technologies in helping the companies meets their customers needs during these difficult times.

What is a chatbot?

As per definition, a chatbot is a computer program that uses AI and natural language processing (NLP) to automate responses to user queries, simulating human conversation. Chatbots are some of the most exciting new tools in the customer experience environment.

I recently attended IBM worksop to build an AI-powered back end system that can take the daily essentials orders through an online mode and set up automated order processing & inventory management system using Watson Assistant & IBM DB2.

Alt Text
The idea is to have the system processes the incoming text requests by converting them to formatted orders lists. Then, this system can be connected to the inventory database for optimizing supply chain management. This solution can be applied to different inventories, for example grocery shopping, any kind of online orders and online shopping which is expanding due to pandemic.

Steps to follow:

Let's get started with following steps:

Step 1. Create an IBM Cloud account

IBM Cloud account: Create an IBM Cloud account.

Step 2. Clone the repo

Clone the repo locally. In your terminal run:

git clone https://github.com/IBM/online_order_processing_during_pandemics

Enter fullscreen mode Exit fullscreen mode

Step 3. Setup Watson Assistant

Create Watson Assistant service, in Watson Assistant resource page click on Service credentials and create New credential and import the skill in Watson Assistant resource page, by clicking on Manage and Launch Watson Assistant:

The following step would be to create or import the skill. Navigate to the folder assistant_skill in the repo and download the file by name Order_Processing_Skill.json into your local system, this is how it looks:

Alt Text

The skill created includes defined Intents, Entities & Dialog flows which can be ingested into any Watson Assistant service.

We need to click and select the file Order_Processing_Skill.json and hit Import, and make sure that JSON file must be an actions skill.

Alt Text

Once imported, we can review the Intents, Entities & Dialog options.

Alt Text

Step 4. Setup IBM Db2 and Create a Db2 service.

Click on Service credentials and by clicking New Credentials generate it.

Alt Text

You need to add the Credentials to the Application, Open the watson-assistant-credentials.json file in the repo and add the following: Watson Assistant apikey, url and the assistant-id.

Open the ibm-db2-credentials.json file and paste the Db2 Credentials and save the file.
Alt Text

{
    "apikey": "<YOUR_API_KEY_HERE>",
    "url": "<URL_HERE>",
    "assistant-id": "<ASSISTANT_ID_HERE>"
}
Enter fullscreen mode Exit fullscreen mode

I want to share some resources with you so you can Get the detailed instructions-click here or watch the workshop-recording.

To connect with me please check my Github, LinkedIn or Twitter.

Thank you for reading!

Top comments (2)

Collapse
 
devashishmamgain profile image
Devashish Datt Mamgain • Edited

great article @ivana
what did you use to deploy IBM Watson to your website?
we have developed an integration with IBM watson chatbot, would be great if you can try and give your valuable feedback kommunicate.io/blog/ibm-watson-cha...

Collapse
 
ivanadokic profile image
Ivana • Edited

@devashishmamgain this is great!

Some comments may only be visible to logged-in visitors. Sign in to view all comments.