Use Shopify metafields to add dynamic data to your Nyla site
- Introduction to metafields
- Adding metafields
- Add to Shopify
- Add to Nyla
- Use as properties
- Metafields and line item properties
- Supported metafield types
Introduction to Metafields
Metafields allow you to add custom content/data that are attached to different entities Shopify like products and variations, collections and so on. To read about metafields, you can reference Shopify's documentation here.
Adding metafields:
- Create your metafield in Shopify. Ensure it has a definition and has read access activated for the storefront API
- Add your metafield in Nyla. Go to Apps > Shopify Metafields and fill in your details.
- The metafield type, namespace and key must match exactly what has been entered in Shopify.
- You need to save and publish your metafield in order to use it on your site.
- Once added, metafields act like any other property within Nyla.
-
After your metafield has been added, then you can use it as a property within the corresponding source(s) in Nyla.
-
Note: metafields that include the "price" in the namespace or key cannot be used with Nyla due to clashes with other properties. If your metafield includes price in the namespace or key, you will need to substitute it for another metafield without "price".
Tip: For performance reasons, we recommend to only make metafields available within a source: collection if they are needed in order to optimise performance on product listing pages.
Adding a metafield to your Nyla site
Use metafields with Line Item Properties and Cart Attributes
Supported Metafield Types
Most metafield types are supported, however there are a few types that are unsupported. These include:
- Color
- Product list
- Collection list
- Page list
- Metaobject and metaobject list
Rich text types are supported, however you cannot mix a property with a rich text reference with normal text in a text or header field.