What problem does it solve?
Many Shopify stores need structured, queryable custom data (product specs, order notes, customer flags, reusable content) but rely on unstructured descriptions or app-specific hacks that are hard to surface in themes or APIs. Metafield definitions and Metaobjects provide a first-class, typed way to store, validate, and expose custom fields to Liquid and the Storefront API without a separate database.
Core Features & Use Cases
- Typed metafield definitions: Create metafieldDefinitionCreate entries that enforce types (text, number, date, references, files, json, lists) and control storefront visibility.
- Programmatic reads & writes: Write values with metafieldsSet (batch up to 25 per call) and read them in Liquid (product.metafields.namespace.key) or the Storefront API by explicitly requesting namespace+key.
- Metaobjects for structured content: Define metaobject types and create entries for FAQs, testimonials, and other multi-field content editable in the Shopify Admin UI.
- Use case: Bulk-import product weights and dimensions for 30 products, validate types, mark definitions visibleToStorefrontApi, and render specs in both a headless storefront and legacy Liquid theme.
Quick Start
Create typed metafield definitions for product weight and dimensions, then batch-write values with metafieldsSet in 25-item batches while marking definitions visibleToStorefrontApi.