Learn about the condition blocks and how to use them
Condition blocks are used to create conditional logic in your bot. You can use it to check if a certain condition is met and then perform different actions based on the result.
Similar to an “if-else” statement in programming, condition blocks evaluate a condition and executes different paths based on whether the condition is true or false.
There are two types of condition blocks available in Chatling:
Condition blocks consist of two main parts:
Here’s an example of how a condition block works:
The Else
condition is executed if none of the other conditions are met. You can use it to define a fallback path that the block will follow if none of the other conditions are true.
Conditions support a variety of comparison operators that you can use to compare values. Here are some of the operators you can use:
Conditions are grouped together to create complex logic using logical operators like “AND” and “OR”. Every group contains one or more conditions that are evaluated together.
Conditions within a group are evaluated together to determine if the group is true or false. You can use logical operators such as “AND” and “OR” to combine conditions within a group.
For example, you can create a group with two conditions and set it to “AND” to require both conditions to be true for the group to be true. On the other hand, you can set it to “OR” to require only one of the conditions to be true for the group to be true.
By default, condition blocks have one group with one condition. To add additional groups, click the Add group condition
button.
Logical operators are used to combine conditions within a group. You can choose from the following logical operators:
Example
Group 1:
Group 2:
In this example, Group 1 will be true only if Variable A equals 5 and Variable B equals 10. Group 2 will be true if either Variable C contains “hello” or Variable D contains “world”.
Learn about the condition blocks and how to use them
Condition blocks are used to create conditional logic in your bot. You can use it to check if a certain condition is met and then perform different actions based on the result.
Similar to an “if-else” statement in programming, condition blocks evaluate a condition and executes different paths based on whether the condition is true or false.
There are two types of condition blocks available in Chatling:
Condition blocks consist of two main parts:
Here’s an example of how a condition block works:
The Else
condition is executed if none of the other conditions are met. You can use it to define a fallback path that the block will follow if none of the other conditions are true.
Conditions support a variety of comparison operators that you can use to compare values. Here are some of the operators you can use:
Conditions are grouped together to create complex logic using logical operators like “AND” and “OR”. Every group contains one or more conditions that are evaluated together.
Conditions within a group are evaluated together to determine if the group is true or false. You can use logical operators such as “AND” and “OR” to combine conditions within a group.
For example, you can create a group with two conditions and set it to “AND” to require both conditions to be true for the group to be true. On the other hand, you can set it to “OR” to require only one of the conditions to be true for the group to be true.
By default, condition blocks have one group with one condition. To add additional groups, click the Add group condition
button.
Logical operators are used to combine conditions within a group. You can choose from the following logical operators:
Example
Group 1:
Group 2:
In this example, Group 1 will be true only if Variable A equals 5 and Variable B equals 10. Group 2 will be true if either Variable C contains “hello” or Variable D contains “world”.