order
Keyword
order The order keyword provides access to the current order state within a promotion component. It returns the full Order record, including deliveries, order lines, shipping, and dynamic fields.
order is a symbol — use it directly without parentheses.
Availability
| Promotion | Rule | Reactor |
|---|---|---|
| ✓ |
Examples
Check order total
filtrera
from order.total >= 500 match
true |> percentage(order, 10%)
false |> nothingAccess order lines
filtrera
let electronicLines = order.deliveries
select d => d.orderLines
flatten
where line => line.dynamic->'category' == 'electronics'
from electronicLines count > 0 match
true |> percentage(target(e => e is OrderLine and e.dynamic->'category' == 'electronics'), 15%)
false |> nothingUse as discount target
The order symbol can be passed directly to percentage or absolute as a target that covers all order lines and shipping:
filtrera
from percentage(order, 5%)See Also
- Order Promotions — how promotions work
- Order Type — full Order type reference