Skip to content

Conditions

A condition is a single if clause attached to an operation. Every condition has the same shape:

<field> <operator> <value(s)>

For example: cart total weight equals 5 kg or destination country equals CA.

If you don’t add any conditions to an operation, it always fires. If you add one or more, all of them must be true for the operation to fire (an implicit AND).

The available fields are organized by subject — what part of the cart or customer the field reads.

Subject Field What it reads Type
Cart line product_tags The tags on each product in the cart String (multi)
Cart line product_vendor The vendor of each product in the cart String
Cart line product_type The product type of each product in the cart String
Cart line product_sku The SKU of the variant on each cart line String
Line item line_item_value The total value of the line items in the current scope Number
Line item line_item_weight Total weight of the line items in the current scope Number
Line item line_item_quantity Total quantity of the line items in the current scope Number
Cart delivery_group_count The number of delivery groups (parcels) the cart is split into Number
Customer customer_tags The tags on the logged-in customer String (multi)
Destination destination_country_code The customer’s shipping country (ISO 3166-1 alpha-2) String
Destination destination_province_code The customer’s shipping province / state (ISO 3166-2) String
Destination destination_postal_code The customer’s shipping postal / ZIP code String
Billing billing_country_code The customer’s billing country (ISO 3166-1 alpha-2) String
Billing billing_province_code The customer’s billing province / state (ISO 3166-2) String
Billing billing_postal_code The customer’s billing postal / ZIP code String
Delivery Option delivery_option_code The code of each delivery option (e.g. standard, express) String
Delivery Option delivery_option_handle The Shopify handle of each delivery option String
Delivery Option delivery_option_title The display title of each delivery option String
Delivery Option delivery_option_cost The cost of each delivery option Number
Payment Method payment_method_name The name of each payment method (e.g. Credit Card, PayPal) String

The full list with notes is in Condition fields.

  • String fields accept: equals, contains, starts_with, ends_with.
  • Number fields accept: equals, contains, between (a range).
  • Multi-value string fields (like tags) accept: contains (any of the values matches).

The operator menu in the form changes to match the field type.

Number conditions (line_item_value, line_item_weight, line_item_quantity) carry a unit. For weight, the unit is the shop’s default weight unit (set in Settings) at the time the condition was created. Changing the shop default later doesn’t change existing conditions.

You can also override the unit per condition if you want a rule to evaluate against a specific unit (e.g. “more than 10 lb” while the shop default is kilograms).

When you save an invalid range, the form shows the validation error below the range inputs. Weight-unit errors appear beside the unit selector.

delivery_group_count has no unit — it counts the parcels in the cart, so the range inputs are plain numbers.

Each condition has a negate toggle. When turned on, the condition’s meaning flips — it fires when the comparison is not true.

For example, with destination_country_code equals CA and negate on, the condition is “the country is not Canada.” Conditions still combine with AND across the operation.

For conditions that check multiple records, such as cart lines, delivery options, and payment methods, the condition is true by default when at least one record matches. The condition has an all records must match toggle that requires every record in the subject collection to match.

The toggle applies to the records being checked, not to the field’s value type. For example, customer_tags is a multi-value field on one customer, so it does not show the all-records toggle. Multi-value fields still match when any listed value matches by default.

Some conditions check a collection of records — cart lines or delivery options — and evaluate against the whole collection. You can narrow that collection first with filters: child conditions that run against every record, where only records passing all of them are then checked against the parent condition.

Conditions with a filterable subject show a Filter products or Filter shipping rates checkbox in the condition footer. Checking it opens a filter builder where you add child conditions with the same fields, operators, and values as top-level conditions. For example, “line item value is between $100 and $200” can be narrowed to “line item value of the products tagged heavy is between $100 and $200”.

Filtering is available on shipping operations. A parent field narrows one of two record collections, and the fields you can use inside its filters are fixed:

Parent field Filters these records Allowed filter fields
product_tags Products in the cart product_tags, product_vendor, product_type, product_sku
line_item_value, line_item_weight, line_item_quantity Products in the cart product_tags, product_vendor, product_type, product_sku
product_vendor, product_type, product_sku Products in the cart product_tags, product_vendor, product_type, product_sku
delivery_option_title, delivery_option_code, delivery_option_handle, delivery_option_cost Delivery options delivery_option_title, delivery_option_code, delivery_option_handle, delivery_option_cost
  • A record is kept only when it passes every filter condition — filters combine with AND, like top-level conditions do.
  • The parent condition then evaluates against the filtered records only, not the whole collection.
  • For line item conditions (line_item_value, line_item_weight, line_item_quantity), the aggregate is recomputed from the filtered products. “Line item value of the products tagged heavy is between $100 and $200” sums only the tagged products.
  • All records must match applies to the filtered records. “All Express shipping rates cost between $5 and $10” requires every Express rate to cost within that range.
  • If the filter removes every record, the parent condition is false and the operation doesn’t fire.
  • Negated filter conditions exclude the records they match. “Product tags does not equal gift” keeps products without the gift tag.
  • Filters are one level deep — a filter condition can’t itself have filters.

The condition footer shows how many filter conditions are in use out of the per-condition limit.

Filters are saved with the operation and evaluated whenever the operation runs. Duplicating an operation copies its conditions along with their filters, so a complex rule can be reused as a starting point.

Conditions are scoped to a single operation. There is no global AND/OR between operations. If you need OR logic, build two operations with the same action and different conditions.