The 2019 Complete Guide to Chatbots

Chapter 4


<<Previous  | Table of Contents | Download the Chatbot Guide | Next >>


How to Build a Chatbot?

For a basic bot, there are three types of agents needed:  A support agent, a FAQ agent, and one or more conversational agents.

Support agent:  This agent handles all the basic questions such as “Where are you located?” or “What is your billing phone number?” A more complex support agent would answer questions like “What software do I use for product X?” or “How do I add XYZ feature to my ABC product?”  Support agents often have sub-intents for each product or service.

FAQ agent:  The FAQ agent answers all the general questions from a user. The questions may be from prospects or customers. The FAQ agent is not as detailed as a complex support agent, but it quickly answers the question or points the user to a page or a document that has the answer.

Conversations:  At least one conversation is needed just to introduce the chatbot to the user and ask how it can help. For leads and sales, a decision tree of questions is asked to either point the user to the right product or service, or to make the user understand the value of the product or service, gather contact information or make a purchase. In many cases, you will have different conversations on different sections of the site.

Here are two examples of where a conversation can be used.

  • If you have two products that serve five different industries, you have to ask which industry they are in, and provide the benefits and features for that industry.
  • If you are trouble shooting a support question, you must have some basic facts such as what product they have now, if they are using a Mac or PC, what browser they use, etc.

Here are the first three steps in creating the chatbot conversation.

  1. Draw a thought bubble diagram of all the types of conversations that would happen on the site.
  2. Create a spreadsheet that has a list of questions and answers along with button options and their actions. This will replicate the scenario of a customer talking to a salesperson. Start with the most common questions. Over time you will see questions that you did not think of, and you can add those questions to the spreadsheet.
  3. Think about how each question can be asked by the user. Break out each question into 15 to 20 different ways it could be asked. You can use wildcards to make this easier.
  4. Enter the questions and answers into the chatbot platform and test each question.

How to Build a Chatbot

Building a chatbot does not have to be overly complex, but it does require a little forethought. We will show how to build a chatbot in a step by step process.

Step 1 – What is the purpose of your chatbot

Chatbots have a number of purposes such as:

  • Lead generation
  • Sales, online and offline
  • Improving usability and navigation of the site
  • Gaining insights
  • Support

The conversation and call to action for each of these is different. You can have all of these conversations happening at once. Each conversation would be scripted differently.

To understand how well the chatbot is working, determine what metrics you will watch. Note that all data is collected from the conversations. This means if you forgot to include a product or service, users will ask for it. You will also gain insights on what users are asking.

Step 2 – Create a bubble diagram of conversations

The architecture of the chatbot has many tangents and sub-topics just like typical conversations. A quick way to organize this is to create bubble diagram showing different conversations and if they are connected. Here is an example of a bubble diagram.

how to build a chatbot bubble diagram
Here is an example of the question and answer spreadsheet:

Question Answer Button Action
What is your phone number Our number is 123-1223-1223
Do you sell cars? Yes do you want 2 wheel drive or 4 wheel drive? 2 wheel Go to URL…
4 wheel Show text….

The next step in a chatbot conversation is to create a default introduction question. The default introduction question is like a website homepage where users see the same information each time they visit. The default question affects the conversion rate and the effectiveness of the chatbot. Without a good intro question, users will not engage with the chatbot.

Let’s say you own a flower shop. What is a typical conversation that a flower shop has with its customers? Here is an example:

Option one:

Hi, I am a chatbot. What type of flowers are you looking for?

  • Roses
  • Lilies
  • Asters
  • Carnations
  • Tulips

The user clicks on the type of flower they want and the chatbot directs them to a page where they can order it. The chatbot can also ask a qualifying question such as color before it redirects the user to the website.

Option two:

Hi, I am a chatbot. What type of event do you need flowers for?

The chatbot listens for specific words such as a wedding, funeral, graduation, performance, etc. When the chatbot hears that flowers are needed for a wedding, it responds with:

Great! I love weddings! How many flower arrangements are needed for the wedding? The chatbot will ask more questions such as:

Does the bride want wrist corsages or lapel corsages?
Is the bride carrying a bridal bouquet?
What types of flowers does the bride like?
What are the wedding theme colors?

Then the chatbot can offer suggestions based on these answers, such as what type of flowers look good in a bridal bouquet based on the wedding theme colors.

Option two represents a consultation type of sales experience where you want to understand the customer’s wants and needs, and provide information and suggestions that are relevant to the conversation.

Within the default question, there will be intents that are specific to the question and other intents that are global. Determine what intents are specific to this conversation.

Chatbot Structure

This is a good time to take a tangent and explain how chatbots work.

Chatbots are trying to understand the “intent” of what the user is talking about.

Intents have two components:

Listeners – Listeners are keywords and phrases that trigger when that particular term is detected. Many listeners are already preprogrammed and are constantly being improved so you only have to think of the listeners that are relevant to your business. The keywords can use regex (a regular expression) logic such as:

word|words – list of words

^word – must begin with this word

\b word \b – must contain this phrase

A regular expression (regex) is a special text string to describe a search pattern. A regular expression is like an amplified wildcard.

intent-listeners

Replies – Replies are the action that happens when the intent is triggered. There are a number of reply options which can be combined.

  • Connect to a question
  • Provide a text reply
  • Provide a button with a link
  • Show an image or video

intent-actions

Intents can be global or specific to a question. If the chatbot does not understand a question, an intent is triggered to reply with your fallback question as a last resort. There are other logic options such as “stay within this conversation.”

Step 4 – Outline your questions and conversational logic

Often there is additional conversational logic after the default question.  For example, if your first question is, “Are you interested in a car or a truck,” there would be additional questions for each type of vehicle. Some questions are general like budget, and other questions are specific like truck bed size, number of passengers, sports car or mini-van. Remember each of these conversations can have their own unique intents.

Step 5 – List your global intents with common questions and replies

Many of the global intents are commonly asked questions or FAQ’s that could happen at any time in a conversation.

For example, in a support conversation, the customer may suddenly ask for a phone number. In this case, the support number is given. If the customer was not in support and asked for a phone number, then the reply would list different department phone numbers (sales, support, billing…).

FAQ’s can also be set up using a Virtual Assistant. If the Assistant cannot answer the question, the user is directed to a specific page or referred to live support. The user’s questions are collected for future analysis, which is valuable for sales and marketing efforts.

virtual-assistant

Step 6 – Determine your variables and call to actions

Variables allow a faster creation of intents. A typical variable would be a phone number, email address or contact us URL. You can also have full sentences which are often the same as a call-to-action such as “to learn more call 800-700-8077.”

To use a variable just type {{phone}} or {{email}} or {{contact us}} in the reply message box. When that intent is activated, the phone number or email address is automatically added to the reply message.

In the following examples, we show you how to create a chatbot using the Ometrics Ochatbot
program.

variables

Step 7 – Build your default question

Now you are ready to start building your chatbot. The following example is using the Ochatbot tool. First, determine how the chatbot will engage with the user. Do you want the default question to show first followed by a simple “how may I help you” on the home page? Another option is to ask a different default question on a different page or section of the site. When you first create your Ochatbot, a series of questions will prefill your default question, variables and other main intents.

You can adjust the presentation of the chatbot window in the settings section. Below is a partial screenshot of the settings section.

settings

Other settings such as colors, window sizes, chat icon can also be edited here. Below are a few of the options.

settings2

In the trigger section, select how you want the chatbot to trigger for desktop and mobile.

triggers

In the questions section, select the question you want to be the default question. The default question will show after the introduction text, depending on your settings. To switch to another question, assign the new question as default by clicking the checkbox.

questions

Step 8 – Build other questions and conversational logic and intents

Below the question section, you can add specific intents that are associated with that specific question. Once intents are built, you can drag them over from the list on the left and edit them specifically for that question.

available-intents

Step 9 – Build global intents

A global intent is an intent that listens all the time including inside an unrelated question or conversation. Global intents are prioritized after the current conversation intents.

global-intents

Step 10 – Call to Action for Lead Generation: Lead Forms and Surveys

Websites have a call to action and a chatbot is no different. You want to collect information about your visitor such as their name and email address. A lead generation form inside the chatbot casually asks your visitors for their contact information and allows them to enter their question. After the user has submitted their answers, the chatbot confirms that the information is received and a representative will respond.

lead-form

Another way to gather user information is setting up a survey within the chatbot, which engages users in a conversational way without them knowing they are taking a survey.

survey

Step 11 – Hitting the rails

Hitting the rails means the chatbot does not understand the question and the reply goes to a “fallback” intent. Determine how you want to handle these types of errors. You can have text, another question or point them to live chat. Be creative in your response and make it fun.

Always test in real time as you add your questions and intents.

hit-the-rails

To learn more, you can read this blog post on How to Build Chatbot. There are also more details in the PDF version of this ebook.


 <Previous  | Table of Contents | Download the Chatbot Guide | Next >>


Follow Me

Greg Ahern

Greg Ahern Founder and President of Ometrics® is a fanatic about conversion rate optimization, AI chatbots and lead generation. Greg has been a successful Internet entrepreneur since 1994. He speaks at conferences and webinars and has built a number of internet businesses, including web marketing, web development and internet lead generation, which have been successfully acquired. Greg is the Denver Chapter Leader for the Digital Analytics Association. You can follow Greg on Twitter @gregahern and join his CRO Hacks Groups on Facebook and Slack.
Greg Ahern
Follow Me

Latest posts by Greg Ahern (see all)