Skip to Content
ReferenceCondition Operators

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:

  1. Variable β€” the variable to evaluate (e.g., answers.experience, device.isMobile).
  2. Operator β€” the comparison to perform (e.g., equals, greaterThan).
  3. 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

OperatorLabelDescriptionExample
equalsequalsExact match (case-insensitive via loose equality).answers.goal equals "profit"
notEqualsnot equalsDoes not match.answers.goal notEquals "profit"
containscontainsVariable includes the substring.user.email contains "@gmail"
notContainsdoes not containVariable does not include the substring.user.email notContains "@test"
existsexistsVariable has a non-empty, non-null value.user.email exists
notExistsdoes not existVariable is empty, null, or undefined.user.name notExists
isEmptyis emptyVariable is an empty string (after trimming).answers.name isEmpty

Number

OperatorLabelDescriptionExample
equalsequalsNumeric equality.page.current equals 5
notEqualsnot equalsNumeric inequality.page.current notEquals 1
greaterThangreater thanVariable is greater than the value.page.timeOnCurrent greaterThan 30
lessThanless thanVariable is less than the value.purchase.amount lessThan 1000
existsexistsVariable is defined and non-null.purchase.amount exists
notExistsdoes not existVariable is undefined or null.purchase.amount notExists

Boolean

OperatorLabelDescriptionExample
equalsequalsBoolean match (true or false).device.isMobile equals true
notEqualsnot equalsBoolean mismatch.purchase.success notEquals true
existsexistsVariable is defined and non-null.payment.loading exists
notExistsdoes not existVariable 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.

OperatorLabelDescriptionExample
includesincludesArray contains the specified value.answers.interests includes "fitness"
notIncludesdoes not includeArray does not contain the specified value.answers.interests notIncludes "cooking"
equalsequalsArray length equals the value.answers.interests equals 3
notEqualsnot equalsArray length does not equal the value.answers.interests notEquals 0
greaterThangreater thanArray length is greater than the value.answers.interests greaterThan 2
lessThanless thanArray length is less than the value.answers.interests lessThan 5
isEmptyis emptyArray has no items.answers.interests isEmpty
isNotEmptyis not emptyArray has at least one item.answers.interests isNotEmpty
existsexistsVariable is defined and non-null.answers.interests exists
notExistsdoes not existVariable 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.

OperatorLabelDescription
equalsequalsRendered expression equals the value.
notEqualsnot equalsRendered expression does not equal the value.
containscontainsRendered expression contains the substring.
notContainsdoes not containRendered expression does not contain the substring.
greaterThangreater thanRendered expression (as number) is greater than the value.
lessThanless thanRendered expression (as number) is less than the value.
existsexistsRendered expression is non-empty.
notExistsdoes not existRendered expression is empty.
isEmptyis emptyRendered expression is empty or whitespace.
isNotEmptyis not emptyRendered 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:

OperatorDescription
existsTrue if the variable is defined, non-null, and non-empty.
notExistsTrue if the variable is undefined, null, or empty string.
isEmptyTrue if the variable is an empty string, empty array, or falsy.
isNotEmptyTrue 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 true

This 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.

Last updated on