E-commerce Bot | Part 3 | Planning and Designing the Bot | Microsoft Bot Framework

In this bot series, we will create an E-commerce bot for one of the Chocolate Store “Naami Chocos“. This bot will have the following functionalities –

  1. Authentication
  2. Add to Cart
  3. Payment Integration
  4. FAQs using QnA Maker
  5. Connect the bot to the Facebook page

In this part, we will be planning and designing our bot before starting the implementation. Design and Planning in the initial stage help to get a clear picture of the project we are going to build.


Following information we will obtain in this phase –

  1. Features to Implement
  2. Design Detail

Below is the high level flow chart that we are going to follow in our Bot implementation.

Design Detail

The above functionalities will be created in their respective dialog classes. Let us go into detail about these features. Most delivery service maintains a database to keep all the order-related data in it. We will also use the Database.

If you are looking for connecting the bot framework to database, refer to our bot series.


This is the first step we do when the user joins the conversation. In this, we are going to verify the user email with the OTP. We ask the user to provide the email, generate an OTP, and send it to the user using SMTP or any other email service.

We then ask the user to enter the OTP to verify the email. Remember, we are using Bot State. Therefore, asking the email will be only once during the whole conversation.

Add to Cart

In the section, we show the list of all the products to the user and ask them to select one by one. After each selection, we can ask the user if they like to add more products.

At the end of this section, we summarize all the products added by the user. We show these products in an adaptive card carousel along with their images and price tags.

Payment Integration

This part is still in the discussion. We hope to use any payment gateway. We have considered Razor Pay for now. As this is an Indian Chocolate store, we have to look for an Indian Payment gateway only.

Once the payment is successful, we send an invoice to the user’s email and also show it in the chat window.

FAQs using QnA Maker

In this section, we will implement this cognitive service. In the Knowledge Base, we can put some frequently asked questions and show the relevant answer to the user based on the scoring criteria.

Connect the Bot to the Facebook Page

Before we integrate the bot to FB Page, we will have to deploy it in the Azure Web App Bot service. If we are deploying in Azure, then we will have to use a database that is available in the cloud.

Some Other Technology Stacks to be Used

  1. Azure Blob Storage for managing bot state

Thank you All!!! Hope you find this useful.

Leave a Reply

Up ↑