Contact usRequest a demo

Dialog flows

Sometimes, the Unblu Conversational Bot (UCB) can answer a visitor’s question immediately. Sometimes, however, the UCB must first narrow down the scope of the visitor’s question before it can respond. To handle such cases, you can create dialog flows.

A dialog flow is a series of linked intents. The UCB uses quick replies, card messages, and list messages to guide visitors from one intent to the next, until it reaches the intent that provides an answer to the visitor’s request.

You should spend some time mapping out the dialog flows you anticipate between the UCB and your visitors before you start defining intents and writing training phrases. Make sure you also cater for scenarios where the UCB is unable to understand a request or to respond appropriately and the conversation needs handing over to an agent.

The section on creating training phrases stresses the importance of limiting your use of specific keywords or key phrases to the training phrases of a single intent. Following this recommendation makes it easier to create dialog flows.

Consider the diagram below. It shows two possible scenarios where a visitor sends the message "I would like to order a new card."

Diagram showing intent identification

The first scenario has intents for credit, Visa, Master, and debit cards. Because the visitor has written a generic request related to cards, the UCB can’t determine the most appropriate intent and so must send a fallback response. Adding generic training phrases to all the intents wouldn’t help. The UCB would still be unable to choose between the intents and therefore couldn’t answer the visitor’s question.

In the second scenario, there’s a preliminary intent for cards in addition to the more granular follow-on intents for different types of card. The UCB can answer the visitor’s request with the higher-ranked intent "Cards." The visitor can then navigate to one of the secondary intents (Credit, Visa, Master, or Debit cards) using clickable content such as quick replies or buttons in a list answer or card answer. This allows the UCB to send them the appropriate answer, without having to get an agent involved.

Grouping similar intents into a preliminary intent like in the second scenario is good practice and lets the UCB respond to more of your visitors' messages.

Types of dialog flows

There are two types of dialog flow:

Dialog flows between root intents

These are dialog flows consisting of intents that visitors could reach directly if they entered more specific input.

The use case described in the previous section is an example of this type of dialog flow: if a visitor sends the message "I need a new debit card," you would want the UCB to select the "Debit card" intent directly, not to ask what type of card the visitor wants.

Dialog flows with subintents

In some use cases, selecting an intent only makes sense if some other intent was processed beforehand.

Suppose you’re creating a dialog flow that lets prospective clients request an offer for a mortgage. You want to create an intent with a custom action that retrieves a preliminary suggestion based on factors such as the prospect’s financial situation and the property they want to buy.

In this scenario, you don’t want to give visitors direct access to the intent that makes an offer. You want them to provide the information necessary to make an offer first. To do so, you create an intent for mortgage offers, then create subintents for the various steps visitors must complete to receive a mortgage offer.

Creating dialog flows between root intents

  1. Before you can create a dialog flow between root intents, you must create the intents you want to link in the flow.

  2. Once you’ve created all the intents you need for your dialog flow, open the intent that acts as the starting point for your flow. In the second scenario outlined in the previous section, this would be the "Cards" intent.

  3. Click Add quick reply in the Quick replies section of the intent’s Bot answers tab.

  4. In the Label field, enter the text for the message you want to associate with a particular follow-on intent. Make sure the contents of the answer you create for the intent and the labels of the quick replies align.

  5. In the Intent to trigger select element, look for the intent you want to associate with the label. The UCB adds the quick reply once you select the intent to trigger.

  6. When you’ve added all the quick replies for the intent, scroll down to the Dependencies section to review the dependencies you’ve created between the current intent and other intents.

Instead of using quick replies, you can also link intents in list answers and card answers.

For more complex dialog flows, repeat the steps above for each level of intents in the flow. As you do so, the Dependencies view of each intent is updated to show any new intents immediately related to the intent you’re editing.

Example

In the second scenario above, the answer for the "Cards" intent could consist of the text "Sure! What type of card do you need?" and the following quick replies:

Table 1. Quick replies in scenario 2 of the card example
Label Intent to trigger

I need a credit card.

"Credit card"

I need a debit card.

"Debit card"

I need a Visa card.

"Visa card"

I need a Mastercard.

"Mastercard"

In the Dependencies section of the "Cards" intent, the left-hand side would show the "Cards" intent with four arrows, each one pointing to a different follow-on intent. The right-hand side would only display the "Cards" intent.

The left-hand side of the follow-on intents — "Credit card," "Debit card," "Visa card," and "Mastercard" — would only display the current intent. The right-hand side would have an arrow pointing from the "Cards" intent to the intent you’re viewing.

In this example, it makes sense to use root intents for all the options, rather than using subintents for the more specific intents. If a visitor sends a message that allows the UCB to trigger a more specific intent, they shouldn’t have to respond to a more general question first.

Creating dialog flows with subintents

  1. To create a dialog flow with subintents, you must first create a root intent that can be triggered based on the visitor’s input.

  2. Next, create the subintents needed for your dialog flow. You can create all the subintents as immediate children of the root intent and move them to their final position in the dialog flow later. Alternatively, you can create each subintent where it goes in the dialog flow, provided you create its superordinate intent first.

    As you build your dialog flow, you can review the intent hierarchy in the Intent Visualisation section of the root intent or any subintent’s details:

    • The current intent is shown in pink.

    • The root intent is shown in yellow, unless its the current intent.

    • All other subintents are shown in green.

    The intent visualisation only shows the intent hierarchy of dialog flows with subintents. It doesn’t show the dependencies between intents and subintents.
  3. Once you’ve created a subintent, you can use it in answers and quick replies of superordinate subintents or the dialog flow’s root intent.

    You can also create dependencies to other root intents outside the intent hierarchy you’ve built.

Note that you can’t use subintents in multiple dialog flows. If two dialog flows need a subintent that, say, asks the visitor for their account number, you must create two such subintents, one in each dialog flow. However, both subintents can then use the same custom action to verify the account number, for example.

If a visitor enters a message during a dialog flow, the UCB evaluates their message and triggers the most appropriate intent. This automatically cancel the dialog.

See also