> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uselayers.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Merchandising

> Merchandising rules give you manual and automated control over how products are displayed on collection pages, layered on top of your sort orders.

## What is merchandising in Layers?

Merchandising rules let you take direct control of how products appear on your collection pages. You can manually pin products to specific positions, create expressions that automatically group and prioritize products based on attributes, or combine both approaches for a hybrid strategy.

Merchandising rules extend your sort orders rather than replace them — products that aren't pinned or matched by expressions continue to follow the base sort order.

## How merchandising fits into the platform

The platform uses a priority hierarchy to determine the final order of products on collection pages. Dynamic linking takes the highest priority, followed by merchandising rules, and finally the base sort order:

```mermaid theme={null}
graph TD

    subgraph "Override Behavior"
        DL[Dynamic Linking] --> DLE{Dynamic Linking Applied?}
        DLE -->|Yes - Page 1| DLP[Dynamic Linked Products First]
        DLE -->|No| L[Base Sort Order]
        DLP --> M{Merchandising Rule Exists?}
        L --> M
        M -->|Yes| N[Apply Rule]
        M -->|No| O[Use Base Sort Order]
        N --> P[Pinned Products First]
        P --> Q[Auto-Pin Groups Second]
        Q --> S{Diversity Enabled?}
        S -->|Yes| T[Product Families Cap Applied]
        S -->|No| R[Remaining Products by Base Sort]
        T --> R
        O --> R
    end

    style DL stroke:#dc2626,stroke-width:2px
    style N stroke:#dc2626,stroke-width:2px
    style T stroke:#7c3aed,stroke-width:2px
```

**Priority hierarchy:**

1. **Dynamic linking** (first page only) — Products from ad campaigns or promotional URLs appear first
2. **Merchandising rules** — Manually pinned products and expression-based groups
3. **Base sort order** — The underlying sort order for all remaining products

## Types of merchandising

**Manual merchandising** lets you pin specific products to exact positions on a collection page, giving you precise control over which items receive the most visibility. Pins clustered at the top front-pack as a group, and pins dropped further down hold their exact slot — see [pin placement](/platform/merchandising/pins#pin-placement) for the full rules.

**Automated merchandising** uses expressions to automatically group and prioritize products based on attributes like product type, vendor, tags, or other criteria.

**Hybrid approach** combines manual pinning with expressions for a comprehensive merchandising strategy that balances precision with automation.

## Key capabilities

* **Product families** — Group related products (like color variants of the same style) into families so diversity expressions can cap near-duplicates and show a broader assortment
* **Diversity expressions** — Limit how many products from the same family appear near the top of a collection, powered by [product families](/platform/product-families)
* **Contextual conditions** — Target different audiences with different merchandising strategies based on shopper context (location, channel, customer data)
* **Rule scheduling** — Automatically enable and disable rules based on time windows for campaigns and promotions
* **Soft boost expressions** — Gently adjust product positions within the sort order without creating hard clusters
* **Draft and filtering** — Control how draft products and filters interact with your rules
* **Multiple rules per collection** — Layer multiple rules on a single collection with priority ordering
* **Live preview** — Preview merchandising on your live storefront before saving or publishing

## Next steps

* [Merchandising rules](/platform/merchandising) — Full guide to creating and managing rules
* [Product families](/platform/product-families) — Grouping related products for diversity
* [Diversity expressions](/platform/merchandising/diversity) — Capping near-duplicates using product families
* [Pins & media overrides](/platform/merchandising/pins) — Manual product pinning
* [Expressions & automation](/platform/merchandising/expressions) — Attribute-based product grouping
* [Soft boost expressions](/platform/merchandising/soft-boost-expressions) — Gentle ranking adjustments
* [Contextual conditions](/platform/merchandising/contextual-conditions) — Audience targeting
* [Rule scheduling](/platform/merchandising/scheduling) — Time-based activation
* [Create a merchandising rule](/help/merchandising/create-merchandising-rule) — Step-by-step guide
