> For the complete documentation index, see [llms.txt](https://docs.globo.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.globo.io/filters/filter-options/filter-products-by-metafield.md).

# Filter products by metafield

If your product data includes custom metafields (material, fit, certification, technical specs, or anything else you've defined in Shopify), you can declare...

## What this does

You can add a filter option based on **Product Metafields** or **Variant Metafields** using the Smart Product Filter & Search app. This is useful for custom attributes like material, style, or any extra data that doesn’t come by default in Shopify.

## Prerequisites

* The metafield must already exist and have values set on your products/variants in Shopify.
* The number of metafields you can use for filtering depends on your plan — see [App pricing](/pricing/app-pricing.md).

## Steps

1. In the app, go to **Settings > Metafields**.
2. Click **Add metafield**.
3. Choose **Resource** (Product or Variant), then enter the metafield's **Namespace** and **Key** exactly as defined in Shopify, and choose what it **Applies to** (e.g. display, filter, sort, search).
4. Click **Sync metafields**, then **Save** in the bar at the top of the page.

![Settings > Metafields — declare a metafield](https://2009335375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKmtdB4I84W3J8hc91H4S%2Fuploads%2Fgit-blob-ea6ffcd6513b4e9e4c4ae09300871b26bee09a64%2Fsettings-metafields-row.png?alt=media)

5. Go to **Filters** and open (or create) the filter you want to add it to.
6. Click **Add filter option** and choose the metafield as the **Source** — see [Configure filter options](/filters/filter-options/configure-filter-options.md).
7. Give it a **Label** and click **Save**.

Once added, manage which of its values show and their order the same way as any other filter option — see [Manage filter option values](/filters/filter-options/configure-filter-options/manage-filter-option-values.md).

## Tips

* Metafields with a list/array type (e.g. multiple certifications on one product) work well as multi-select filter options.
* After adding new metafield values to products, run [Sync Product Data](/getting-started/sync-product-data.md) if the new values don't show up right away.

## Related pages

* [Configure filter options](/filters/filter-options/configure-filter-options.md)
* [Manage filter option values](/filters/filter-options/configure-filter-options/manage-filter-option-values.md)
* [Sync Product Data](/getting-started/sync-product-data.md)
