Conditions
Conditions are the building blocks of dispatcher rules. Each condition compares a field on the order to a value using an operator.
Condition Structure
{
"field": "totalPrice",
"operator": "gte",
"value": 500
}Available Fields
| Field | Type | Description |
|---|---|---|
status | string | Order status |
financialStatus | string | Payment status |
totalPrice | number | Order total |
subtotalPrice | number | Subtotal |
currency | string | Currency code |
tags | string[] | Order tags |
shippingAddress.state | string | Shipping state |
shippingAddress.country | string | Shipping country |
shippingAddress.zip | string | Postal code |
customer.email | string | Customer email |
lineItems.length | number | Number of line items |
source | string | Source platform |
bridgeId | string | Source bridge ID |
metadata.* | any | Custom metadata fields |
Operators
| Operator | Description | Example |
|---|---|---|
eq | Equals | status eq "pending" |
neq | Not equals | status neq "cancelled" |
gt | Greater than | totalPrice gt 100 |
gte | Greater than or equal | totalPrice gte 100 |
lt | Less than | totalPrice lt 50 |
lte | Less than or equal | totalPrice lte 50 |
contains | String/array contains | tags contains "priority" |
not_contains | Does not contain | tags not_contains "hold" |
starts_with | String starts with | shippingAddress.zip starts_with "90" |
ends_with | String ends with | customer.email ends_with "@company.com" |
in | Value in list | status in ["pending", "processing"] |
not_in | Value not in list | status not_in ["cancelled", "returned"] |
exists | Field exists | metadata.priority exists |
not_exists | Field doesn’t exist | metadata.priority not_exists |