# Qualifiers & Criteria

Rules include a variety of settings called “qualifiers” or “criteria” which determine the conditions that need to be true in order for the rule to be in effect.

# All or Any Criteria

All or Any Criteria
All or Any Criteria

This qualifier determines whether ANY of the below criteria can be true for the rule to be in effect, or if ALL of the below criteria need to be true for the rule to be in effect. In almost all cases, the ALL option is chosen. This is because you can simply leave most of the other qualifiers (Carts, Customers, etc) set to “All”.

# Eligible Customers

This criteria determine which customers are eligible for this rule being defined:

  • Customer Email - used to select specific customers or wildcard domain matching
  • Customer Tags - used to select a group of customers by tags (set and view tags on the Shopify Admin > Customers > [specific customer]
  • Customer Order Count - useful for “First time customers” or “Loyalty customers (more than 5 orders)” or “10% off your 2nd purchase”
  • Customer Total Spend - uses the dollar amount spent across all past purchases (not including what’s in their current cart)
  • Customer Accepts Marketing - customers are eligible if they have checked the “sign up for newsletter” (or similar) on checkout.
  • Multi-Select - Meets all criteria
  • Multi-Select - Meets any criteria

# Eligible Carts in Checkout

This criteria determines what cart contents and/or attributes are required to be eligible for this rule.

  • Cart/Item/Discount subtotal
    • Cart current subtotal - commonly used to only apply a rule when customer has at least a certain dollar amount in their cart
    • Qualified item current subtotal - used to check the current total dollar amount of line items that match the “Eligible Line Items” qualifier farther down the rule configuration
    • Applied discount (by scripts) - checks the total discount applied by scripts so far. Rule order can cause complications here. Typically this should be the last rule run in a large configuration.
    • Applied discounts on qualified items (by scripts) - same as above, except it only applies to line items that match the “Eligible Line Items” qualifier farther down the rule configuration
  • Cart/Item/Line quantity
    • Cart total quantity - commonly used to check “are they buying at least 3 things”
    • Specific item total quantity - same as above, except the only items that count are line items that match the Eligible Line Items qualifier farther down the rule configuration
    • Specific items on any line - checks the quantity of cart line items to see if any line items has the appropriate quantity (but the only line items that count are ones matching the Eligible Line Items qualifier farther down the rule configuration)
    • Specific items on any line - same as above except it checks that all line items have the appropriate quantity
  • Cart Has Items - very popular selector to check if the cart contains a quantity or dollar amount of specific items. Items can be matched against Product attributes (ID, tag, type, vendor), Variant attributes (ID, SKU), Line Item property, Price, and more. Different from Eligible Line Items in Cart below. Read an explanation of how they are different. Some more complex ones are:
    • Line Item property - you can set and check line item properties set by liquid code and the Shopify Storefront API. Note: these are different from cart attributes, cart notes, and order notes.
    • Sale item - items are on sale when their price is lower than their “compare at price”
    • Discounted Item Selector (discount by scripts) - eligible when a line item has already received a discount by an earlier part of the Shopify Script. Rule order can cause complications here. Typically this should be the last rule run in a large configuration.
    • Subscription items - items must have the subscription flag appropriately integrated for this to work
  • Multi-Select - Meets all criteria
  • Multi-Select - Meets any criteria
  • Cart Total Weight - not often used because it requires all products and variants to have accurate weights
  • Cart Has Discount Code - checks whether an already created Shopify discount code has been applies to the cart
  • Cart Has No Discount Code - checks that no discount code is being used in the cart
  • Shipping Address - Country/Province Qualifier - checks for specific two-letter country codes AND state/province codes. Here is a list of country codes.
  • Shipping Address - Country Code Qualifier - same as above, but only looks for country codes. Commonly used to prevent discounts or shipping in certain regions.
  • Shipping Address - Zip Code Qualifier - check for specific zip codes
  • Shipping Address - PO Box Qualifier - proprietary check for PO Boxes (looks for a variety of permutations of “po box”, “p.o. box”, etc). Commonly used to prevent shipping to PO Boxes.
  • Shipping Address - Full Address Qualifier - advanced check for any part of an address.
  • Shipping Address - Compare to billing address - a special check which compares the shipping address entered by the customer to the billing address entered.
  • Discounted Cart Subtotal (applied by discount code) - checks the dollar amount of discount so far which has been granted by discount codes. Similar to “Cart/Item/Discount subtotal > Applied discount (by scripts)” above, except it checks for discounts from Shopify Discount Codes instead of Shopify Scripts. Rule order can cause complications here. Typically this should be the last rule run in a large configuration.
  • Cart Locale Qualifier - checks the current language/locale setting of the cart. Different from Country Code above. Almost never used.

# Eligible Line Items in Cart

Very commonly used to select specific line items to be acted upon (typically discounted) based on Product attributes (ID, tag, type, vendor), Variant attributes (ID, SKU), Line Item property, Price, and more. Different from “Eligible Carts in Checkout > Has Items” above.

Some more complex ones are:

  • Line Item property - you can set and check line item properties set by liquid code and the Shopify Storefront API.
  • Sale item - items are on sale when their price is lower than their “compare at price” Discounted Item Selector (discount by scripts) - eligible when a line item has already received a discount by an earlier part of the Shopify Script. Rule order can cause complications here. Typically this should be the last rule run in a large configuration.
  • Subscription items - items must have the subscription flag appropriately integrated for this to work
  • Multi-Select - Meets all criteria
  • Multi-Select - Meets any criteria

# Line Item Qualify Condition

Not commonly available qualifier used to determine whether ALL line items in “Eligible Line Items in Cart” must match or ANY line items in “Eligible Line Items in Cart” can match.

# Multi-Select - Meets all criteria

Powerful selector to require multiple sets of criteria to apply instead of just one. All criteria selected must match. Can set one, two, or three simultaneous criteria.

# Multi-Select - Meets any criteria

Same as above except that ANY of the one, two, or three criteria needs to match (instead of ALL).

😮 We've just covered a lot!!! To see some of this in action, please check out the respective types of rules sections in this documentation to learn more.