Flow navigation with variables
The Go To bot dialog enables the bot to redirect the user to a bot dialog depending on conditions of the session variables. You can define conditions with operators like equals, greater than, smaller than, etc. You can also combine multiple conditions with AND and OR.
Consider the following scenario. The user asks the bot:
I want to book a train from Paris to London in first class please.
Let us define a different message, based on which class the user selected first or second class.
Create a bot dialog
class redirectof type Go To.Create a bot dialog
selected first classwithclass redirectas a parent.Open the
class redirectbot dialog.If the variable
classisequaltofirst, we want to redirect the user to the bot dialogselected first class.If the condition is not fulfilled, and the user has selected
secondclass, we want to confirm that selectionIf the user has selected no class at all, we want to redirect the user to the bot dialog
first or second class. Here, the traveler will be asked explicitly in which class they want to travel.
Configure the Go To like this:

Add a text message in the
selected first classbot dialog and a Go To that redirects the user toconfirm booking.Adjust the Go To settings in the input validation in the
first or second classbot dialog to go to the bot dialogclass redirect. Adjust the Go To in thefirst classbutton.Test in the Emulator:

Last updated
Was this helpful?