In this chapter, we focus on how we can create solutions using chatbots and look at some best use cases of chatbots. The objective of this chapter is to bring insight to how chatbots are valuable solutions in a variety of situations, such as automating the password reset process, rendering a knowledgeable response, and searching for information. Chatbots are used as solutions to business problems across industries—from call centers to medical practices, from banking to insurance, from IT to manufacturing.
Utility Service Providers
Chatbots can be deployed by utility services such as electric, gas, and water providers to meet customer requirements on time and with satisfaction. With these types of services, customers often raise questions regarding the service, and queries need to be addressed accurately and in a timely manner. In case of a gas bill, consumers often ask why the consumption for the current month is more than the previous month. With regard to the electric bill, consumers might ask why, despite being on holiday for a couple weeks, the electrical bill did not go down. For water services, customers might inquire why the water pressure has been reduced for the past few weeks. To ask these questions, consumers send e-mail, Short Message Services (SMS), write letters, or make phone calls. However, it takes some time before their query is answered.
Insurance Companies
Travel Agencies
Healthcare Industry
Financial Services
Protection against Fraud
If incorrect information is entered, the chatbot can inform the user of this and assign a human banker to assist.
Designing Solutions Using Azure Chatbots
In this section, we design solutions using Azure chatbots. Let’s start with task automation. The task automation chatbot helps users perform single or multiple tasks without any assistance from human beings. This type of chatbot appears in web sites or mobile apps and communicate with users using rich user controls and text. Such chatbots are enabled with NLP understanding to build engaging conversations. Let’s look at a password reset example.
Password Reset Use Case
Adam: Hello, Bobby! How can I can help you? Choose one option.
Password reset | Need help desk contact number | Need LAN cable
Bobby: Password reset
Adam: You request has been processed successfully.
Adam: Use Test123 as a temporary password. You will be asked to change your password after you have logged in using the temporary password.
Adam: Have a good day.
Bobby: Super!
Some might ask: If a chatbot resembles a mobile app or web site, why not just build the web site or mobile app instead of a chatbot? Building a mobile app or web site instead of a chatbot is a choice made by an organization. But, if you look at the situation from a design perspective and consider the amount of time and money required to develop the three options, chatbots are much cheaper and may not require a complex design. Furthermore, chatbots can be made available in a web site or mobile app to create a conversational experience with the user community. As mentioned previously, you can do this using the Microsoft Bot Framework direct-line API or web chat control. Thus, chatbots are a simple way to resolve complex problems, such as resolve consumer queries in utility business; manage tasks efficiently in a 24/7, 365-day support services environment, help people file insurance claims with supporting information, get real-time details of flights during travel, schedule doctor appointments, answer health-related queries, reset passwords, and protect against fraud in financial services.
Embed a Chatbot in a Web Site
In general, chatbots reside outside web sites or mobile apps, but there are several examples when chatbots are embedded in web sites or mobile apps so that users can seek information in the most efficient way. Sometimes, as a result of the complex structure of a web site, users are unable to find the information they need. Using a chatbot, however, they can engage in a useful conversation to get information. As we have seen, chatbots can resolve simple issues and hand off more complex issues to human agents. In this section, we look at the integration between chatbots and web sites, and the process of using back-channel mechanisms to facilitate communication between chatbots and web pages. Microsoft provides two ways of integrating chatbots with web sites: Skype web control and an open source web control.
Skype Web Control
The Skype web control is essentially a Skype client in a web-enabled control. Built-in Skype authentication enables the bot to authenticate and recognize users without requiring the developer to write any custom code. Skype automatically recognizes Microsoft accounts used by its web client.
Skype web control acts as a front end for Skype, and the user’s Skype client automatically accesses the full context of the conversation, facilitated by web control. Even after a browser is closed, the user may continue to interact with the chatbot using the Skype client.
Open Source Web Control
An open source web chat control is based on ReactJS and it uses a direct-line API to communicate with the Microsoft Bot Framework. The web chat control provides a blank canvas for implementing a web chat, allows full control over conversational behavior, and offers a good user experience. Through back-channel mechanisms, the web page hosting the control communicates directly with the chatbot, which is invisible to the user. This capability enables a number of useful scenarios. For example, the chatbot can send relevant data to the web page, such as the user profile, and can send commands to the web page.
The web page can send relevant data, such as a GPS location, to the chatbot.
The web page can advise a user to a perform an action, such as select an option from a drop-down menu.
The web page can send an authorization token for the logged-in user
Back-channel Mechanism
As we just saw, an open source web chat control communicates with chatbots using a direct-line API, which allows an exchange of activities between the user and the chatbot. A common type of activity is messaging, and typing indicates that a user is typing or the chatbot is working to compile a response.A back-channel mechanism can be used effectively to exchange information between client or user and chatbot without actually presenting it to the user.
Embed a Chatbot Inside a Mobile App
Native mobile app : A mobile app created using native code can communicate with the Microsoft Bot Framework using a direct-line API or by using the REST API or web sockets.
Web-based mobile app : A mobile app built using web language and frameworks can communicate with the Microsoft Bot Framework using the same components as a chatbot embedded in a web site, which is encapsulated within a native app’s shell.
IoT App
An IoT app can communicate with the Microsoft Bot Framework using a direct-line API. It can also use Microsoft Cognitive Services to enable capabilities such as image recognition and speech.
Design Knowledge Chatbots
Knowledge chatbots are chatbots that provide knowledge-based responses to user queries. What will be the weather in the city next week? Which is the nearest coffee shop to my house? Which hit film is available in the nearest movie theater? Does my credit card offer access to the lounge facility at the airport? If a chatbot is designed to answer these questions, it is a knowledge chatbot. Knowledge chatbots are smarter and more powerful compared to FAQ-based chatbots, which are designed to answer with predefined replies. Regardless of their design, chatbots pull information from various relational databases and present it to users in an understandable format.
Search Using Chatbots
Using Search to Guide a Conversation
If there is a motivation to build chatbots to enable basic search engine functionality only, then there is no requirement for a chatbot. A conversational interface offers multiple benefits that users cannot get from a typical search engine using a web browser.
Azure Search
Transitioning Conversations from Bot to Human
In the last section of this chapter, we look at the situation when it is necessary to transition conversations from bot to human. Regardless of how smart you develop your chatbot using AI, cognitive services, and NLP, there are times where human intervention cannot be prevented.
Triage
In this situation, the chatbot provides a response to the user queries and later collects user data such as name, e-mail address, and any pertinent information related to the queries, then stores it in a database to transition conversation control to a human agent. Using a chatbot to triage information helps human agents work on the complex task to be addressed.
Escalation
Typically, in a help desk scenario, a chatbot may be able to answer basic questions and tend to trivial issues while performing simple operations such as resetting a user’s password. However, in a situation when the user issue appears to be complex and the chatbot is unable to manage it, a human must intervene. In these situations, the chatbot must understand the set of issues it can fix and those it cannot fix and thus requires a human agent. There are multiple ways chatbots determine that they need to transfer control of the conversation to a human.
User-driven Menus
One of the simplest ways for chatbots to handle user dilemmas is to present users with a menu of options from which they can select. Tasks that the chatbot can handle independently appear in the menu, along with a link labeled “Chat with an agent.” This implementation does not require advanced machine learning or natural language for understanding. The chatbot simply transfers control of the conversation to a human agent as soon as the user selects the “Chat with an agent” option.
Scenario Driven
The bot may decide to transfer control based on whether it determines it is capable of handling the scenario. The bot collects some information about the user’s request and then queries its internal list of capabilities to determine whether it is capable of addressing that request. If the bot determines that it is capable of addressing the request, it does so; if the bot determines the request is beyond the scope of issues it can resolve, it transfers control of the conversation to a human agent.
Supervision
In some scenarios, human agents prefer to monitor the conversation between the user and the chatbot instead of taking control. In the situation of a help desk, where a chatbot is communicating with a user to diagnose a computer problem, a machine learning model helps the chatbot determine the most probable cause of the problem. However, before advising the user to take a specific course of action, the chatbot can privately confirm the identified diagnosis and solution with the human agent, and then proceed with authorization. When the human agent authorizes the solution, the chatbot presents the solution to the user. The chatbot is still performing the majority of the work, but the human agent retains control over the final decision.
Summary
With this, we come to the end of this chapter. We saw examples of chatbots being used in different industries. We also examined how chatbots can be used to automate processes such as resetting passwords, providing useful information, searching using chatbots, and searching with chatbots using information embedded in web sites or mobile apps. Last, we studied when chatbots need to transition conversations to human agents to address complex queries.