Creating Custom Filters with Metafields
What Are Custom Filters?
In addition to the built-in filters (colour, size, price, tags), you can create filters for any product attribute — Brand, Material, Width, Fit, or anything your catalogue needs. Custom filters use the Metafields system and appear in the storefront sidebar automatically once products have values.
Step 1 — Create a Metafield Definition
- Go to Admin → Settings → Custom Data (or Settings → Metafields).
- Under Product Metafields, click + Add Definition.
- Fill in:
- Name — the human-readable label (e.g. "Brand").
- Namespace — a grouping prefix (e.g. "custom").
- Key — the identifier (e.g. "brand").
- Field type — choose from: Single line text, Number (integer), Number (decimal), True/False, Color, or List of text values.
- Check "Available as filter on collection pages".
- Optionally set a filter label and display type (chips, swatches, etc.).
- Click Create.
Cartly automatically updates the search index schema. This takes a few seconds.
Step 2 — Assign Values to Products
- Open a product at Admin → Products → [product name].
- Scroll to the Metafields section at the bottom of the page.
- Find your new definition (e.g. "Brand") and enter a value (e.g. "Nike").
- Click Save.
Cartly reindexes the product automatically. Repeat for all products you want included in this filter. Once at least one product has a value, the filter bucket appears in the collection sidebar.
Step 3 — Customise the Filter (Optional)
The new filter appears automatically with default settings. To customise it:
- Go to Admin → Settings → Storefront Filters.
- Click + Add filter.
- In the modal, scroll to the Product Metafields section and select your new filter.
- Set the label, display type, position, and scope (Global or a specific collection).
- Click Save.
Frequently Asked Questions
How long does it take for the filter to appear?
Usually a few seconds after you save a product with a metafield value. The product is reindexed automatically on save. If the filter does not appear after a minute, use Reindex products in Settings → Storefront Filters.
What field types support filtering?
Single line text, Number (integer), Number (decimal), True/False, Color, and List of text values. Date and Rich text fields are not supported as filter types.
Can I filter by variant metafields?
Yes — create a Variant Metafield Definition and check the filterable toggle. The URL scheme uses a filter.v.v.metafields. prefix for variant metafields.