Skip to content

Conditions

Conditions let you narrow down when a shipping rule applies. A rule with no conditions matches every cart that passes its zone and product group checks. Add conditions when you need more control, like only showing express shipping for orders over $50, or blocking a rate for international destinations.

All conditions on a rule use AND logic. Every condition must pass for the rule to match. If any one condition fails, the rule is skipped.

There’s no built-in OR between conditions. To express “match A or match B”, create two separate rules.


These compare a cart-level number against a value you specify.

Fields:

FieldWhat it checks
cart_total_priceThe cart’s total price in cents
cart_total_weightThe cart’s total weight in grams
cart_item_countThe total number of items in the cart

Operators:

OperatorMeaning
EqualsExact match
Greater than or equalValue is at or above the threshold
Less than or equalValue is at or below the threshold
BetweenValue falls between two numbers (inclusive)

Examples:

  • Show free shipping only when cart_total_price is greater than or equal to 10000 (i.e. $100.00 or more).
  • Show a freight rate only when cart_total_weight is between 5000 and 30000 grams.
  • Limit a flat rate to small orders where cart_item_count is less than or equal to 3.

These check the customer’s delivery address.

Fields:

FieldWhat it checks
destination_countryThe two-letter country code, e.g. AU, NZ
destination_provinceThe province or state code, e.g. NSW, VIC

Operators:

OperatorMeaning
EqualsExact match on a single value
In listMatches any value in the list
Not in listMatches if the value is not in the list

Comparisons are case-insensitive.

Examples:

  • Restrict a rule to Australian orders: destination_country equals AU.
  • Apply a surcharge to certain states: destination_province in list [WA, NT].
  • Exclude New Zealand from a rule: destination_country not in list [NZ].

Note that postcode zone targeting handles postcode-level filtering directly on the rule, so you don’t need conditions for that.


These check the products in the cart at the individual item level.

Fields:

FieldWhat it checks
item_vendorThe vendor name on each line item
item_product_titleThe product title on each line item
item_skuThe SKU on each line item

Operators:

OperatorMeaning
EqualsExact match
ContainsValue appears anywhere in the string
Does not containValue does not appear in the string
Starts withString begins with the value
Does not start withString does not begin with the value
Ends withString ends with the value
Does not end withString does not end with the value
In listMatches any value in the list
Not in listDoes not match any value in the list

Comparisons are case-insensitive.

Item conditions behave differently depending on whether the operator is positive or negative.

Positive operators (equals, contains, starts with, ends with, in list) pass if at least one item in the cart matches. You’re asking: “does this cart contain an item that fits?”

Negative operators (does not contain, does not start with, does not end with, not in list) pass only if no items in the cart match. You’re asking: “does this cart contain nothing that violates this rule?”

This distinction matters for mixed carts. A cart with three items from vendor “Acme” and one from “BobCo” will pass item_vendor equals Acme (one item matches) but will fail item_vendor not in list [BobCo] (because BobCo is in the cart).

Examples:

  • Apply a fragile-item rate to any cart containing a fragile product: item_product_title contains "fragile".
  • Show a vendor-specific rate: item_vendor equals "Acme Co".
  • Exclude oversized items from a standard rate: item_sku does not start with "OVR-".
  • Match a specific product range by SKU prefix: item_sku starts with "DAI-".