Skip to content

How To

Configuring a Metaobject

You can create metaobjects from two locations in Shopify:
From Content > Metaobjects
From Settings > Custom data
There are two key components to metaobjects:
The definition: the group of fields that defines the object’s structure. This is managed in Settings > Custom data in your Shopify admin.
Entries: the content or data for the metaobject. Entries are created and managed in Content > Metaobjects in your Shopify admin.

Creating a Metaobject

From your Shopify admin, go to Content > Metaobjects.
Click into the metaobject definition that you want to add entries to.
Click Add entry.
Complete the fields for your entry. These fields are determined by the metaobject definition. The field that is marked as the Display name can be used to search for the entry.
If you are creating a standard metaobject, then adjust the base values as needed. These values are predetermined by Shopify's standardized list of values.
Optional: Set the status for your metaobject. New entries are set to Active by default. Active means it's ready to be displayed in your store, but it won't be displayed to customers until you publish it. If an entry is set to Draft, then you can't publish it to your store.
Optional: If you are building a web page with the entry, then choose a theme template. You can click the eye icon to preview the template with your metaobject entry.
Click Save.

Edit Entries

If you want to make changes to the fields that the entry uses, then you need to edit the metaobject definition and not the individual entry.
Steps:
In your Shopify admin, go to Content > Metaobjects.
Click a metaobject definition that has an entry you want to edit.
Click an entry to load the details.
Make any required changes to the entry.
Use the drop-down menu to set the status to Draft or Active.
Click Save.

Add or edit entries for category metafields from the product page

Category metafields use metaobjects and have default entries that include a metafield references.
In your Shopify admin, go to Products.
Click the product with the entries you want to edit or add.
In the Category section, click the category metafield, and then click the entry you want to edit or Add to add a new entry. If you are using the category metafield for your variants, then, in the Variants section, click Edit next to the variant. Then you can either click the entry you want to edit, and then click Edit, or click Add to add a new entry.
Edit or add the fields. You can edit any base values associated with the taxonomy values. For example, if you want to change black to graphite, then you would select the Base color black, and then edit the Label to graphite.

Configuring a Metafield

Steps

Add to add fields for your specialized information to pages in your Shopify admin
to parts of your store, such as products or variants
Optional: to display specialized information on your online store
You can also . Adding definitions for sets of metafields enforces validation rules to ensure that your metafield values are consistent and reliable. If your metafield values don't match the validation rules for your definition, then you can after migration.
Assign to products
Per Product: Products > go to product > scroll to bottom of page > show metafield/metaobject > Save
In Bulk: Products > select products you want to edit > Bulk edit > click columns and show appropriate Metafields > Assign accordingly > Save
Screenshot 2024-04-30 at 12.29.48 PM.png

Definitions

Each metafield definition the following info:
Name: used to identify the metafield in your Shopify admin, such as Color.
Namespace and key: the unique identifier for your metafield. You can use a namespace to group similar metafields together, but each namespace and key must be unique. An example is custom.color.
Description (optional): allows you to include descriptive information, such as what values to enter for the metafield.
Type: the type of data that the metafield stores, such as text, file, or URL.
Categories (on standard product metafield definitions only): The standard product categories that the standard product metafield is associated with.
Validations (optional): the rules for the input of the values, such as character limits, or minimum and maximum values.
Options: where the metafield is available to use.
: Use as filter in admin allows you to use the metafield to filter product searches using Search & Discovery. Use in automated collections allows you to use the metafield to create an automated collection.

Values

Add’t Info:

From your Shopify admin, go to Settings > Custom data.
Select the part of your store that you want to edit a metafield for. For example, Products.
Click the metafield that you want to edit.
Optional: In the Name field, edit the name for your definition.
Optional: In the Description field, enter a new description for your metafield values.
Optional: To allow apps, custom storefronts, and channels to access values for this metafield, select Storefronts in the Access section.
Optional: In the Validation section, configure the Additional rules to change the range of accepted values.
Optional: Change whether the metafield is displayed on the corresponding pages in your Shopify admin by doing one of the following:
To hide the metafield, click Definition pinned.
To display the metafield, click Pin definition.
Click Save.

Referencing Metaobject in Metafield

If you want to use your metaobject in a specific part of Shopify, such as products, orders, or customers, then create a metafield reference. For example, if you built a "Product features" metaobject and you want to use it on your product pages, then you can create a product metafield that references this specific metaobject.
The reference allows you to display unique "Product features" on specific products. For example, you can reference an entry called "Sustainability" on Product A, and an entry called "Materials" on Product B.

Create Reference

From your Shopify admin, go to Settings > Custom data.
Select the part of your store that you want to create the reference for. For example, Products.
Click Add definition.
In the Name field, enter a name for your definition.
Click Select type > Metaobject. You might want to name this metafield with the same name as your metaobject so it's easy for you to find later. You can also select Mixed reference and that will allow you to select more than one metaobject type.
Do one of the following:
Choose One value, if you only need to display one entry per product.
Choose List of values, if you want to display more than one entry in a product.
Select Storefronts to allow your metafield content to be accessible by your storefront.
Click Save.
Now that you have established a relationship between a resource and a metaobject, you'll connect the specific entries to the specific products you want to display the metaobjects on.

Connect Reference

This step is only possible after you’ve created a that references your metaobject.
Navigate to the part of your store that you want your content entries to display on. For example, you can go to a product page in your admin from Products.
In the Metafields section, locate the custom definition that you created previously and click the definition name. If the metafield definition that you created isn't listed, then click Show all.
Click Select entry. The drop-down menu only displays all matching entries of that type. If you set up the definition to accept a list of values, then you can select multiple entries.
Repeat the steps above to link entries to other products, as needed.
You can also create entries from a referenced source. You can click Create new to create a new entry, which is then automatically referenced by Product A and also available to reference on other products as well.

Video Tutorials

How to add new meta values
Part 1.mov
24.2 MB
Screen Recording 2024-04-14 at 6.47.18 PM.mov
8 MB

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.