Conditions
Intro
A Condition is a saved piece of logic — “shipping method contains Express”, “tag equals VIP”, “SKU starts with FR-” — that other features reuse. Write it once, reference it everywhere.
Purpose
- Keep rules consistent: one definition of “VIP order” across the store
- Make Automation Rules and Visibility easier to read and maintain
Create a condition
- Open Advanced → Conditions and click New Condition.
- Add rows: Entity, Field, Operator, Value, and — between rows — Combine with (And / Or). Set Product item matching (Across items or Single item) when the condition has several product-item rows.
- Give it a Title by meaning — “VIP order”, not “tag=vip v2” — and a Group.
- Reference it from Automation Rules, Visibility, Store Filters, Shipment Filters, or a Document.
- Test it in the Automation Rules Tester with a known order that should match — and one that should not.
Entities
| Entity | Describes | Note |
|---|---|---|
| Order | The order: totals (incl. tax), label, payment / fulfillment status, channel, source, tags, custom attributes, delivery date (also by metafield key) | |
| Product item | One line item: name, SKU, barcode, type, vendor, tags, collections, price, quantity, properties, fulfillment location, Location available quantity (stock on hand at that location — see below), metafields, and its checkout classification — Shipping Group (checkout), Checkout rate code / name, Checkout rate strategy (sum_prices own box · append_free rides free in another group's box · highest_wins one price for the box), Checkout rate shared with type | The only entity that can select lines — used by split actions and by document row filters. Checkout fields need the order's checkout summary from Shipping Rates; pair Checkout rate shared with type with a Type row on the same item |
| Any item in shipment / No item in shipment | Shipment-wide gates: "at least one line where …" / "no line where …". Rows placed next to each other form one check that a single item must satisfy; a row of another entity in between starts a new, independent check — so "has livestock" above and "has a plain supply" below are two questions no single item has to answer | Decide whether the condition matches; never pick lines. Item match mode: Match any item / Match all items |
| Shipment | Status, Tags, Printed document, Printed document count, Printed document outdated by item changes | Shipment stage only — never matches in store filters (no shipment exists at import). Previews don't count as prints; a document is outdated when its last print is older than the last line-item change (added / cancelled / quantity / split / merge — not address or method edits). See Documents → Print tracking |
| Customer, Shipping address, Shipping item, Discount item | The matching order record |
Operators
Every condition row is Entity → Field → Operator → Value. The operator symbols below are what the API and AI assistants use; the UI shows the label.
| Symbol | Label | When it is true |
|---|---|---|
= | Equals | Exact match (text is case-sensitive) |
!= | Not Equals | Different from the value — also true when the field is missing |
> | Greater Than | Numeric: strictly greater |
>= | Greater Than or Equal | Numeric: greater or equal |
< | Less Than | Numeric: strictly less (e.g. stock < 1) |
<= | Less Than or Equal | Numeric: less or equal |
contains | Contains | Value appears anywhere in the text / list |
not_contains | Does Not Contain | Value does not appear — also true when the field is missing |
starts_with | Starts With | Text begins with the value |
not_starts_with | Does Not Start With | Text does not begin with the value |
ends_with | Ends With | Text ends with the value |
is_empty | Is Empty | No value (on lists: none at all). No Value needed |
is_not_empty | Is Not Empty | Any value present. No Value needed |
- Numeric operators (
>,>=,<,<=) only make sense on price, quantity, totals and Location available quantity — on plain text they do not behave usefully. - And / Or between rows are evaluated strictly left to right — there is no precedence; order the rows accordingly.
- Metafield values are written
key:valueornamespace.key:value(only the first colon splits key from value); product and variant metafields are read. - These operators are not Mustache syntax. Document templates use
{{# }}/{{^ }}to show or hide blocks; conditions (including document Default condition, print filters, and document messages) use the table above. See Documents → Template syntax.
Location available quantity
Product item → Location available quantity is the inventory available count of the line's variant at the fulfillment location Shopify assigned to that line — the same number the shipment detail page shows under the SKU (Location: Warehouse · 12 available). It is read from the synced inventory levels; when no per-location level exists it falls back to the variant's overall available stock. The value is a plain number and is compared numerically:
| Rule | Use it for |
|---|---|
Location available quantity Less Than 1 | Oversold or last units sold — tag the shipment Backorder and hold it |
Location available quantity Less Than or Equal 5 | Low stock at that location — tag Reorder |
| Location available quantity Is Empty | No inventory data known (variant not synced or inventory not tracked) |
Notes: the count is a snapshot at the moment the rule runs (on import the order's own units have normally already been deducted, so < 1 means the location is out of stock after this order). With split fulfillment (several locations on one line) the row is true when any of them satisfies it. It only exists on imported orders and shipments — checkout carts in Shipping Rates carry no inventory data, so the row never matches there. Pair it with a Type or Tags row on the same item to scope it to the products you care about.
Groups
Every condition belongs to a group — the same groups as Automation Rules; anything saved without one goes to the Default group, and a condition created inline from a rule joins that rule's group. Filter the list by group, click a group badge to show only that group, and use Manage groups to rename, re-default or delete groups (members move to the default group). One group name has a built-in meaning:
- Printing — when this group contains at least one active condition, the print preview's Filter rows by condition dropdown and the document editor's Default condition list only its conditions. Keep your print-only conditions (Fish products, Supplies, Frozen lines) here. See Documents → Filter rows by condition.
Where conditions are used
| Feature | Behaviour |
|---|---|
| Automation Rules | Condition matches → actions run (tag, split, append) |
| Store Filters · Shipment filters | Skip importing an order / building a shipment |
| Visibility | Who sees which shipments |
| Documents | Product item rules hide non-matching rows; other rules leave out whole shipments. Saved as a document's Default condition or picked per print |
| Document messages (Pro / Enterprise) | Condition matches → a note is printed for each matching line (Product item rules pick the lines; on Batch Pick List / Pick Slip it sits on the Orders: line) or once per shipment / order. Style is Plain text by default, or a coloured pill |
| Delivery Calendar rules, Collective partners | Enable / disable calendars, share orders |
Editing a shared condition changes every feature that references it; the editor shows This condition is shared — changes here affect: …. A condition that is still in use cannot be deleted (still used by N rule(s) or filter(s)) — repoint or delete those first; a bulk delete skips such conditions and says so.
The list
Search, filter by All statuses / Active / Inactive and by group. Each row shows the title, a Per item badge for single-item matching, the group, and the first clauses under Matches. Managers get an inline Active switch and can select rows to Activate, Deactivate or Delete in bulk. An inactive condition is ignored in production but can be dry-run with Include inactive rules in the Tester.
Related
- Automation Rules — conditions plus actions
- Documents — filtered pick lists and labels
- Visibility · Store Filters