Condition Builder
Conditions are used to compare two values. The condition builder enables you to use condition statements in your Automations. The condition builder is used in the following situations on the Blink platform:
- To trigger event-based Automations.
- To configure
if
orif else
statements.
Additional conditions can be applied to limit which events trigger an Automation. For example, if your Automation is triggered when an event is received, you can add a condition stating that it will run only if it is received by a user with a specific ID.
The condition builder supports AND
and OR
operators.
- An
AND
operator requires that the statement satisfies two conditions. - An
OR
operator requires that the statement satisfies at least one of two conditions.
Using the condition builder in an event-based Automation
- When creating an event-based Automation, in the Trigger setup, select Event-based Automation.
- Select a service provider, and the action you wish to trigger the Automation.
- Activate Add condition. The condition builder consist of three parts; the left value, the operator, and the right value.
- To apply a condition, click on and enter each value. Select an operator from a menu that appears when you click on it.
- Use
AND
orOR
operators to further define your statement. The condition appears in the text window on the right side. - Click Apply.
Using the condition builder in an if
or if else
statement
- In the Edit screen, select an
if
orif else
action.
The condition builder consist of three parts; the left value, the operator, and the right value.
- To apply a condition, click on and enter each value. Select an operator from a menu that appears when you click on it.
- Use
AND
orOR
operators to further define your statement. The condition appears in the text window on the right side.
Conditions
The following condition operators can be used to create a condition statement:
Equals
The Action is executed when the left value is equal to the specified right value.
Not equals
This condition is the opposite of the equals condition. The Action is executed when the left value DOES NOT equal to the specified right value.
Less than
The Action is executed when the left value is less than the specified right value.
Less than or equals to
The Action is executed when the left value is less than or equal to the specified right value.
Greater than
The Action is executed when the left value is greater than the specified right value.
Greater than or equals to
The Action is executed when the left value is greater than or equal to the specified right value.
Contains
The Action is executed if the left value contains the right value.
Not contains
The Action is executed if the left value DOES NOT contain the right value.
Starts with
The Action is executed if the left value begins with the specified right value.
Ends with
The Action is executed if the left value ends with the specified right value.
Regex match
The Action is executed if the left value matches a Regular Expression.
Is empty
The Action is executed when the specified event has a null value, or has an empty array, object, or string. When selecting this operator, the option to set the right value shouldn't exist.
Is not empty
The Action is executed when the specified event DOES NOT have a null value, or has an empty array, object, or string. When selecting this operator, the option to set the right value shouldn't exist.
Is true
The Action is executed if the left value is true. When selecting this operator, the option to set the right value shouldn't exist.
Is false
The Action is executed if the left value is NOT true. When selecting this operator, the option to set the right value shouldn't exist.