Conditions for automated collections

You can add one or more conditions for an automated collection to match products based on many details, including product title or type, tags, price, or even inventory stock.

As of January 30, 2019, collections can have at most 60 conditions.

If you already have a collection that has more than 60 conditions, then you can still use it. You can edit or delete its existing conditions, but you can't add any conditions while it's over the limit.

Set conditions based on product title, variant title, type, or vendor

您可以添加一个条件包括的产品collection based on the product's title, variant title, type, or vendor. You can select from the options in the second drop-down list to control how a product needs to match the condition value that you enter in the third field. The text that you enter in the third field is compared to your products according to the condition's settings, and matching products are included in the collection. The condition is not case-sensitive.

You can select from the following options to control how a product needs to match the condition value that you enter:

Description of condition behaviors
Term Description
is equal to A product needs to match exactly the whole value you enter.
is not equal to A product can't match the value you enter.
starts with The beginning of the product title, type, or vendor matches the value you enter.
ends with The end of the product title, type, or vendor matches the value you enter.
contains The product title, type, variant title, or vendor contains the value you enter. You need to specify a value that is at least 3 characters long, and the value can't start or end with spaces.
does not contain The product title, type, variant title, or vendor doesn't contain the value you enter. You need to specify a value that is at least 3 characters long, and the value can't start or end with spaces.

Conditions for variants

If you set up a condition for a product that has variants, then that condition istrueifanyvariant matches the condition. This applies whetherall conditionsorany condition被选中。

For example, suppose you have a product that has five variants. Four of the variants have inventory, but one is out of stock. If you have a collection that has a condition ofInventory stock is greater than 0, then the product is included in the collection because at least one of the variants matches the condition.

Set conditions based on product category

You can set a condition to include products with a particularproduct category. For a condition that uses product category, select the desired category from the drop down.

For example, to set up a condition that selects products with the product categoryTelevisions:

  1. SelectProduct categoryfrom the first drop-down list.
  2. Selectis equal tofrom the second drop-down list.
  3. SelectTelevisions

Set conditions based on product tags

You can set a condition to include products with a particularproduct tag. When a condition uses product tags, you need to enter the exact tag as a condition value.

For example, to set up a condition that selects products tagged withaccessories:

  1. SelectProduct tagfrom the first drop-down list.
  2. Selectis equal tofrom the second drop-down list.
  3. Enteraccessories.

Although you can create tags that use some special characters, they might not work as you expect in searches or as conditions in automated collections. Special characters in tags are either ignored or are treated as being the same.

Example: Suppose you have a condition for an automated collection ofProduct tag is equal to red-new. All products that have the following tags are also included in the collection:red_new,red+new,red&new.

For more information about tags, seeTag formats.

Set metafield definition conditions based on metafield values

You can add a condition to include products or variant with a particularmetafieldvalue.

In order to have the metafields available to you when creating collections, you need toactivate the automated collections setting for the metafield definition. You can have the automated collections setting activated on a maximum of 128 definitions per product metafield definitions and variant metafield definitions.

The first column of the drop-down list for your automated collection conditions is the name of your metafield definition. The second drop-down list or text box is your metafield values.

For example, to set up a condition that selects products with the metafield definitionColorand the value#FF0000, do the following:

  1. SelectColorfrom the first drop-down list.
  2. Selectis equal tofrom the second drop-down list.
  3. Type#FF0000.

Learn more aboutautomated collections by metafields.

Set conditions based on price, weight, or inventory stock

您可以添加一个条件包括的产品collection based on its price, compare-at price, weight, or inventory. You can set the condition to include products that match its value exactly, or products that are greater or less than its value:

Description of condition behaviors
Term Description
is equal to A product needs to match the exact value.
is not equal to A product can't match the value.
is greater than The product is greater than the value.
is less than The product is less than the value.
is empty

Compare-at priceonly:

The product doesn't have aCompare-at pricevalue.
is not empty

Compare-at priceonly:

The product does have aCompare-at pricevalue. This value can be zero. If any of a product's variants has aCompare-at pricevalue, then the product is considered to have aCompare-at price.

For example, to set up a condition that includes products that are priced $100 or less:

  1. SelectProduct pricefrom the first drop-down list.
  2. Selectis less thanfrom the second drop-down list.
  3. Enter$100.01.

Using multiple selection conditions

You can set more than one selection condition to control which products are included in a collection. You can choose whether products must match all the conditions to be included in the collection, or any of the conditions.

例如,假设您设置two following conditions for a collection:

  • Product tag is equal toshirt.
  • Price is less than$100.01.

If you selectall conditions, then products are included only if they are tagged withshirtand are also priced at $100 or less. Products need to match both conditions to be included in the collection.

If you selectany condition, then products are included if they are tagged withshirtor if they are priced at $100 or less. Products need to match only one condition to be included in the collection.

Set multiple conditions to define a range

To include the products with a price, weight, or inventory value within a range, you need to set more than one condition. The low end of the range is defined in one condition, and the high end of the range in another. You need to selectall conditionsto include only the products that fall within the range.

For example, to set up a collection that includes products priced within a range of $50-$150, you would set up the two following conditions:

  1. Product price is greater than$49.99.
  2. Product price is less than$150.01.
Ready to start selling with Shopify?Try it free