Create a cognitive retail chatbot


As a Python developer, you can use this pattern to learn how to add features such as a shopping cart, context store, and custom inventory search into your chatbot. When you’ve completed the pattern, you will understand how to create a chatbot dialog using Watson Assistant, a Cloudant NoSQL database, Watson Discovery, and a Slack group.


Chatbots are a hot topic in the retail industry, but so far the execution has mostly amounted to little more than a novelty experience for customers. Interested in adding a chatbot? In this developer code pattern, learn how you can create an easily configurable, retail-ready Watson Assistant-based chatbot that lets a user find items to purchase and then add and remove items from their cart.



  1. The user writes a message to the slackbot.
  2. The slackbot uses the Watson Assistant service to let users search, add, or remove products from their cart.
  3. The Watson Discovery service provides users with a list of items to add or remove from their carts.
  4. The user and cart data is stored in the database.


Find the detailed steps for this pattern in the README file. The steps show you how to:

  1. Clone the repo.
  2. Create IBM Cloud services.
  3. Get IBM Cloud credentials and add to the .env file.
  4. Configure Watson Assistant.
  5. Configure Watson Discovery.
  6. Configure Slack.
  7. Run the application.