Match any vs match all¶
Guide type: Explanation Difficulty: Beginner Applies to: Product display rules
Every product display rule has one or more match conditions. A condition checks a property of the product, such as the collection it belongs to, its product type, a tag, or the vendor name.
When SmartSize decides whether to show a size chart or fit quiz on a product page, it checks whether the product matches the rule's conditions. The Match any and Match all settings control how those conditions are combined.
How match conditions work¶
A match condition has three parts:
- Property — what to check, such as Collection, Product type, Tag, or Vendor
- Operator — how to compare, such as equals, contains, or starts with
- Value — the specific value to match against, such as "Dresses" or "Women"
You can add multiple conditions to a single rule. The Match any or Match all setting tells SmartSize how to evaluate those conditions together.
Match any¶
When a rule is set to Match any, the product matches the rule if at least one condition is true. Think of it as an OR relationship.
Example¶
A rule with two conditions:
- Collection equals Dresses
- Product type equals Dress
With Match any, the rule matches:
- a product in the Dresses collection, even if its product type is something else
- a product with product type Dress, even if it is not in the Dresses collection
- a product that is both in the Dresses collection AND has product type Dress
Use Match any when you want to cast a wide net. It is useful when your products are organized in different ways and you want to catch them through any matching property.
Match all¶
When a rule is set to Match all, the product matches the rule only if every condition is true. Think of it as an AND relationship.
Example¶
A rule with two conditions:
- Collection equals Dresses
- Tag equals Premium
With Match all, the rule matches only products that are:
- in the Dresses collection AND
- tagged with Premium
A product in the Dresses collection without the Premium tag will not match. A product tagged Premium but not in the Dresses collection will also not match.
Use Match all when you want to target a specific subset of products. It is useful for creating narrow rules that apply only to products that meet multiple criteria.
When to use each¶
| Use Match any when… | Use Match all when… |
|---|---|
| Products could match through different properties | You need all conditions to be true |
| You want broad coverage with one rule | You want to target a specific product subset |
| Conditions describe alternative ways to identify the same group | Conditions describe layered filters |
Common mistake: mixing match logic¶
A common mistake is adding many conditions to a rule and leaving it on Match all by default. If you add five conditions with Match all, every product must satisfy all five. That often results in no products matching the rule, and the size chart or quiz never appears.
If your rule is not matching any products, check whether Match any would work better. In most stores, Match any with one or two conditions is enough to target the right products.
How rules are ordered¶
When a product matches more than one rule, the rule with the highest priority wins. Match any and match all do not affect priority; they only control whether the product enters the rule in the first place. For more details on rule ordering, see Set up product display rules.