AI Rule Engine Docs
Go to App

Conditions

A condition is the boolean test that decides whether a rule fires. Conditions are built from clauses, organized into groups, and combined with AND / OR / NONE logic.

Clauses

A clause is the smallest unit of a condition. It has three parts:

  • Context key — the value to test, read from the execution context.
  • Operator — the comparison to apply.
  • Value — what to compare against. This is a value input, so it can be a constant, another context key, or a variable. See Data Types & Values.

A clause reads in plain language as <context key> <operator> <value>, for example “ticket.priority Equals High”.

Comparison operators

When you build a clause you pick one of these operators:

CategoryOperators
EqualityEquals, Not Equal
Text containsContains, Not Contains, Starts With, Not Starts With, Ends With, Not Ends With
OrderingGreater Than, Greater Than Or Equal, Less Than, Less Than Or Equal
Null checksIs Null, Is Not Null
PatternMatches Regex, Not Matches Regex
AI promptMatches AI Prompt, Not Matches AI Prompt

AI-evaluated clauses The Matches AI Prompt and Not Matches AI Prompt operators ask an AI model whether the context value satisfies the prompt you write in the comparison value. These clauses require an AI selection (provider and model) — see AI Models & Providers. The Is Null and Is Not Null operators ignore the comparison value entirely.

Condition groups and boolean logic

Clauses are combined inside a condition group. Every group has a logic mode that determines how its members are combined:

LogicMeaning
AllAND — the group is true only if every member is true.
AnyOR — the group is true if at least one member is true.
NoneThe group is true only if no member is true.

A group's members can be clauses or other groups. Because groups nest, you can express arbitrarily complex logic — for example, “All of (A, Any of (B, C))” — without losing readability.

Referencing context and variables

Both sides of a clause draw on data resolved at run time. The left side is always a context key; the right side is a value input that resolves to a constant literal, another context key, or an environment variable. This means a condition can compare two context values against each other, not just a value against a fixed constant.

Inline vs. shared conditions

A condition can be defined inline on a single rule, or saved as a named, reusable condition within the project and referenced from many rules. Shared conditions are edited in the condition editor; inline conditions live with their rule. See Rules.