A dialog is a group or flow of interactions that are triggered based upon consumer intent.

Dialog types

There are several types of dialogs:

  • Dialog (Standard): Standard dialogs are triggered when the bot recognizes the consumer's message via an intent match or a pattern match. For more on this, see here.
  • Fallback: The fallback dialog is triggered when the bot doesn't recognize the consumer's message. For more on this, see here.
  • Disambiguation: The disambiguation dialog is triggered when the bot recognizes the consumer's input, but it can match it to multiple intents. As a result, clarification from the consumer is needed. For more on this, see here.
  • Auto Escalation: This type of dialog frees the consumer from being stuck within a question, which happens when the bot repeatedly doesn’t recognize the consumer’s input. The dialog is triggered automatically after a configurable threshold of failures is reached; it gives the consumer the option to be transferred. For more on this, see here.
  • Survey: Survey dialogs can only be created in post-conversation survey bots. Use a survey dialog to define a survey. For more on this, see here.

Context switching

“Context switching” is the term used to describe how Conversation Builder navigates the consumer back and forth between dialogs as it matches consumer utterances to intents, in effect, switching the context of the conversation.

Every time a consumer enters a new utterance in a conversation, there’s a chance that the utterance will match a new intent and “jump” the consumer out of one dialog and into another tied to the newly matched intent. When this happens, the new dialog is "pushed" to the top of a virtual, running "stack" of dialogs, and its dialog flow immediately begins. Once the dialog is completed, it is removed from the stack, and the consumer is returned to the dialog immediately underneath it in the stack. That dialog now tops the stack, and the last interaction that was sent by the bot before leaving the dialog is repeated.

You can see this context switching occurring in the following conversation:

Your ability to redirect or restrict context switching depends on whether the consumer is responding to an open-ended statement or a question.

When a bot sends an open-ended statement, such as, "Please type your query below," it simply awaits the consumer's response. As a result, whatever the response is, it is processed by the NLU engine to try and find a matching intent and dialog. And if one is found, that dialog is "pushed" to the top of the dialog stack, and its flow immediately begins.

However, in contrast to open-ended statements, questions can have response conditions applied to the consumer's response, so they can be used to redirect the conversation flow (via the Next Step setting). Depending on the implementation, this can restrict context switching or prevent it from occurring. For example, if a dialog includes an interaction that specifies "end interaction" as its Next Step, this ends the conversation.

Preventing context switching

If the context switching behavior isn't desirable for your use case, you can disable it by setting the skipPreviousDialog bot variable to "true" with the following code:

botContext.setBotVariable('skipPreviousDialog', 'true', true, false);

This code disables the behavior until the variable is set to "false" once again.

To disable context switching at the conversation start, you can add this code to Global Functions. To disable it at the point of a specific situation, you can add the code to any interaction.

Create a new dialog

  1. Open the bot.
  2. Click Add Dialog in the lower-left corner.
  3. In the dialog that appears, do the following:
    • Dialog Name: Enter a descriptive name for the dialog. Use a standard naming convention to make your dialogs more sortable and easier to find.
    • Dialog Type: Select the type of dialog; for help with this, see Dialog types farther above on this page.
  4. Click Save.
  5. Build out the dialog as per your requirements.

Close the dialog

To close the current dialog, set the interaction's Next Action to "Close Dialog."

Alternatively, add a Text statement that contains the special string "LP_CLOSEDIALOG." If the statement isn't the last interaction in the dialog, set its Next Action to "End Interaction" (not "Next Interaction").

LP_CLOSEDIALOG is a system message; even though it appears in the Preview window, it isn't shown to the consumer when deployed.

These methods for closing the dialog do trigger a post-conversation survey.

Close the conversation

To close the current conversation, set the interaction's Next Action to "Close Conversation."

Alternatively, add a Text statement that contains the special string "LP_CLOSECONVERSATION." If the statement isn't the last interaction in the dialog, set its Next Action to "End Interaction" (not "Next Interaction").

LP_CLOSECONVERSATION is a system message; even though it appears in the Preview window, it isn't shown to the consumer when deployed.

These methods for closing the conversation don't trigger a post-conversation survey.

Configure dialog settings

To configure dialog settings

  1. In the dialogs panel on the left, click (3-dot icon) beside the dialog's name.

  2. Select Dialog Settings.
  3. Click More Settings to display all the settings.
  4. Configure the settings as needed, and click Save.

Dialog settings include:

  • Dialog Name: Enter a name that's concise and clear.
  • Dialog Type: This is read only.
  • Domain: Select a domain to associate it with the dialog.
  • Auto Escalation Threshold: Applicable for Auto Escalation dialogs only. Select the maximum number of consecutive times the fallback message should be sent within a question before triggering the Auto Escalation dialog. Example: You set the threshold to 3. The consumer enters an incorrect answer three times, receiving the fallback response each time. After the fourth incorrect answer, the Auto Escalation dialog is triggered.

    LivePerson recommends setting this to "3," but you can set this to a different value based on your confidence that the fallback response will resolve the user's issue.

Disable or enable a dialog

To disable or enable a dialog

  1. In the dialogs panel on the left, click (3-dot icon) beside the dialog's name.

  2. Select Dialog Settings.
  3. Click More Settings to display all the settings.
  4. For Enable Dialog, click the slider. Enable (turn on) the slider to enable the dialog; disable (turn off) the slider to disable the dialog.
  5. Click Save.

Delete a dialog

Deleting a dialog is a non-recoverable action, so be certain about doing so before taking this action. As an alternative, consider disabling the dialog instead; you can do this in the dialog's settings.

To delete a dialog

  1. In the dialogs panel on the left, click (3-dot icon) beside the dialog's name.

  2. Select Delete Dialog.
  3. In the confirmation dialog, click Yes.