Building a chatbot🤖 with Watson Assistant to automate online shopping

ivanadokic

Ivana

Posted on November 23, 2020

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!

💖 💪 🙅 🚩
ivanadokic
Ivana

Posted on November 23, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related