Comment on page
The idea of a Condition block is a command a block to go to another block immediately.
What a Go-to looks like in your chatbot conversation.
You can create Go-to's from many places in your conversation, which makes sense since it's a nice way to keep the conversation nice and flowing. It might be confusing at first sight but using Go-to's is actually very simple.
There are 2 main ways of creating Go-to's in Chatlayer:
You can go to any block type to any other block type in your conversation.
Go to another block from a button within a Bot Message
To do that, find the Go To ribbon at the bottom of your block and expand it to fill it in.
Go to any other block by filling in the Go to section at the bottom of your block type.
To pass a variable, click on
+Add Variableand define your variable name and value.
Link two blocks and pass a variable by using the Go to section at the end of a Bot Message or Action block.
Go To bot blocks themselves enable your bot to redirect the user to another block depending on the conditions of the session variables. This is the easiest way of introducing simple if-then logic to your bot.
By enabling the "Case sensitive" toggle capitalization of letters is taken into account when comparing the value of a variable.
In this case the user will be redirected to "first class" if the class variable equals "first". Otherwise, the user will go to the "other class" bot block
The order of the conditional items determines their priority. If a conditional item is met, other conditional items will not be taken into account.