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.
How conditions work together
Section titled “How conditions work together”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.
Numeric conditions
Section titled “Numeric conditions”These compare a cart-level number against a value you specify.
Fields:
| Field | What it checks |
|---|---|
cart_total_price | The cart’s total price in cents |
cart_total_weight | The cart’s total weight in grams |
cart_item_count | The total number of items in the cart |
Operators:
| Operator | Meaning |
|---|---|
| Equals | Exact match |
| Greater than or equal | Value is at or above the threshold |
| Less than or equal | Value is at or below the threshold |
| Between | Value falls between two numbers (inclusive) |
Examples:
- Show free shipping only when
cart_total_priceis greater than or equal to10000(i.e. $100.00 or more). - Show a freight rate only when
cart_total_weightis between5000and30000grams. - Limit a flat rate to small orders where
cart_item_countis less than or equal to3.
Location conditions
Section titled “Location conditions”These check the customer’s delivery address.
Fields:
| Field | What it checks |
|---|---|
destination_country | The two-letter country code, e.g. AU, NZ |
destination_province | The province or state code, e.g. NSW, VIC |
Operators:
| Operator | Meaning |
|---|---|
| Equals | Exact match on a single value |
| In list | Matches any value in the list |
| Not in list | Matches if the value is not in the list |
Comparisons are case-insensitive.
Examples:
- Restrict a rule to Australian orders:
destination_countryequalsAU. - Apply a surcharge to certain states:
destination_provincein list[WA, NT]. - Exclude New Zealand from a rule:
destination_countrynot in list[NZ].
Note that postcode zone targeting handles postcode-level filtering directly on the rule, so you don’t need conditions for that.
Item conditions
Section titled “Item conditions”These check the products in the cart at the individual item level.
Fields:
| Field | What it checks |
|---|---|
item_vendor | The vendor name on each line item |
item_product_title | The product title on each line item |
item_sku | The SKU on each line item |
Operators:
| Operator | Meaning |
|---|---|
| Equals | Exact match |
| Contains | Value appears anywhere in the string |
| Does not contain | Value does not appear in the string |
| Starts with | String begins with the value |
| Does not start with | String does not begin with the value |
| Ends with | String ends with the value |
| Does not end with | String does not end with the value |
| In list | Matches any value in the list |
| Not in list | Does not match any value in the list |
Comparisons are case-insensitive.
Positive vs negative operators
Section titled “Positive vs negative operators”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-".