Shopify comes with many built-in data models like products, customers, and orders. Yet often while building for the varied and diverse needs of merchants you'll need a way to customize the data in Shopify:
- **[Metafields](#what-are-metafields)** to extend Shopify's resources with custom fields.
- **[Metaobjects](#what-are-metaobjects)** to create entirely new resources by making new custom objects.
## What are metafields?
Metafields are a flexible way to store additional details about existing Shopify resources, like products, orders, and [many more](/docs/api/admin-graphql/latest/enums/MetafieldOwnerType). These custom fields can be almost anything, such as related products, release dates, internal approval status, or part numbers.
Metafields power experiences across Shopify. In the Shopify admin, they enable features like customer segmentation, smart collections, and [product taxonomy](/docs/apps/build/graphql/migrate/new-product-model/metafield-linked). For customers, they enhance the shopping experience through [product recommendations](/docs/apps/build/custom-data/metafields/list-of-standard-definitions), product swatches, and customized checkouts using [Shopify Functions](/docs/apps/build/functions/input-output/metafields-for-input-queries).
### Unstructured metafields
Metafields serve as the foundation for extending Shopify's data model. At their core, metafields are key-value pairs that can be added to specific [resources](/docs/api/admin-graphql/latest/enums/MetafieldOwnerType) in Shopify:
- **Identifier**: Composed of both `namespace` (drives [ownership](/docs/apps/build/custom-data/ownership)) and `key`.
- **Value**: The raw `value` stored.
- **[Type](/docs/apps/build/custom-data/metafields/list-of-data-types)**: How `value` is interpreted.
The `type` on an unstructured metafield can vary on an instance-by-instance basis. To ensure consistency, you need a [metafield definition](#structured-metafields).
**Example**:
You work with a snowboard merchant who needs to store care instructions for each product. Starting simple, you add a `custom.care_guide` metafield to a product by using the [`productUpdate`](/docs/api/admin-graphql/latest/mutations/productUpdate) mutation:
### Structured metafields
Metafields covered by a [metafield definition](/docs/apps/build/custom-data/metafields/definitions), or structured metafields, **have consistent types** amongst other optional configurations:
- [Data validation](/docs/apps/build/custom-data/metafields/list-of-validation-options)
- [Permissions](/docs/apps/build/custom-data/permissions)
- [Optional features](/docs/apps/build/custom-data/metafields/use-metafield-capabilities)
- [Conditional usage](/docs/apps/build/custom-data/metafields/conditional-metafield-definitions)
**Example**:
In this example, you'll add a definition to your snowboard merchant to ensure all products have a `custom.care_guide` metafield with a type of `single_line_text_field` that is also accessible to storefronts:
## What are metaobjects?
Metaobjects are a powerful way to create and reuse custom data structures beyond Shopify's standard resources. They exist independently and can be referenced by metafields to connect with standard resources like products, orders, and customers.
Key terms related to metaobjects:
- **Definition**: The structure outlining the fields and properties for your metaobjects.
- **Entry**: An instance of the associated definition.
> Note:
> MetaobjectFields use the same [types](/docs/apps/build/custom-data/metafields/list-of-data-types) as metafields.
Metaobject definitions, beyond defining the fields, also offer control over:
- [Permissions](/docs/apps/build/custom-data/permissions), such as storefront visibility.
- [Optional features](/docs/apps/build/custom-data/metaobjects/use-metaobject-capabilities), such as translatable fields.
**Example**:
Suppose a merchant wants a `Feature` resource in Shopify. You can represent that with a new metaobject definition:
The merchant's products have a set of key features, so you'll also need to create a product metafield definition that references the `Feature` metaobject definition you just created:
With those in place, you can create `Feature` entries and reference as many as you want in a product's `key_features` metafield. These entries can be reused across products, making it easy to manage and update.
## Developer tools and resources
Explore the following tools and resources to work with metafields and metaobjects:
### Metafields
### Metaobjects
## Next steps
- Learn how to [own the custom objects and fields](/docs/apps/build/custom-data/ownership) that your app defines in Shopify.
- Learn about all of the different [types](/docs/apps/build/custom-data/metafields/list-of-data-types) supported by metafields.
- Learn how to [manage metafields](/docs/apps/build/custom-data/metafields/manage-metafields) using the GraphQL Admin API.
- Use metafields to [link product options to the Shopify taxonomy](/docs/apps/build/graphql/migrate/new-product-model/metafield-linked).
- Learn how to [work with metaobjects](/docs/apps/build/custom-data/metaobjects/manage-metaobjects) using the GraphQL Admin API.