IF CONDITION – How to influence a voicebot behavior depending on conditions?
Last updated
Last updated
The IF condition block is used to branch the scenario in two separate paths, depending on the condition set. In other words, you can set up a specific condition and if the condition is true then you go to one branch of your scenario, and if the condition is false then you go to the other branch of the scenario.
The condition may be set depending on:
Text,
Argument (a variable from the previous block),
Global Variable (the variable stored throughout the whole conversation)
Number
For example, an Argument contains the info about the date of planned payment provided by a customer, and the Global Variable (globals.date
) contains the date where the payment should be made. The voicebot will behave differently if the customer wants to pay early, and differently if the customer is in financial trouble.
As another example, the voicebot behavior will be different depending on whether the global variable storing name will be equal to “Stephen” or not.