A Condition consists of:
name(can be whatever you wish)
matchoperator. It can either be All, Any or Else
- A list of
rule evaluates to either True or False. A rule consists of:
check forattribute. It can either be an Entity or Context Variable
operator, which compares the
check forattribute to
- A specific
For example a specific rule can check that the context variable
card (Click here for more).
Different response based on the order
In the example above a condition has been attached to the Dialog in order to separate the answer that the virtual assistant will give when an end-user asks about the shipping cost. A Context Variable
$amount has been created in order to save the information about the money that the user spent for this order.
So if the amount is less than 50$ the assistant will answer with “there is a shipping fee of 5$”, in any other case will answer with “there is no extra shipping fee”.
Different response based on the communication channel
In this example you can see that the virtual assistant checks for
sys-channel which is a Context Variable that stores all communication channels. So, if you communicate with the assistant through Viber you will receive the response with the
carousel otherwise you will receive the
text message which is shown in the example above.
If you want to find out how to differentiate based on the
Tagged Dialog, click here.