Condition Operator Reference
Conditions are used throughout AppFunnel to control routing, dynamic properties, active styles, and visibility. Every condition compares a variable against a value using an operator.
Condition Structure
A condition consists of three parts:
- Variable β the variable to evaluate (e.g.,
answers.experience,device.isMobile). - Operator β the comparison to perform (e.g.,
equals,greaterThan). - Value β the target value to compare against (not required for some operators).
answers.experience equals "advanced"
βββββ variable ββββ β op ββ ββ value ββOperators by Variable Type
The available operators depend on the type of the variable being evaluated. AppFunnel automatically filters the operator list in the UI based on the selected variableβs type.
String
| Operator | Label | Description | Example |
|---|---|---|---|
equals | equals | Exact match (case-insensitive via loose equality). | answers.goal equals "profit" |
notEquals | not equals | Does not match. | answers.goal notEquals "profit" |
contains | contains | Variable includes the substring. | user.email contains "@gmail" |
notContains | does not contain | Variable does not include the substring. | user.email notContains "@test" |
exists | exists | Variable has a non-empty, non-null value. | user.email exists |
notExists | does not exist | Variable is empty, null, or undefined. | user.name notExists |
isEmpty | is empty | Variable is an empty string (after trimming). | answers.name isEmpty |
Number
| Operator | Label | Description | Example |
|---|---|---|---|
equals | equals | Numeric equality. | page.current equals 5 |
notEquals | not equals | Numeric inequality. | page.current notEquals 1 |
greaterThan | greater than | Variable is greater than the value. | page.timeOnCurrent greaterThan 30 |
lessThan | less than | Variable is less than the value. | purchase.amount lessThan 1000 |
exists | exists | Variable is defined and non-null. | purchase.amount exists |
notExists | does not exist | Variable is undefined or null. | purchase.amount notExists |
Boolean
| Operator | Label | Description | Example |
|---|---|---|---|
equals | equals | Boolean match (true or false). | device.isMobile equals true |
notEquals | not equals | Boolean mismatch. | purchase.success notEquals true |
exists | exists | Variable is defined and non-null. | payment.loading exists |
notExists | does not exist | Variable is undefined or null. | payment.loading notExists |
String Array (stringArray)
String arrays are used by Multi Select elements and the toggleArrayItem action. Array operators check the arrayβs contents or length.
| Operator | Label | Description | Example |
|---|---|---|---|
includes | includes | Array contains the specified value. | answers.interests includes "fitness" |
notIncludes | does not include | Array does not contain the specified value. | answers.interests notIncludes "cooking" |
equals | equals | Array length equals the value. | answers.interests equals 3 |
notEquals | not equals | Array length does not equal the value. | answers.interests notEquals 0 |
greaterThan | greater than | Array length is greater than the value. | answers.interests greaterThan 2 |
lessThan | less than | Array length is less than the value. | answers.interests lessThan 5 |
isEmpty | is empty | Array has no items. | answers.interests isEmpty |
isNotEmpty | is not empty | Array has at least one item. | answers.interests isNotEmpty |
exists | exists | Variable is defined and non-null. | answers.interests exists |
notExists | does not exist | Variable is undefined or null. | answers.interests notExists |
For string arrays, equals, notEquals, greaterThan, and lessThan operate on the array length, not the array contents. Use includes / notIncludes to check for specific values.
Expression
Expression conditions use a Liquid template as the left-hand value instead of a raw variable. The template is rendered first, then compared using the operator. This enables computed comparisons.
| Operator | Label | Description |
|---|---|---|
equals | equals | Rendered expression equals the value. |
notEquals | not equals | Rendered expression does not equal the value. |
contains | contains | Rendered expression contains the substring. |
notContains | does not contain | Rendered expression does not contain the substring. |
greaterThan | greater than | Rendered expression (as number) is greater than the value. |
lessThan | less than | Rendered expression (as number) is less than the value. |
exists | exists | Rendered expression is non-empty. |
notExists | does not exist | Rendered expression is empty. |
isEmpty | is empty | Rendered expression is empty or whitespace. |
isNotEmpty | is not empty | Rendered expression is non-empty. |
Example expression condition:
Variable (expression): {{ products.selected.rawPrice | divided_by: 12 }}
Operator: lessThan
Value: 10
This checks whether the selected productβs monthly equivalent price is less than $10.
Operators That Do Not Require a Value
The following operators are unary β they evaluate the variable alone without a comparison value:
| Operator | Description |
|---|---|
exists | True if the variable is defined, non-null, and non-empty. |
notExists | True if the variable is undefined, null, or empty string. |
isEmpty | True if the variable is an empty string, empty array, or falsy. |
isNotEmpty | True if the variable has content (non-empty string, non-empty array, or truthy). |
Condition Groups (AND / OR)
Multiple conditions can be combined into groups with AND or OR logic:
- AND β All conditions in the group must be true.
- OR β At least one condition in the group must be true.
Groups can be nested, allowing complex boolean logic:
AND
βββ answers.experience equals "advanced"
βββ OR
βββ device.isMobile equals true
βββ device.isTablet equals trueThis matches advanced users who are on a mobile or tablet device.
Conditions are evaluated top to bottom. In routing and dynamic properties, the first matching condition wins (like an if/else-if chain). Always include a fallback (a route or value with no condition) as the last entry.