Skip to content

Metafields & metaobjects

When the built-in fields aren’t enough — care instructions, ingredients, size charts, designer bios, ingredient glossaries — metafields and metaobjects hold your custom data. Define a field once, fill it per resource, and render it on your storefront with no code or a one-line Liquid tag.

Everything lives under Settings → Custom data, which has two sections: Metafield Definitions (typed fields on existing resources) and Metaobjects (your own content types and their entries).

Metafields: custom fields on existing things

A metafield definition adds one typed, validated field to a resource. Once defined, the field appears in that resource’s editor — for example, a custom.care_instructions field shows up on every product page ready to fill.

Where you can add fields

On the Custom data page, the Metafield Definitions section lists every resource you can extend. Click a resource to open its definitions list, then Add definition:

ResourceTypical use
ProductsCare instructions, ingredients, size notes
Product variantsPer-variant material, fit, supplier codes
CollectionMerchandising copy and content for collection pages
LocationsOpening hours, operational notes
BlogsMetadata for whole blog containers
Blog PostsStructured extra data on articles
CustomersInternal preferences, profile data
StoreStore-wide settings and admin-only data
PagesStructured content fields on store pages
OrdersFulfilment or customer-service workflow data

Value types

The type you pick controls how values are entered, validated, and rendered. Types are grouped into eight categories in the picker:

CategoryTypes
Most UsedSingle line text, Integer, Boolean, Date, File
TextSingle line text, Multi line text, Rich text
NumberInteger, Decimal
Date and TimeDate, Date time
MeasurementWeight, Volume, Dimension
ReferenceFile, Metaobject reference, Location, Product reference, Variant reference, Collection reference, Page reference, Blog post reference, Customer reference
OtherBoolean, URL, Money, Color, Rating, Link
AdvancedJSON

That is 26 types in total. A handful of types — Multi line text, Money, JSON, Rich text, and Boolean — can only ever hold a single value; everything else can be turned into a list (for example “list of products” or “list of text”).

Create a definition

  1. Go to Settings → Custom data and, under Metafield Definitions, open the resource you want (for example Products).

  2. Add definition and enter a Name (for example Care instructions). The Namespace and Key auto-fills from the name as custom.care_instructions. You can edit it, but it must follow namespace.key — letters, numbers, _, -, and exactly one period. Add an optional Description to help staff fill it correctly.

  3. Choose a Value Type from the picker. If you chose Metaobject reference, also pick which metaobject definition it points at.

  4. Under Number of Values, choose One value or List of values (only shown for types that support lists).

  5. Set any Validations for the type (see below), then flip the Access Options you need.

  6. For product fields only, optionally assign the definition to product categories so it surfaces as a recommended field when editing products in those categories. Then Save definition.

  7. Open any product (or other resource) and fill the new field — it now appears in that resource’s editor.

Per-type validations

Validations are optional rules the value must satisfy. The fields you see in the Validations card depend on the type:

TypeValidations available
Single line textMin/max character count and a regex pattern, or a fixed list of preset choices
Multi line textMin/max character count, regex pattern
IntegerMin/max value
DecimalMin/max value, max decimal places
FileAccept all file types, or restrict to images and/or videos
Date / Date timeEarliest and latest allowed date (and time)
Weight / Volume / DimensionMin/max measurement with a unit (e.g. kg, ml, cm)
RatingMin and max rating bounds (defines the scale)
URL / LinkAllowed URL prefixes and allowed domains
JSONA JSON schema the value is checked against

Boolean, Color, Money, and the reference types have no extra validations — their type is the constraint.

Access options

Each toggle in Access Options decides where the field is usable. All default to off:

  • Required field — the resource can’t be saved without a value.
  • Pin definition — pinned definitions appear first in lists and can be reordered, so your most-used fields stay at the top.
  • Storefront API access — exposes the field for read access via the public Storefront API (needed for headless and some theme reads).
  • Admin Filter — lets you filter products, variants, and other resources by this field inside the admin.
  • Automated Collections (products and variants only) — makes the field available as a condition when building automated collections.
  • Storefront Filter — lets buyers filter by this field in storefront search and collection filters.
  • Customer account — exposes the field in customer-account contexts.

Showing metafields on your storefront

There are two ways to surface a metafield value, with no rebuild either way.

In the visual editor, connect a compatible section or block setting to a metafield instead of typing a fixed value. The right value renders per page automatically — one section, configured once. See Dynamic sources for the full list of bindable setting types.

Metaobjects: your own content types

Metaobjects are standalone, reusable content types with their own fields and entries — not attached to a single product. Classic uses: brand/designer profiles, ingredient glossaries, FAQs, size guides, and store locations.

A metaobject has two parts: the definition (the shape — its type key and fields, created under Settings → Custom data) and its entries (the actual records, managed under Content → Metaobjects).

Define a content type

  1. On Settings → Custom data, find the Metaobjects section and click Add Definition.

  2. Enter a Name (for example Designer). The Type key auto-fills (designer) and, like a metafield key, cannot be changed after creation. Add an optional description.

  3. Add Fields — each is typed exactly like a metafield value type. Drag to reorder. Mark one single-line text field as the Display name so entries are easy to identify.

  4. Configure Metaobject options (see capabilities below).

  5. Save, then add entries.

Capabilities

The Metaobject options section turns on optional behaviours:

  • Active-draft status — lets each entry be published or kept as a draft.
  • Translations — lets entries be translated into other languages.
  • Publish entries as web pages — each entry gets its own URL. When enabled, pick which field supplies the Page title and which supplies the Meta description for SEO. You can also set a URL handle folder, and turn on Online Store to make the data usable in your theme.
  • Storefronts API access — exposes the type via the Storefront API.
  • Customer Account API access — exposes the type via the Customer Account API.

Manage entries

Add and edit records under Content → Metaobjects. (Right after you save a new definition, Sellerlane drops you straight into adding its first entry.) Each entry fills the fields you defined; if Active-draft status is on, you control whether it’s published.

Use metaobjects

Reference an entry from a product (or any resource) via a Metaobject reference metafield, or render entries directly in theme code:

{% for designer in metaobjects.designer.values %}
<h3>{{ designer.name }}</h3>
<p>{{ designer.bio }}</p>
{% endfor %}

Inspect the live shape from a template with {{ metaobjects | json }}.

Troubleshooting

  • Field doesn’t show on the storefront. Confirm the value is actually filled on the resource, and that a dynamic-source binding or Liquid reference exists. For headless or Storefront-API reads, turn on Storefront API access.
  • Buyers can’t filter by it. Storefront filtering needs Storefront Filter enabled on the definition; admin-side filtering needs Admin Filter.
  • Value rejected on save. It failed a validation — check character counts, min/max bounds, allowed file types, URL domains, or the JSON schema on the definition.
  • Can’t change a field’s type or key. Those are immutable after creation. Delete and recreate the definition (existing values won’t carry over).
  • Metaobject entry has no public page. The type needs Publish entries as web pages enabled, and the specific entry must be published (when Active-draft status is on).

Next steps