Flows
Flows are a top-level design element that allow you to create a visual representation of a conversation between your bot A software application that handles customer interactions in place of a live human agent. and contacts The person interacting with an agent, IVR, or bot in your contact center.. Flows are a different way to work with your intents. Like stories and rules, flows allow you to design conversations tied to intents that teach your bot how to respond to those intents. Flows take the place of stories Used to train bot for interaction handling based on intent and context and rules Used to define bot's response to messages that don't change with context. in your bot's configurations, so you don't need to create them separately.
Concept | Definition | Example | What the Bot Does |
---|---|---|---|
Utterance |
Anything a contact says in an interaction. Sometimes called a message. |
"I lost my password." "What is my balance?" "Are you a bot?" |
The bot uses Natural Language Understanding (NLU) to analyze each contact utterance to determine its meaning, or intent. |
Intent |
What the contact wants to communicate or accomplish. Every message the contact sends has an intent. |
"I lost my password" has the intent of "reset password". "Hello" has the intent of "greeting". |
The bot analyzes a contact's message using NLU This process expands on Natural Language Processing (NLP) to make decisions or take action based on what it understands. to determine the intent. Once it knows that, it can respond with a message of its own. You configure the response you want the bot to use for each intent. |
Entity |
A defined piece of information in a contact's message. | Person or product name, phone number, account number, location, and so on. | The bot uses NLU to identify entities in a contact's message. Entities help the bot understand what the contact's message means. |
Slot |
An entity extracted from a contact's message and saved for use in bot responses. Similar to a variable. | Creating a slot for contact name lets the bot use that name in responses during an interaction, making it more personal. | When configured to do so, the bot extracts an entity from a contact message and saves it in a slot. You can have the bot use this information later in the conversation. |
Rule |
Defines a bot's response to messages that don't change meaning with context. |
|
Rules are one of two ways you can configure how the bot responds to an intent. Rules are useful for certain kinds of intents, but not all intents. |
Story |
Trains a bot to handle an interaction based on message intent and conversational context. | In an interaction about a forgotten password, the bot would respond to, "How do I do that?" in one way. If the interaction were about creating a new account, the response would be quite different even though in both cases the contact is using the same words with the same intent – to get more information. | Stories are the second of two ways you can configure how the bot responds to an intent. Stories teach the bot how to use the context of the conversation to respond appropriately. |
Bot Action |
Anything a bot says or does while handling an interaction. |
In an interaction about a forgotten password, the bot responds by sending the link to the password reset FAQ on the website. When a contact expresses frustration, such as "I don't understand! It's not working!!!" the bot responds with "I'm sorry. Would you like me to transfer you to a human agent?" When the contact says yes, the bot initiates the transfer. |
Actions are the options you have when defining how you want the bot to respond to each intent. They give you the flexibility to configure each response to achieve the outcome that meets the contact's needs. |
Flow Designer
The flow designer is a dot-grid canvas workspace where you can add contact and bot messages, similar to what you do when creating stories Used to train bot for interaction handling based on intent and context or rules Used to define bot's response to messages that don't change with context.. As you add messages to a flow, they're automatically connected with lines to show the flow of the conversation from message to message.
After each bot response, you can create branches in the conversation by adding one or more contact messages. Each contact message branch represents an intent the contact might introduce at that point in the conversation. This allows you to design a flow that includes the different kinds of requests or responses your contacts make.
For example, if the flow starts with the contact asking about changing their password, the bot can ask if the contact has tried changing the password on the website. You can add contact messages that branch the conversation based on the contact's response to the bot's question.
With each branch in the flow, you can build out the conversation by adding the bot's response and follow-up messages from the contact. You should only add to the conversation in a flow if the messages you add belong in the context of that flow. Learn more about bot context in the following section on this page.
Teaching Your Bot with Flows
Flows teach your bot about the conversational context, or how intents are related to each other. When a flow starts with an intent, the bot learns that subsequent intents can only occur after the initial intent.
For example, a flow starts with the contact message Hi (intent: greeting), which is followed by a bot response and then another contact message. If the second contact message is I need to change my password, the bot learns that the contact can only ask about changing passwords immediately after the greeting intent.
If you want your contacts to be able to ask about changing their passwords at any point in the conversation, a better approach is to create a separate flow for password changes. This is shown in the following image.
Your bot can jump from one conversational context to another depending on the flows you build. Within each flow, only include intents that depend on the context of the flow. If an intent does not depend on the conversational context, consider making a separate flow for it.
Intents that Depend on Context
Some intents might depend on context for the bot to learn how to respond appropriately. For example, with intents for yes or no responses, or for a response such as "how do I do that," the bot depends on the conversation's context to understand how to respond. The following images show the same intent (intent: HowDoIDoThat) in two different contexts. The bot uses the context of the conversation to determine how to respond.
Buttons and Quick Replies in Bot Responses
You can use buttons and quick replies in the bot's responses you add to flows. Using them, you can trigger:
- A new flow: Use this option to jump the conversation into a different flow. This changes the context of the conversation.
- An intent: Use this option to trigger an intent within the context of the current flow.
- A URL: Use this option to open in the web browser. This is an option for buttons only.
Flows can be triggered by the contact at any point during the conversation. Triggering a flow with a button or quick reply does not change that. This option allows you to choose when certain flows are triggered in the context of the conversation.