Build functions

Condition reference

Every condition FunctionFlow can check — cart, customer, product, shipping address, market, time and custom data — and which kinds of function can use it.

4 min read · Updated

Shopify gives each kind of function different data about the cart, so not every condition is available everywhere. The builder only offers conditions that work for the function you’re editing; this page lists them all.

Columns: Discounts = product and order discounts · Ship. discounts = free and discounted shipping · Shipping rules = hide, rename or reorder shipping methods · Payment rules = hide, rename or reorder payment methods · Checkout rules = validation.

Cart

Condition What it checks Discounts Ship. discounts Shipping rules Payment rules Checkout rules
Cart total The cart’s value. Discounts use the subtotal before discounts; the others use the cart total ✓ ✓ ✓ ✓ ✓
Cart quantity Total number of units in the cart ✓ ✓ ✓ ✓ ✓
Cart total weight Total weight, in g, kg, lb or oz — — ✓ ✓ ✓
Distinct products Number of different products in the cart ✓ ✓ ✓ ✓ ✓
Cart has items Whether the cart has (or doesn’t have) products matching a filter ✓ ✓ ✓ ✓ ✓
Quantity of items Total units of the products matching a filter ✓ ✓ ✓ ✓ ✓
Subtotal of items Subtotal of the products matching a filter ✓ ✓ — — —

Customer

Condition What it checks Discounts Ship. discounts Shipping rules Payment rules Checkout rules
Customer tags The customer’s tags ✓ ✓ ✓ ✓ ✓
Customer order count How many orders the customer has placed ✓ ✓ ✓ ✓ ✓
Customer total spent The customer’s lifetime spend ✓ ✓ ✓ ✓ ✓
Customer is logged in Logged in, or a guest checkout ✓ ✓ ✓ ✓ ✓

Guests have no tags and count as 0 orders and 0 spent.

Product

These look at individual cart items. At the top level they come with on any / every / no item (except Product and Variant); in product filters they check one item at a time.

Condition What it checks Discounts Ship. discounts Shipping rules Payment rules Checkout rules
Product Specific products, chosen from your store ✓ ✓ ✓ ✓ ✓
Variant Specific variants, chosen from your store ✓ — — — —
Product type The product type ✓ — ✓ ✓ ✓
Product vendor The vendor ✓ — ✓ ✓ ✓
Product tags The product’s tags ✓ ✓ ✓ ✓ ✓
Collection Collections, chosen from your store ✓ ✓ ✓ ✓ ✓
Product is on sale The compare-at price is above the price ✓ — — — —
Line quantity Units of that item in the cart ✓ ✓ ✓ ✓ ✓
Unit price The item’s price per unit ✓ — — — —
Line property A line item property, e.g. engraving or gift_wrap ✓ ✓ — — —

Shipping address

Condition What it checks Discounts Ship. discounts Shipping rules Payment rules Checkout rules
Country Country code, e.g. US, CA, GB ✓ ✓ ✓ ✓ ✓
State / province Region code, e.g. AK, HI, ON — ✓ ✓ ✓ ✓
City City name — — ✓ — ✓
ZIP / postal code Postal code — use starts with for a range, e.g. 995 — ✓ ✓ ✓ ✓
Address is a PO Box The first address line is a PO Box — — ✓ ✓ ✓

Market and currency

Condition What it checks Discounts Ship. discounts Shipping rules Payment rules Checkout rules
Shopify Market The market handle, e.g. us or eu ✓ ✓ — ✓ ✓
Currency The checkout currency, e.g. USD ✓ ✓ ✓ ✓ ✓

Time

Condition What it checks Discounts Ship. discounts Shipping rules Payment rules Checkout rules
Time of day A time window in your store’s time zone; overnight windows work ✓ ✓ ✓ ✓ ✓
Day of the week Days in your store’s time zone ✓ ✓ ✓ ✓ ✓

One time-of-day window per function. When a function uses a time condition, Product type and Product vendor can’t be used in the same function (and in shipping discounts, Line property can’t either) — Shopify limits how much cart data one function can read. Use a product tag or collection instead. More in Happy hours and time-based rules.

Custom data

Condition What it checks Discounts Ship. discounts Shipping rules Payment rules Checkout rules
Cart attribute The value of a cart attribute you name, e.g. gift_wrap ✓ ✓ ✓ ✓ ✓

One cart attribute name and one line property name per function.

Operators

Kind of value Operators
Amounts and numbers is greater than · is at least · is less than · is at most · is · is not · is between
Weight is greater than · is at least · is less than · is at most · is between
Text is · is not · is any of · is none of · contains · does not contain · starts with · ends with · is empty · is not empty
Country is any of · is none of
Tags has any of · has all of · has none of
Collection has any of · has none of
Product, variant is any of · is none of
Yes/no is true · is false
Time of day is between
Day of the week is · is not

How each condition is matched — case, whole tags, missing data and more — is explained in Conditions.

Didn’t find what you need?Email [email protected] and we’ll help you set it up.
Email support