Conditions

Prev Next

Who should read this article: Administrators

The Conditions node helps decide where interactions are routed based on information collected during the flow.

Introduction

Inbound interactions include many different system variables (see the table below) related to interaction properties and the contact. You may also use custom variables, including variables populated by the HTTP Request node, to collect values from a web service and pass them as custom variables (for example, {{customerName}}).

Use the Conditions node to analyze the values of system and custom variables, then route an interaction based on whether the variables match conditions (1) and its rules (2) specified in the node settings.

Flow Builder Conditions Node Example Conditions and Rules Revised

When configuring the Conditions node, add one or more conditions you want to analyze. For each condition, specify one or more rules that define the condition. You can specify that the condition matches only when all the rules match or when any individual rule matches.

In the following example, three conditions are defined. When a call enters the flow, an HTTP Request node retrieves some data from a web service.

Flow%20Builder%20Conditions%20Node%20Flow%20Example

The data is passed to the Conditions node as a custom variable. The Conditions node checks each specified condition in order from top to bottom:

  • If Condition 1 matches, the interaction is routed to a queue using the Route node; otherwise,
  • If Condition 2 matches, the interaction is routed to the Send Message node, and an SMS is sent; otherwise,
  • If Condition 3 matches, the interaction is routed to another HTTP Request node where information is sent to a web service; otherwise,
  • If none of the conditions match (No match), the interaction is routed to voicemail.
Important

Routing is based on the first condition that matches. If none of the conditions match, the interaction is routed by the No match connection.

Connections

The Conditions node supports an unlimited number of input and output connections.

Important

The Conditions node requires at least one input connection and two output connections from the Condition 1 and No match connection.

Use Case: One flow with multiple channels

You can manage multiple inbound phone numbers/channels using a single flow by configuring multiple conditions in a Conditions node to analyze the dialed number (dnis) system variable. Each condition routes the call to a different call-handling flow.

Flow Builder Condition Node One Flow With Multiple Channels Revised

Use Case: Data-driven routing decisions

Use the HTTP Request and Conditions nodes together to route calls based on data retrieved by one or more HTTP Request nodes from an external web service.

Use the Conditions node to analyze the returned data for one or more custom variables, then apply call-handling logic dependent on the values.

Flow Builder Condition Node Testing HTTP Request Variable Revised

Using the Condition node

To add a Conditions node to your interaction flow, click the Conditions icon:

Flow%20Builder%20Condition%20Node

The Conditions node allows an unlimited number of input and output connections. There should be one output connection for each specified condition plus one No match connection for when none of the specified conditions match.

Flow%20Builder%20Condition%20Node%20Connections

To make an input connection, drag a link to the Conditions node from any node supporting an output connection.

To make an output connection, drag a link from the Conditions node to any node supporting an input connection.

Flow%20Builder%20Conditions%20Node%20Making%20Connections

The Conditions node has two output connection types: Condition (match) and No match. These connections represent one of the two possible outcomes for the node when a condition is analyzed. By default, the Conditions node includes one condition and one No match. An additional output connection is added for each condition you add to the node.

Variable types and comparison operators

The Conditions node supports both system and custom variables.

The following five system (global) variables are available for voice interactions:

Variable Description Example
{{start_time}} The time the interaction started. 2023-08-21T04:02:18Z
{{ani}} The calling number (ANI). 443336006114
{{dnis}} The number dialed (DNIS). 380631234567
{{phone_type}} The type of phone for the ANI. fixed_line
uuid a string containing the UUID of the interaction 07771c38-c159-4965-a878-be0162118b2b

Different comparison operators are available, depending on the data type. The following data types are supported:

  • string (ani, dnis, phone_type, uuid, and custom variables)
  • number (custom variables)
  • date and time (start_time and custom variables)
Tip

If you use a variable in the Value field, its data type must match the data type of the variable you specified in the Variable field.

String

Operator Description
Contains The value of the variable includes the specified string.
Does not contain The value of the variable does not include the specified string.
Equals The value of the variable is exactly the same as the specified string.
Doesn't equal The value of the variable is not exactly the same as the specified string.
Starts with The value of the variable begins with the specified string.
Ends with The value of the variable ends with the specified string.
Empty The variable contains no value.
Not empty The variable has some value.

Number

Operator Description
Equals The value of the variable is exactly the same as the specified number.
Doesn't equal The value of the variable is not the same as the specified number.
More than The value of the variable is greater than the specified number.
Less than The value of the variable is less than the specified number.
Empty The variable contains no value.
Not empty The variable contains some value.

Date

Operator Description
Equals The value of the variable is exactly the same as the specified date and time.
Doesn't equal The value of the variable is not the same as the specified date and time.
Between The value of the variable is a date and time between the two specified dates and times. An additional field appears when selecting the Between option, enabling you to specify a date range.
After The value of the variable is a date and time that occurs after the specified date and time.
Before The value of the variable is a date and time that occurs before the specified date and time.

Configuring the Condition node

Click a Conditions node to display the Conditions node configuration panel.

Rename the node

Beginning with the September 15 - 19, 2025 release, you may name nodes in Flow Builder. Click a node in the node palette to add it to the flow. The node is added to the flow and is named Node N, where N represents the number of the node; for example, Node 6. Below the node name is the node type, such as Play Audio. Click the node to open the node configuration panel, then click the name of the node to edit it. Enter a new name, then the check mark to save your change.

Conditions

For each condition you create, specify one or more rules defining the condition.

  • Click All rules to indicate that the condition is matched only when all the rules are met.
  • Click Any rule to indicate that the condition is matched if at least one of the rules is met.

To add another condition, click Add condition.

Flow Builder Conditions Node Add Condition Revised

To remove a condition, click the 'X' on the top right of the condition.

Tip

If you have only one condition, it cannot be removed. You may only remove the first condition if you have two or more conditions.

Rules

Each condition must have at least one rule. There is no limit to the number of rules you can specify for a condition.

Configure a rule by using the three fields:

  • Variable (includes system and custom variables)
  • Operator (analyzing the value of the variable)
  • Value (the data contained in the variable)

To define variables and operators, select them from the drop-down menus. To define a value to be compared against the value of the specified variable, manually enter it in the Value field.

Flow Builder Conditions Node Configuring A Rule Revised

Tip

If you use a variable in the Value field, its data type must match the data type of the variable you specified in the Variable field.

To specify another rule for a condition, click Add rule inside that condition.

Flow Builder Conditional Node Add Rule Revised

To remove a rule, click the 'X' next to the rule.

Tip

If you have only one rule, it cannot be removed. You may only remove the first rule if you have two or more rules.