Skip to main content

Create a searchable / filterable product metafield

Thanks to the recent update in Shopify's API, merchants can create up to 50 indexable metafields that can be used to filter products.

To create one, go to Settings (1) -> Custom data (2) -> Products (3) -> Add definition (4):

settings

custom-data

add-definition

Next, specify the namespace/key combination (5), select a supported metafield type (6), and enable the "Filtering for products" option (7):

add-product-metafield-definition

Currently, the following metafield types are supported:

  1. Single line text / Single line text (list)
  2. Product reference / Product reference (list)
  3. True or false (boolean)
  4. Collection reference / Collection reference (list)
  5. Page reference / Page reference (list)
  6. Metaobject reference / Metaobject reference (list)
  7. ID

Press the Save button (8):

save-button

A properly configured metafield definition becomes available in our app's filtering menu. To access such a filter, press the filtering button (1):

the-filtering-button

Then, the Add filter button (2):

add-filter-button

Next, select a previously created metafield (3):

shipping-date

Finally, specify the metafield value (4):

specify-the-metafield-value

The filtered selection looks like this:

the-filtered-selection-looks-like-this