Skip to main content

Condition Builder

Build conditions visually to determine when rules apply. Conditions evaluate entity data against criteria you define.

Structure

Simple Condition: field operator value

  • Example: orderTotal > 1000

Group Condition: Combine multiple conditions with AND/OR

  • AND: All must be true
  • OR: At least one must be true
  • Can be nested up to 10 levels

Condition Builder Interface Condition builder showing simple conditions and nested AND/OR groups

AND:
- status = "PENDING"
- orderTotal > 5000
OR:
- customerTier = "GOLD"
- customerTier = "PLATINUM"

Field Paths

Use dot notation to access data:

  • Top-level: status, quantity
  • Nested: user.email, address.city
  • Arrays: items[0].productId, tags[2] (zero-based)

Invalid paths show error indicators.

Operators

OperatorDescriptionExample
=, ==Equalsstatus = "ACTIVE"
!=Not equalsstatus != "DELETED"
>, >=, <, <=ComparisonorderTotal > 1000
INIn liststatus IN ["ACTIVE", "PENDING"]
NOT_INNot in liststatus NOT_IN ["DELETED"]
CONTAINSArray containstags CONTAINS "urgent"
NOT_CONTAINSArray not containstags NOT_CONTAINS "archived"
STARTS_WITHString prefixemail STARTS_WITH "admin"
ENDS_WITHString suffixfilename ENDS_WITH ".pdf"
MATCHESRegex matchphone MATCHES "^\\+1"
IS_EMPTYNull/empty checkdescription IS_EMPTY
IS_NOT_EMPTYHas valueassignedTo IS_NOT_EMPTY

Values

Static Values

  • Strings: "ACTIVE", "john@example.com"
  • Numbers: 1000, 3.14
  • Booleans: true, false
  • Arrays: ["ACTIVE", "PENDING"] (for IN/NOT_IN)
  • Objects: {"min": 10, "max": 100}

Dynamic Values

  • {{today}}, {{now}}, {{yesterday}}, {{tomorrow}}
  • {{user.id}}, {{user.email}}, {{user.name}}
  • {{entity.id}}, {{entity.tenantId}}, {{entity.organizationId}}

Examples:

expiryDate < {{today}}
createdBy = {{user.id}}
deadline <= {{tomorrow}}

Field Comparisons

Compare two fields instead of field to value. Click "Use field" to toggle.

plannedEndDate < actualEndDate

Building Conditions

  1. Click Add First Condition
  2. Enter field path (e.g., status)
  3. Select operator
  4. Enter value or toggle to field comparison
  5. Add more conditions with Add Condition
  6. Create nested logic with Add Group
  7. Toggle AND/OR on groups
  8. Reorder with arrow buttons
  9. Delete with trash icon

Validation: System checks field paths, operators, and value formats automatically.

JSON Preview

Click Show JSON to view/debug the raw condition structure.

Common Patterns

Range Check:

AND: quantity >= 10, quantity <= 100

Multiple Options:

status IN ["ACTIVE", "PENDING", "APPROVED"]

Exclusion:

status NOT_IN ["DELETED", "ARCHIVED"]

Date Range:

AND: createdAt >= {{2024-01-01}}, createdAt < {{2024-12-31}}

Required Fields:

AND: firstName IS_NOT_EMPTY, lastName IS_NOT_EMPTY, email IS_NOT_EMPTY

Complex Logic:

AND:
- orderType = "WHOLESALE"
- orderTotal > 10000
OR:
AND: customerTier = "GOLD", accountAge > 365
- customerTier = "PLATINUM"

Best Practices

  • Start simple, add complexity only when needed
  • Use descriptive field paths
  • Test boundary values
  • Document complex logic in rule description
  • Keep nesting depth reasonable (avoid 10+ levels)
  • Validate field paths exist on entities
  • Use dynamic values ({{today}}, {{user.id}}) where applicable

Troubleshooting

IssueCheck
Always true/falseField paths, value types, operators, AND/OR logic
Evaluation errorsExecution logs, field path validity, JSON syntax, regex patterns
Case sensitivityStrings are case-sensitive

Next Steps