logo ausum cloud

How to build a chatbot for e-commerce in Azure

Ausum Cloud Chatbot

Ensuring a good shopping experience is key to guaranteeing the success of an online store. More and more customers are demanding a fast, efficient and automated service that allows them to shop hassle-free and at any time of the day.

Chatbots help to resolve issues, recommend products, manage orders, schedule deliveries and even offer technical support thanks to artificial intelligence software. In recent years, they have become a key element in the digitalisation of companies.

The architecture of a chatbot for e-commerce

Thanks to chatbots it is no longer necessary to have a customer service department available 24 hours a day. We will analyse the architecture of a chatbot and how to create one following Microsoft Azure guides.  

A bot is an application that users can interact with through text, picture or voice messages. Normally, the customer accesses the chatbot through a mobile application or a website which allows them to request information about a product or perform an action (for example, make a purchase).

Cognitive services process the natural language request to understand what the customer needs and to generate a response. When the customer is satisfied with the results, the requested action is performed. In the Microsoft Azure system the following elements and components, among others, come into play:

  • App or website: allows the user to access the chatbot.
  • Azure Active Directory B2C: allows the user to be authenticated.
  • Cognitive services: they process the natural language request through intelligent algorithms able to see, listen, speak, understand and interpret the users’ needs.
  • SQL database: database where the bot adds or updates information related to the action performed.
  • Azure Monitor: compiles, analyses and manages telemetric data to improve bot development.

Creating a chatbot step-by-step with Azure Bot Service

Azure Bot Service provides the main components to create bots, including the open SDK code to connect the bot with devices and channels. The first step is to create the new bot resource:

  • Log in to the Azure portal (you must have an account).
  • Select Web App bot in the “Create a resource” section, “AI + Machine Learning” section.
  • Provide information about the bot, as Microsoft recommends on their website.
  • Create the bot and confirm that it has been deployed through the notifications (these must be activated and will change from “Deployment in progress…” to “Deployment successful”).

After these steps, it is time to test the bot. To do this, Azure uses the Test in Web Chat tool (in the Bot Management section), where you can write a message. If the bot has been successfully installed, it should respond.

If you wish, you can download the code to work locally and develop the bot on your computer. This can be done through the Bot Management section, selecting Build and then Download Bot source code. To then upload the code to the Azure portal, it is recommended to follow the Continuous deployment settings instructions, to update the code automatically.

Once this is done, the chatbot is ready to start working and ensure a better customer experience on the online store.

Images | Unsplash/Austin Distel