What this helps you do
Create the structure for a reusable record. For example, a Size choice definition can contain Name and Fit note fields. Small, Medium and Large are separate entries you add after creating that definition.
Before you start
You need permission to manage Custom data. Decide which fields every record needs. A definition can contain up to 40 fields.
Steps
- Open Custom data. Beside Metaobject definitions, select Add definition.
- Enter a Name, such as “Size choice”. Optional: Select Add description to explain its purpose.
- Under Fields, enter a label such as “Name”. Choose One → Single line text for that field.
- Optional: Select Add field for other details, such as a Fit note. Expand a field to set its description, Required choice and Storefront access.
- Under Metaobject options, use Active-draft status if entries need a draft stage. Enable Storefront API access when entries should be available to your storefront. Also allow Storefront access on each field you intend to display.
- Under Field options → Display name, choose the Name field. This makes pickers show names such as “Small” after you fill the entries.
- Select Save.
What happens next
The definition is ready, but it has no records until you add entries. Open its More actions → View entries to begin.
For a colour definition, you could use Name and a Colour field labelled Swatch. Choose one colour for a plain swatch or a list for a multicolour entry. Those are example fields you choose, not mandatory fields for every metaobject.
A product can reference these records through a metafield of type Metaobject. Creating the definition alone does not attach it to products, create variants or add a section to a theme.
Common problems
- You want to enter Small or Medium: Those are entries, not fields in the definition. Save the definition, then use More actions → View entries → Add entry.
- The Name field is missing from Display name: Use a single-line text field with One value.
- A field should be available in a theme: Both its own Storefront access and the definition's Storefront API access must be enabled.
- Delete definition is blocked: Its entries and references must be removed first. Review where it is used before attempting deletion.