Skip to the article

Build a smart collection

Write conditions that decide which products belong, combine them with all or any, and check the live preview before saving.

A smart collection describes its members instead of listing them. You write the conditions, Storefront finds everything that matches, and it keeps matching as the catalogue changes.

The Conditions and Live preview cards on a smart collection. Products must match is set to Any condition, and one rule reads Tag is equal to next-day. Live preview reports 16 products match and shows the first ten as cards with their images, names and SKUs.
The preview counts and lists the matches before you save.

Write the conditions

  1. Open the collection and find Conditions.

  2. Beside Products must match, choose All conditions or Any condition.

  3. Choose what to test in the first list, such as Tag or Price.

  4. Choose how to compare it in the second, such as is equal to or is greater than.

  5. Enter the value to compare against.

  6. Select Add condition for another, then select Save.

All conditions narrows: a product has to satisfy every row. Any condition widens: one row is enough. Two rows under All asking for a price under fifty and a type of goods is a different collection from the same two rows under Any.

What you can test

The conditions available in the Conditions editor
FieldWhat it does
Product titleThe name a shopper reads.
SKUThe stock code, which suits starts with for a family of codes.
MPNThe manufacturer's part number.
VendorThe supplier on the product.
ManufacturerWho makes it.
BrandThe brand it is sold under.
Product typeGoods or service.
ConditionThe condition recorded on the product.
Variant labelThe wording that names a variant within its family.
Inventory statusThe product's own status.
TagOne of the tags on the product. The most useful condition of the lot.
PriceThe selling price, compared as a number.
WeightThe weight, compared as a number.
Inventory stockHow many are on hand, compared as a number.
Spec attributeA metafield. Name the key, then compare its value.

The comparisons on offer change with what you are testing. A number offers is greater than and is less than; text offers contains, starts with and ends with; everything offers is set and is not set, which take no value at all.

Check the preview before saving

Live preview sits beside the conditions and updates as you type, saying how many products match and listing them. A product still in draft is marked, so you can tell the difference between a rule that matches nothing and a rule that matches things no shopper can see yet.

What happens after you save

Membership recomputes when you save, and again whenever a product changes in a way that affects it. Nobody has to revisit the collection to keep it current, which is the whole point of a smart one.

Was this document helpful?