metafields.custom.material. This dot notation lets you reach into nested product data to create precise, targeted attributes.
Nested metafield object keys
When metafield values are JSON objects, you can create attribute codes that access nested object keys. The namespace and key portions must be alphanumeric with underscores, but object keys can contain spaces and special characters. For instance, if you have a “color_family” metafield that maps specific shades to general color groups, you can create an attribute that targets each individual mapping within that metafield. This enables you to:- Create filterable attributes for nested metafield values to enable faceted navigation
- Sort products by nested metafield object values
- Use nested values in merchandising rules and collection filters
This syntax works for both product metafields and variant metafields.
Automatic metafield attribute creation
When your catalog is synced, the system automatically creates attributes for metafields that exist on your products but don’t have formal metafield definitions in Shopify. The system creates these attributes with conservative defaults (all search/filter settings disabled) to ensure they don’t affect your search experience until you explicitly configure them. Default settings for auto-created metafield attributes:- Searchable: Disabled
- Filterable: Disabled
- Sortable: Disabled
- Partial Matching: Disabled
Creating attributes from metafields
You can create catalog attributes directly from your Shopify metafield definitions on the Metafields & Metaobjects settings page. This is useful when you want to quickly make specific metafields available for search, filtering, or sorting without manually entering attribute codes. How to create a single attribute:Select the metafield tab
Choose either the Product Metafields or Variant Metafields tab depending on where the metafield is defined.
Find the metafield
Locate the metafield you want to create an attribute for. The Attribute column shows whether an attribute already exists for each metafield.
Select metafields
Use the checkboxes on the left side of the table to select multiple metafields. You can also use the header checkbox to select all visible metafields at once.
You can create up to 100 attributes at a time using bulk creation. Metafields that already have a matching attribute are automatically skipped.
Next steps
- Attribute options — Searchable, filterable, sortable, and visibility settings
- Attribute classes — Categorical, feature, and price classifications
- Calculated attributes — Creating dynamic attribute values with formulas
- Product schema — Understanding your Shopify product data structure
- Metafields — Working with Shopify metafields