---
title: "Prioritize Similar Products with Product Affinity Signals"
description: "Rank products that share the cart's colour, material or other metafield first, or show only those products in an upsell."
url: https://docs.orderediting.com/en/articles/15323725-prioritize-similar-products-with-product-affinity-signals
collection: "Strategies and Configuration"
updated: 2026-11-05
language: en
---

# Prioritize Similar Products with Product Affinity Signals

Rank products that share the cart's colour, material or other metafield first, or show only those products in an upsell.

# Before you begin

Product affinity looks at the products in a customer's cart and favours upsell products that share their field values, such as the same colour, activity or material. The fields are your product and variant metafields.

-   It works on dynamic product modules: **Collection**, **Keyword Search**, **Recent Best Sellers**, **Metafields** and **ProfitPeak**. Fixed selections such as **Single product** and **Product group** keep the order you chose, and **Smart Recommendation** keeps its price order.
    
-   A field can be used when it is a product or variant metafield with storefront access turned on in its Shopify definition, and a type Shopify Search & Discovery can filter on: true or false, a number, single line text, a list of single line text, or a metaobject reference.
    
-   Fill the field in consistently on the products customers buy and on the products you want to upsell. A product with no value can never match.
    

# Add Product affinity to a strategy

1.  In the Shopify admin, go to **Apps > Order Editing** and open the strategy.
    
2.  Next to **Add product module**, select **Product Affinity**.
    
3.  Under **Fields you can add**, select **Add** beside each field you want to match on, up to three. Fields that are Search & Discovery filters are listed first. When you have more than eight fields, use the search box or **Show all** to find the rest.
    
4.  In **Match on**, use the arrows to set the order. The first field counts the most. To take a field out, select its remove button.
    
5.  Under **Products to show**, choose **Show matches first** or **Only show matching products**. The box under the options lists the order customers see matches in.
    
6.  Select **Done**, then save the strategy.
    

# Choose which products show

<table style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><th colspan="1" rowspan="1"><p>Option</p></th><th colspan="1" rowspan="1"><p>What customers see</p></th></tr><tr><td colspan="1" rowspan="1"><p><strong>Show matches first</strong> (default)</p></td><td colspan="1" rowspan="1"><p>Products that share the cart's values lead. The module's usual products fill the remaining spaces.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Only show matching products</strong></p></td><td colspan="1" rowspan="1"><p>In dynamic modules, only products that share the cart's value for your first field appear. Your other fields only change their order.</p></td></tr></tbody></table>

With **Only show matching products**:

-   When nothing in the cart has a value for the first field, customers see the module's usual products.
    
-   When the cart has a value but no product matches it, the dynamic modules show no products. Fixed selections such as **Product group** and **Single product**, and **Smart Recommendation**, still show theirs, so the upsell only disappears when the dynamic modules were all it had.
    
-   If you remove every field, **Products to show** switches back to **Show matches first**.
    

> **Success:** **Only show matching products** works best on a **Collection** module whose first field is a Search & Discovery filter. The module then fills every space with matching products from the whole collection.

# Fields that only reorder

A field that is not a Search & Discovery filter is listed under **Other fields, reorder only**, and once added it reads **Only reorders what your modules already show.** It can move matching products up, but it cannot find new ones. With **Only show matching products** and such a field first, a warning under the option explains that only matches already in your usual products can show, so fewer products may appear.

To let the field find more matches:

1.  Select **Add it as a Search & Discovery filter** under the field, or the link under the warning (for example **Add Colour as a filter**), and add the field as a filter in Shopify **Search & Discovery**.
    
2.  Return to the strategy and open **Product Affinity** again. Order Editing switches the field to a filter.
    
3.  Save the strategy.
    

If a field's filter is turned off in Search & Discovery after you added it, the field says so. Turn the filter back on, or remove the field and add it again.

**Keyword Search** and **Recent Best Sellers** can only search on Shopify category fields. With one of your own product or variant fields first, these modules keep just the matches among their usual results, and the field reads **Only reorders in Keyword Search** or similar. They may show fewer products than a **Collection** module.

# How matching works

-   Order Editing reads up to the ten products with the highest quantities in the cart and takes the most common value for each field. When two values tie, both count.
    
-   It first looks for products that match every field in **Match on**, then tries again without the last one.
    
-   Matches on a higher field always rank above matches on lower fields.
    
-   For a variant field, the product card opens on the variant that matched, for example the Olive option of a jogger when the cart holds an olive top.
    

# Preview the result

The strategy preview shows sample products without a cart, so it can't show which products a customer's cart would match. With **Only show matching products** turned on, the **About this preview** note on the preview says so, because each customer's own cart decides which products appear.

To check a real journey, add a product with a value for your first field to the cart and continue to checkout. Then try a product without a value and confirm the module's usual products appear.

If no product matches when you expect one, check that the field is filled in on both the cart product and the upsell products, and that storefront access is on in its definition.

## Related

- [How to Customize Your One-Click Upsell Page](https://docs.orderediting.com/en/articles/15323698-how-to-customize-your-one-click-upsell-page.md)
- [Upsell Customer Targeting](https://docs.orderediting.com/en/articles/14466316-upsell-customer-targeting.md)
- [Understanding Upsell Strategy Matching](https://docs.orderediting.com/en/articles/14391612-understanding-upsell-strategy-matching.md)
- [Creating an Upsell Strategy](https://docs.orderediting.com/en/articles/14466314-creating-an-upsell-strategy.md)
- [Configuring Upsell Settings](https://docs.orderediting.com/en/articles/14466307-configuring-upsell-settings.md)
