Custom data

Shopify's platform includes data models for fundamental commerce concepts such as products, collections, and orders. However, if you require more complex or specific data models, custom data helps you to extend Shopify's data models and create your own by using the following resources:

  • Metafields: define and associate a custom or standard field with different parts of Shopify, such as products, customers, or blogs.
    • For example, if you have an apparel store and you want to add care instructions for your products, then you might add a metafield to the product called, "Care instructions". You can then add specific care instructions for one or all of your products.
  • Metaobjects: define and create custom data structures with Shopify.
    • For example, if you have a beauty and skincare store and you want to capture and display information about your top influencers, then you might build a metaobject called, "Influencer profile". You can then include fields for a headline, image, and description, and then create entries for each influencer. You can display this in your theme or only use it in your admin.

Types of metafields

You can create the following types of metafields:

  • Metafields with definitions: These can be standard or custom definitions.
    • Standard: These definitions are automatically configured for you and are designed to be universally compatible across Shopify. Because standard metafield definitions follow standards that are used across all Shopify stores, they're supported by apps, themes, and other parts of your store. You can add product categories to your standard product metafields so that those metafields only display on products for the specific product category. Learn more about standard metafield definitions.
    • Custom: These definitions are unique to your store. Use custom definitions for any metafields that don't have standard definitions or if you want to migrate existing unstructured metafields to a definition.
  • Unstructured metafields: these are metafields without definitions. You can edit metafields without definitions. Learn more about editing metafields that don't have a definition.
  • App-owned metafields: These definitions are created using an app from the Shopify App Store.

Metafield definition

Metafield definitions have the following parts:

  • 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.
    • Access: You can give the metafield access to Storefronts. This means that the metafield can be connected in your theme using dynamic sources. Learn more about access.
    • Features: Use as filter in admin allows you to use the metafield to filter product searches in the Shopify admin. Learn more about filtering your products. Use in automated collections allows you to use the metafield to create an automated collection. Learn more about automated collections by metafield.

Locating your read only app metafields

You can access a list of your app-owned metafields in a specific resource.

Steps:

  1. In your Shopify admin, go to a resource that has metafields. For example, you can go to a product page.
  2. In the Metafields section, click Show all.
  3. Click More actions > View read only app metafields.

Metaobjects

There are two key components to metaobjects:

  1. The definition: the group of fields that defines the object’s structure. This is managed in Settings > Custom data in your Shopify admin.
  2. Entries: the content or data for the metaobject. Entries are created and managed in Content > Metaobjects in your Shopify admin.

Types of metaobjects

  • Standard: These definitions are automatically configured for you and are designed to be universally compatible across Shopify. Because standard metaobject definitions follow standards that are used across all Shopify stores, they're supported by apps, themes, and other parts of your store.
  • Custom: These definitions are unique to your store. Create a custom metaobject when no standard definition meets your needs.
  • App-created metaobjects: These definitions are created by an app.

Metaobjects and files are both accessible from the Content section in the admin. You can find this section from the admin navigation bar.

Managing metaobjects

Contents > Metaobjects lists all your shop's metaobjects. There are four default saved views displayed as cards along the top which navigate to a filtered view of this list. The following default saved views are available:

  • Available on storefront: Metaobject entries that are available to your storefront
  • Web pages: Metaobject entries with the web pages capability activated
  • Active: Metaobject entries with status set to Active
  • Draft: Metaobject entries with status set to Draft

On larger screens, six saved view cards are displayed. This requires you to have created at least 2 custom saved views. You can find instructions below for using saved views.

Recent entries are also displayed on this page and feature all metaobject entries in reverse chronological order.

Finally, you can search, filter, and sort your metaobject definition list as needed.

Using saved views

Metaobject entry lists can be configured with saved views to easily return to filtered lists of metaobject entries.

Steps:

  1. Select the + icon in the top bar to open the Create a new view modal.
  2. Enter a name for your saved view.
  3. With your newly created saved view open, select the search and filter icon in the top bar.
  4. Add the filters you want this saved view to use. These can either be a free text search, or structured filters (updated, created, added by, or fields on the metaobject definition).
  5. Click Save.

Managing files

Content > Files lists of all your shop's files. You can search and filter your files based on file size, the file type (image, video, external video, 3D model, or other), and where files are used (products, other). Learn more about using files.

Locating your app-controlled metaobjects

When you create a metaobject definition, you specify the following information:

  • Name: used to identify the metafield in your Shopify admin, such as Authors.
  • Type: the type of data that the metafield stores, such as text, file, or URL.
  • Fields: define the type of content you want to display in the metaobject
    • Each field has a name (required), description, type, and validation rules, such as character limits, minimum and maximum values, or preset values.
    • Display name is assigned to a single field name and is used to identify an individual metaobject entry. You can change the field that the display name is assigned to at any time. The display name is automatically assigned to the first text field in a metaobject entry, or autogenerated if there are no text fields in the metaobject definition.
    • For example, you might add a field for text and indicate it as a display name, a field for an image, and a field for color.
  • Options: where the metaobject is available to use.
    • Access: By default, Storefronts access is activated for your metaobject. This means that the metaobject can be connected in your theme using dynamic sources. You can deactivate Storefronts access. Learn more about access options.
    • Features: You can use the metaobject to create Web pages. Learn more about building web pages with metaobjects.

Locate your app-created metaobjects

You can access your app-controlled metaobjects in your Shopify admin by filtering your metaobject definitions.

Steps:

  1. In your Shopify admin, go to Content > Metaobjects.
  2. Do any of the following:
    • Click the sort icon, and then sort by Added by. Your metaobjects will sort alphabetically by the person or app that added them.
    • Click Add filter > Added by, and then choose the name of the app to view the metaobjects added by it.

In this section

Ready to start selling with Shopify?Try it free