Conditions

This section describes the use of conditions within flows. A condition is used to make certain behaviours conditional, like:

  1. skipping a node

  2. guarding a trigger

  3. branching

What are conditions?

Conditions consist of one or more rules that check whether something is true or false. Each rule (also referred to as an expression) compares values in a specific way. For example, it may check whether a phone number exists, or if a number is greater than 10.

When you have multiple rules, the condition combines them to give a final result: either the condition is true (all rules pass) or false (at least one rule fails). This result determines what happens next in your Flow.

For example, if you use a condition in the Skip when option of a node, the node will be skipped if the condition evaluates to true.

Where are conditions used?

Skipping a node

If you want certain Flow nodes to be skipped in certain circumstances, you can use conditions as "skip logic". Every node in your Flow has the option to be skipped based on a condition. This feature is available in the Advanced section of the properties panel of your Flow node.

Add condition as skip logic

Guarding a trigger

Triggers to your Flows can be guarded by conditions so you can have different entry points for different scenarios. This enables you to have a different Flow based on user or conversation variables.

Add condition as trigger guard When

Branching

Another way to make your Flow behave conditionally is by adding a Branch node to your Flow. The branches will be evaluated from left to right, and the first branch condition that evaluates to true will be executed.

Add condition to a branch

How to build a condition

By clicking on the Add condition button, a popup appears in which the condition can be specified. As explained, a condition consists of one or more rules (expressions).

Rule types

A rule can be based on:

Expression type selection

Rules based on tags

The easiest and most commonly used way to create a rule is by checking the existence of certain tags in your conversation. Therefore, the condition type is set to Tags by default:

Creating your condition

The way the tags are evaluated depends on which expression type is used to compare the selected tags:

Tag comparison type
Evaluates to true when…

Any of

One or more of the given tags are set

All of

All given tags are set

None of

None of the provided tags are set

Example condition based on tags

The above screenshot shows an example where either the user's phone number or their email address needs to be set for the condition to evaluate to true. This works because the platform will automatically set a user tag when the user's phone number or email address is known, see User tags.

In the above example, the condition evaluates to true if at least one of the tags is present. If the use case requires both to be present, you should set the expression type to All of. If, on the other hand, you want to check if none of these fields are present, you should select None of.

Rules based on channels

If multiple channels are available to your Smart App, you might want to execute certain logic based on the channel the conversation is running in. This can easily be done using the rule type Channel.

Example condition based on channel

In this example, the condition will only evaluate as true on phone channels, which prevents this logic from being executed on any of the other channels.

Rules based on variables

A very precise and customizable way to use rules is by using variable comparison. By using logical operators (see next paragraph) the user and/or conversation variables can be compared to certain values in order for to evaluate the condition to true or false. For example, to check whether a caller's phone number starts with a certain area code, or whether the user's name is equal to a certain name.

Example condition based on a variable

Operators

An operator is a way to compare or check values. It defines how two things are compared. Think of it like asking different types of questions: "Does the company_name contain "Enreach"?", "Is the age equal to or higher than 65?", etc.

Variables and values can have different types, which has an effect on which operators can be used on them.

Text operators

Text operators can only be used on text type variables, which are also called strings. A variable of type string holds textual values, like "ABC", "John Doe", "I would like to order 3 pizzas", or even "1234". (Note that while a string can contain numbers, those numbers are treated as text and cannot be used in calculations or number comparisons.)

As you saw in the above examples, the operator == can be used in a rule to evaluate if a variable is exactly the same as a given value. There are also other expression operators that can be used for Text . For instance, to check if a variable does not equal, i.e. is different from, a certain value.

Expression operators

The following table describes the different operators in more detail.

Operator
Description
Example for true

==

to check A and B are the same

!=

to check A and B are not the same

Contains

to check if B is a part of A

"[email protected]" contains "enreach"

Not contains

to check if B is not part of A

"[email protected]" not contains "enreach"

Starts with

to check if A starts with B

"[email protected]" starts with "info"

Ends with

to check if A ends with B

"[email protected]" ends with "com"

Is empty

to check if A has no value, often used to check if a question was not asked yet.

Email Is Empty

Is not empty

to check if A has a value, often used to check if a question is already asked

Email Is not empty

Number operators

Variables of type number can only hold numeric values, like 1234. When working with numbers, you need to be able to compare them to smaller or larger numbers. Unlike with string values, checking if they contain or start with a certain digit is not relevant. If you want to use numeric operators, make sure your variables are stored as numbers (see Variables).

The following table describes the operators for numbers:

Operator
Description
Example for true

==

to check A and B are the same

!=

to check A and B are not the same

<

to check A < B

5 < 10

<=

to check A <= B

5 <= 5

>

to check B > A

10 > 5

>=

to check B ≥ 5

5 ≥ 5

Is null

to check A is empty

Is not null

to check A is not empty

5

Date and datetime operators

Variables of type date and datetime can only hold respectively date and datetime values, like 2025-07-21. Date and datetime conditions can have the same type of operators as number variables. In this case, greater than (>) checks if a date is numerically larger, which translates to later than ('after') in 'human' language.

Boolean operators

Variables of type boolean can hold either true or false, so comparisons can be done on the basis of the variable having a true or false value.

Add another rule

As explained at the beginning of this chapter, conditions consist of one or more rules. So when you have configured your first rule, feel free to try adding another rule by hovering your mouse over the rule. You will see two buttons appear: Add rule and Add group. In this paragraph we will focus on adding a new rule.

Add rule

The new rule can be built in the same way, but now we also need to indicate if this rule adds to the previous rule (And) or whether the new rule applies separately (Or), in which case just one of the two rules needs to evaluate to true instead of both.

And / Or

Add a group

When building complex conditions, you might want to use groups. A group of rules is evaluated as one. Just as with mathematical evaluations, groups work like parentheses. In this example: (1+1) x (2+2) evaluates to 2 x 4 = 8. When not using parentheses, the equation would lead to something completely different: 1 + 1 x 2 + 2 = 5.

A group can be added by hovering the mouse over one of the rules and clicking on the Add group button:

Add group

For conditions it works the same way, so consider the following example:

Defining complex group expressions

In this example, the condition evaluates to true when either the system is online and the first name of the user is Niels, OR when the system is offline while the first name is not yet set.

Last updated

Was this helpful?