Skip to main content

Collection rules explained: include, exclude and date conditions

How include/exclude conditions combine, the tag equals-vs-contains gotcha, and how date rules work.

Written by David Farrington

When you build an advanced (automatic) collection, products are added based on the conditions you set. Understanding how those conditions combine will save you a lot of head-scratching. For the basics of creating one, see How to Create an Advanced/Manual Collection.

Include vs exclude

Conditions come in two kinds:

  • Include conditions decide which products enter the collection. You can require all of them to match (AND) or any of them (OR).

  • Exclude conditions remove products from the set the include conditions already built.

Important: exclude only removes products that an include condition first let in. An exclude rule on its own has nothing to act on. So "include vendor contains Tamiya" + "exclude tag equals Clearance" works as expected; but "exclude tag equals Clearance" with no include rule will not build a collection.

The tag "is equal to" vs "contains" gotcha

This trips people up most often:

  • Tag is equal to matches a whole tag exactly. "is equal to sale" matches the tag sale but not sale-2024.

  • Tag contains matches any tag that includes the text. "contains sale" matches sale, sale-2024 and wholesale.

Tag matching ignores case and accents. If excluded products are still showing, check whether you need equals (exact tag) instead of contains, and that the tag is spelled exactly as it is on the products.

Date conditions ("in the last N days")

  • Each date condition uses a specific field: Published date uses the product's published date, Created date the created date, and there are also Last updated, Restocked and New inventory added dates.

  • "In the last N days" is calculated from today in your store's time zone, so make sure your store time zone is correct.

  • If old products appear in a "published in the last 45 days" collection, it's usually because their published date was recently changed β€” re-publishing or re-adding a product to your sales channel updates its published date, so Shopify (and Ouiteo) treat it as newly published.

Metafield conditions

You can also build rules on metafields (text, number, and date types). Metafield conditions are available on the Platinum plan and above β€” see Metafield data.

Did this answer your question?