---
title: "Metafields Module"
description: "Recommend products from product-owned or variant-owned Shopify metafields that point at products, variants, or collections."
url: https://docs.orderediting.com/en/articles/15323543-metafields-module
collection: "Product Modules"
updated: 2026-09-29
language: en
---

# Metafields Module

Recommend products from product-owned or variant-owned Shopify metafields that point at products, variants, or collections.

# Before you begin

-   Create Shopify metafields that store product, variant, collection, or list references.
    
-   Give each metafield Storefront access in Shopify. Definitions with Storefront access set to None do not appear.
    
-   Put values on the product or variant that customers add to the cart.
    
-   You can select up to 5 metafields in one module.
    

# When to use it

Use **Metafields** when product relationships already live in your catalog, instead of broad rules.

-   A product metafield points to matching accessories for every variant of that product.
    
-   A variant metafield points to a compatible refill or replacement part for one selected SKU.
    
-   A collection reference metafield points to a related set of products.
    
-   Your [merchandising](/docs/en/collections/19118939-merchandising) team already maintains these relationships in Shopify.
    

# Product metafields and variant metafields

The picker has two sections: **Product metafields** and **Variant metafields**.

<table style="min-width: 75px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><th colspan="1" rowspan="1"><p>Owner</p></th><th colspan="1" rowspan="1"><p>Where the metafield lives</p></th><th colspan="1" rowspan="1"><p>What Order Editing reads</p></th></tr><tr><td colspan="1" rowspan="1"><p><strong>Product</strong></p></td><td colspan="1" rowspan="1"><p>The product in Shopify</p></td><td colspan="1" rowspan="1"><p>The cart product. Every variant of that product shares the same related products.</p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Variant</strong></p></td><td colspan="1" rowspan="1"><p>The variant in Shopify</p></td><td colspan="1" rowspan="1"><p>The selected cart variant only. Sibling variants can point at different related products.</p></td></tr></tbody></table>

Owner is not the same as type. Type is what the metafield points at: a product, a variant, a collection, or a list of those.

The same namespace and key can exist twice, once on the product and once on the variant. Select the row that matches where you stored the value. Each selected row shows a **Product** or **Variant** badge.

# Set up the module

1.  Open **Apps > Order Editing > Upsells** and create or edit a strategy.
    
2.  Go to **WHAT** and select **Add Module**.
    
3.  Select **Metafields**. The **Select metafields** picker opens.
    
4.  Choose a metafield from **Product metafields** or **Variant metafields**.
    
5.  Select **Add** if you need another metafield, up to 5.
    
6.  If you selected a collection reference, set **Max products per collection**.
    
7.  Set **Recommended quantity**.
    
8.  Write the offer text.
    
9.  Select **Save**.
    

> **Info:** Product metafields read the cart product. Variant metafields read the selected variant.

# Configuration options

<table style="min-width: 75px;"><colgroup><col style="min-width: 25px;"><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 it controls</p></th><th colspan="1" rowspan="1"><p>Recommended approach</p></th></tr><tr><td colspan="1" rowspan="1"><p>Selected metafields</p></td><td colspan="1" rowspan="1"><p>Which product-owned or variant-owned references are used</p></td><td colspan="1" rowspan="1"><p>Choose metafields your team maintains, and match the owner to where the value lives</p></td></tr><tr><td colspan="1" rowspan="1"><p>Max products per collection</p></td><td colspan="1" rowspan="1"><p>How many products to pull from each collection reference (1 to 20)</p></td><td colspan="1" rowspan="1"><p>Keep this low so the relationship stays specific</p></td></tr><tr><td colspan="1" rowspan="1"><p>Product filters</p></td><td colspan="1" rowspan="1"><p>Limits returned metafield products</p></td><td colspan="1" rowspan="1"><p>Use filters as guardrails, not as the main logic</p></td></tr><tr><td colspan="1" rowspan="1"><p>Recommended quantity</p></td><td colspan="1" rowspan="1"><p>How many units the offer suggests</p></td><td colspan="1" rowspan="1"><p>Match the typical add-on quantity</p></td></tr><tr><td colspan="1" rowspan="1"><p>Offer text</p></td><td colspan="1" rowspan="1"><p>The message shown with referenced products</p></td><td colspan="1" rowspan="1"><p>Explain the relationship, such as compatibility or refill fit</p></td></tr></tbody></table>

# How to structure the data

Use product or variant reference metafields for exact recommendations. Use collection reference metafields when each source should point to a small curated collection.

Keep the number of referenced products small. The more precise the relationship, the better the offer feels.

If your team will not maintain metafield values, use a [Collection module](/docs/en/articles/15323524-collection-module) or Keyword Search instead. Empty metafields create empty recommendations.

<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>Catalog setup</p></th><th colspan="1" rowspan="1"><p>Recommended use</p></th></tr><tr><td colspan="1" rowspan="1"><p>Product-owned product reference</p></td><td colspan="1" rowspan="1"><p>One or more related products for every variant of the purchased product</p></td></tr><tr><td colspan="1" rowspan="1"><p>Variant-owned product reference</p></td><td colspan="1" rowspan="1"><p>SKU-specific compatibility, such as a refill that matches only that variant</p></td></tr><tr><td colspan="1" rowspan="1"><p>Variant reference</p></td><td colspan="1" rowspan="1"><p>A specific compatible variant, such as a matching part</p></td></tr><tr><td colspan="1" rowspan="1"><p>Collection reference</p></td><td colspan="1" rowspan="1"><p>A curated collection tied to the product or variant</p></td></tr></tbody></table>

# Preview the offer

1.  Open the strategy preview.
    
2.  Confirm the referenced products appear for a cart line that has values in the selected metafields.
    
3.  For a variant-owned metafield, preview two variants of the same product when they should recommend different products.
    
4.  For Checkout Page placement, add a matching product to the cart and continue to checkout. You do not need to place an order.
    

# Troubleshooting

## No metafields are available

Check that the Shopify definitions use supported reference types: product, variant, collection, or a list of those. Text-only metafields are not enough.

Check Storefront access. Definitions set to None do not appear.

## No products appear

For a **Product** badge, check that the purchased product has a value.

For a **Variant** badge, check that the selected cart variant has a value. A product-level value is not used.

Empty metafields do not produce recommendations.

## The wrong related product appears

Confirm you selected the row under **Product metafields** or **Variant metafields** that matches where you stored the value. The same namespace and key on the product and on the variant are different selections.

## Too many collection products appear

Lower **Max products per collection**.

## Related

- [Product Modules](https://docs.orderediting.com/en/articles/14466379-product-modules.md)
- [Upsell Products from Cart Module](https://docs.orderediting.com/en/articles/15323570-upsell-products-from-cart-module.md)
- [Upsell / Downsell Module](https://docs.orderediting.com/en/articles/15323568-upsell-downsell-module.md)
- [Subscription Upsell Module](https://docs.orderediting.com/en/articles/15323559-subscription-upsell-module.md)
- [Single Product Module](https://docs.orderediting.com/en/articles/15323557-single-product-module.md)
