Flows

Flows are a top-level design element that allow you to create a visual representation of a conversation between your botClosed A software application that handles customer interactions in place of a live human agent. and contactsClosed 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 storiesClosed Used to train bot for interaction handling based on intent and context and rulesClosed 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. 

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 storiesClosed Used to train bot for interaction handling based on intent and context or rulesClosed 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.