Recently one of our customers in Australia came to us to solve a problem that they were facing in the support department. They receive a lot of support requests daily. The solutions for most of these requests are already available in the user manuals, support site, and other materials to which the customers have access. Since many of these requests are easy to fix it’s a struggle to invoice the customers properly. Also, a lot of support staff is needed to meet the demand. Our client wanted us to come up with a solution to this problem.
We looked at the following parameters to suggest a solution.
The channels of support request
The volume of resources (support documents)
Based on these facts we decided to organize the resources in a manner that a customer would be able to find out the answers using one of the above-mentioned mediums without having to contact the support staff.
We proposed an intelligent Chat-Bot that will be deployed on Microsoft Teams and in their Help Desk system. So, the customers would first chat with the bot and the bot would analyze the available resources for possible solutions. If the Chat-Bot failed to respond positively then, it would create a support ticket and assign it to support staff.
We then looked at the tools that we can use to develop our Chat-Bot. There are plenty of resources out there but, we felt the suite of tools provided by Microsoft are more reliable and easy to use. Microsoft has invested a lot in AI and Natural language processing and has come up with several tools that are ideal to build an intelligent Chat-Bot. Also, it’s easy to test and deploy these tools because of the integration with Azure.
QnA service extracts question and answer pairs from the content that you upload. The content can be uploaded as URLs, PDFs, Excel files, SharePoint documents, and many more.
Adaptive Card is an open-source toolset that helps apps and services exchange rich snippets of native UI.
Microsoft Teams is a unified communications platform that combines persistent workplace chat, video meetings, file storage, and application integration.
Azure Cosmos DB is Microsoft’s globally distributed, multi-model database service. With a click of a button, Cosmos DB enables you to elastically and independently scale throughput and storage across any number of Azure regions worldwide.
The ChatBot uses QnA service to query the proposed answers for customer queries. We have used Cosmos DB to store the chat session and related data. It’s deployed to Microsoft Teams as a plugin and is available on the support site as a widget.
Once a user enters the chat room in Microsoft Teams he would be initiating a chat with the Bot. The rest of the flow is as follows,
We first created the repository using all the documents, manuals, and URLs. The QnA service allows us to import these different types of resources and generates question and answer pairs. Also, we can extract multipart answers as well so that when a customer asks a question it will be able to refine the answers by giving options.
We first set up the knowledge base in the QnA maker. Go to https://www.qnamaker.ai/ and click on Create a knowledge base. You must go through 5 steps to set up the knowledge base.
Once the QnA maker is set up it gives us an interactive window to test the chat. Also, we can build a tool to train our Bot using the Train API. In the process of setting up QnA, we need to set up a QnA service in Azure as well. This is an app service where the Bot will be deployed and hosted.
Go to the Azure dashboard and set up Cosmos DB instance.
Bot app is a .Net Core Web API project. Hence, it has the same structure as a Web API Project. The Bot client communicates using JSON.
The request is received by the BotController and passed over to Microsoft.Bot.Builder.IBot instance. This configuration is added in the startup.cs as follows,
The IBot instance has three delegates,
This delegate is triggered when a new chat window is created. This is the delegate we use to send a welcome notification to the user.
When implemented in a bot, handles an incoming activity.
This is the delegate that is triggered when a message is sent by the client to the bot.
In our application, we identified 4 chat states which are,
This is the initial state. User information is when we capture the user’s name and email and show a welcome message.
Chat information is when we capture user’s requests and send the data to the QnA service. The QnA service would return either response or prompts. This goes on until the user receives the answer he is looking for or he decides to create a support ticket.
User feedback is when we capture whether the user’s request was answered properly or whether a support ticket needs to be created. When the support ticket is created we log the entire chat history in the ticket.
The support ticket is the step of creating a support ticket in the ticketing system( https://www.servicenow.com/) based on user feedback.
Source code can be downloaded from here. Once you download the source code you should do the following.
#Chatbots #Azure #Luis #Microsoft Bot Framework
Authored by Pragash Rajarathnam @ BISTEC Global
We are here to help and support you.
If you believe that we can help you or your businesses requirements - do feel free to drop your details here and don’t hesitate to give us a ring.
Connecting with us on LinkedIn works best.