Adding Rules
How to add rules and conditions to components
Components use a Rules → Conditions hierarchy to determine exactly which products surface to shoppers.
Conditions
A Condition is a single, atomic check against the product catalog.
- Examples:
Price < $50,Product type = Jackets, orTags = sale.
Rules
A Rule acts as a container for one or more Conditions.
- Conditions within a single Rule can be combined using AND / OR logic.
Multiple Rules
Rules themselves are combined with AND logic.
Logic Summary
To help visualize the hierarchy:
- Condition = Atomic check
- Rule = Logical group of conditions
- Multiple Rules = The full merchandising strategy
Merchandising Controls
Each Rule applies one control type that determines how matching products behave within the strategy.
| Control Type | Action | Behavior |
|---|---|---|
| Only Show | Inclusion | Narrows eligibility only to products matching the Conditions. |
| Hide | Exclusion | Removes matching products entirely. Overrides Only Show. |
| Bury | Demote | Products remain eligible but are ranked lower. |
| Promote | Boost | Products remain eligible but are ranked higher. Use Promotion strength to control how strong the boost is. |
| Pin | Lock Position | Fixes a specific product (by Product ID) to an exact position (e.g., Position 1), ignoring natural algorithmic ranking. |
Application Scope
The available criteria come from the store's Shopify product data, including metafields, so the list varies by store. Common criteria include:
- Product attributes: Tags, vendor, product type, status, and collections (ID, handle, or title).
- Variant attributes: Price, compare-at price, inventory quantity, SKU, barcode, and options (such as size or color).
- Specific products: Individual Product IDs.
Each condition compares a criterion to a value. Operators include less than, more than, equals to, not equals to, between, more than percent, and less than percent.
Note: If a product is targeted by both an Only Show rule and a Hide rule, the Hide rule takes precedence and the product will be removed.
Condition Examples by Attribute
Below are common configurations for applying merchandising logic across different product attributes.
Price
- Only Show
Price < $50→ Only budget products appear. - Hide
Price > $200→ Luxury items are removed from view. - Bury
Price > $150→ Higher-priced items sink to the bottom. - Promote
Price < $40→ Entry-level items rise to the top.
Tags
- Only Show
Tags = summer→ Only products tagged "summer" appear. - Hide
Tags = discontinued→ Discontinued products are removed from view. - Bury
Tags = clearance→ Clearance products sink to the bottom. - Promote
Tags = new-arrival→ New arrivals rise to the top.
Collection & Product ID
- Collection
- Only Show
Collections - handle = mens-jackets - Hide
Collections - handle = gift-cards - Bury
Collections - handle = accessories - Promote
Collections - handle = new-arrivals
- Only Show
- Product ID
- Only Show
Id = 123456 - Hide
Id = 789101 - Bury
Id = 222333 - Promote
Id = 999888
- Only Show
Inventory
- Only Show
Variants - inventory quantity > 0→ Only in-stock products appear. - Bury
Variants - inventory quantity < 5→ Low-stock products sink to the bottom.
Precedence Order
Eligibility is always evaluated before ranking.
- Hide (Highest priority - if it's hidden, other criteria will not apply).
- Pin (Overrides other criteria besides Hide).
- Only Show (Filter logic).
- Promote / Bury (Final ranking adjustments).
Important
A product must pass both the Hide and Only Show logic checks before Promote or Bury ranking changes are applied.
Grouping Rules & Conditions — Examples
The power of the strategy engine lies in combining multiple rules and conditions. Here is how logic translates to results:
Simple AND Rule
- Rule 1 — Only Show
- Conditions (AND):
Product type = AccessoriesANDPrice < $100 - Result: Only accessories under $100 are eligible.
OR Conditions Within One Rule
- Rule 1 — Promote
- Conditions (OR):
Tags = new-arrivalORVendor = Acme - Result: Either new arrivals or products from Acme receive a boost.
Multiple Rules with AND (Eligibility + Blocking)
- Rule 1 — Only Show (AND):
Product type = Jackets,Price < $180,Variants - inventory quantity > 0 - Rule 2 — Hide (OR):
Tags = clearance,Tags = final-sale - Result: Only in-stock jackets under $180 are eligible; however, any clearance or final-sale items are removed entirely.
Mixed Eligibility + Ranking (Layered Strategy)
This approach separates hard eligibility gates from soft ranking influence.
| Rule Type | Logic | Purpose |
|---|---|---|
| Only Show | Price < $250 AND Variants - inventory quantity > 0 AND Product type ≠ Gift Card | Gate: In-stock, affordable items only. |
| Hide | Tags = discontinued OR Id IN [111, 222] | Block: Removes discontinued or specific products. |
| Promote | Tags = new-arrival AND Vendor = Acme | Boost: New arrivals from a key brand rise to the top. |
| Bury | Tags = clearance OR Variants - inventory quantity < 5 | Demote: Sinks clearance or low-stock items. |
Saving & Testing
Once the logic is configured:
- Save: The Component will appear in the Component Table.
- Validate: Use the Playground to preview and validate the logic against real data before going live.