Skip to main content

Conditions

Automations support a dedicated conditions system, separate from pricing rule conditions. These conditions are evaluated before any actions are executed.

Supported Condition Types

Conditions in automations follow the same structure as pricing rule conditions:

TypeDescription
ProductMatch specific product IDs in the cart/order
CategoryMatch product categories in the cart/order
TagMatch product tags
QuantityTotal quantity of items
PriceProduct price ranges
SKUProduct SKU matching
Cart TotalCart or order total threshold
User RoleCustomer's WordPress role
User MetaUser metadata values
SegmentCustomer segment classification
CouponApplied coupon codes
CountryCustomer shipping/billing country
Shipping ZoneShipping zone matching

Match Modes

Automations use the same ALL/ANY match mode system:

  • ALL — every condition must pass (default)
  • ANY — at least one condition must pass

Evaluation Context

The conditions engine builds a context from:

  • Cart contents (product IDs, categories, quantities, prices)
  • User data (role, ID, email, meta)
  • Order data (for order_created trigger)
  • Shipping and country information

If conditions are not met, the automation is skipped and a "conditions_not_met" reason is logged.