Rules Engine
The Ventryx Rules Engine evaluates conditions against event data and directs the flow of your automations. Write expressive conditions that branch logic, filter events, or transform data before passing it downstream.
How rules work
A rule is a condition + an action. Conditions are evaluated against the event or trigger payload; actions determine what happens when the condition is true (or false).
{
"rules": [
{
"condition": "event.data.amount >= 10000",
"action": "require_approval",
"approvers": ["[email protected]"]
},
{
"condition": "event.data.amount >= 1000",
"action": "notify",
"channel": "slack",
"channel_id": "#finance-alerts"
},
{
"condition": "true",
"action": "continue"
}
]
}
Rules are evaluated top-to-bottom. The first matching condition wins unless the continue action is used to evaluate further rules.
Condition syntax
Conditions are simple expressions evaluated against the trigger payload using dot notation for field access:
| Operator | Example |
|---|---|
| Comparison | event.data.amount > 1000 |
| Equality | event.data.status == "active" |
| Contains | event.data.tags contains "urgent" |
| Exists | event.data.customer_id exists |
| Boolean | event.data.is_trial == false |
| Logical AND/OR | event.data.amount > 500 AND event.data.region == "EU" |
Data transforms
Rules can also reshape the event payload before it reaches the next workflow step — renaming fields, computing derived values, or filtering arrays:
{
"condition": "true",
"action": "transform",
"mapping": {
"customer_name": "event.data.user.full_name",
"order_total_usd": "event.data.amount / 100",
"is_enterprise": "event.data.plan == 'enterprise'"
}
}