Adding values to metafields

After you add a metafield definition, you add values for your metafield on the corresponding pages in your Shopify admin. For example, if you create a metafield definition for product expiration date, then you enter the specific values for expiration date on your product pages in your Shopify admin. Adding values to your metafields enables you to save specialized information for internal tracking or for display on your online store.

Pinned metafields are displayed in an editable table on your Shopify admin pages in the same order that they're displayed in your metafield definitions list. Each metafield displays the name that you selected when you created your metafield definition. You can click in each table row to display the metafield type and description, and then enter a value.

Metafields can only accept the supported values for their content type. For more information about supported values for common types of metafields, refer to metafield content types and values.

Metafield lists allow you to store multiple values in a single metafield. You can add multiple single line text fields or product reference values to a metafield list to organize large data sets, suggest items that work well together, or create more powerful search facets.

Adding values to common types of metafields

Which procedure you follow to add values to a metafield depends on the content type for that metafield. For example, metafields for product expiration date and customer birth date both use the Date content type. Learn more about content types.

Desktop

Color

  1. From your Shopify admin, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Navigate to the Metafields section, where the applicable metafield definitions display in a list.

  3. Next to a color type metafield, click + Add.

  4. Select a color by doing one of the following:

    • Use the color picker to select a color.
    • Enter a hex color value in the Color box.
  5. Click Save.

Date

  1. From your Shopify admin, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Navigate to the Metafields section, where the applicable metafield definitions display in a list.

  3. Next to a date type metafield, click + Add.

  4. Click the calendar to select a date.

  5. Click Save.

Date and time

  1. From your Shopify admin, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Navigate to the Metafields section, where the applicable metafield definitions display in a list.

  3. Next to a date and time type metafield, click + Add.

  4. Click the calendar to select a date, and then click the time box to select a time.

  5. Click Save.

Dimension, weight, or volume

  1. From your Shopify admin, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Navigate to the Metafields section, where the applicable metafield definitions display in a list.

  3. Next to a measurement type metafield, click + Add.

  4. Enter a value.

  5. Select a unit of measurement from the list.

  6. Click Save.

Number

  1. From your Shopify admin, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Navigate to the Metafields section, where the applicable metafield definitions display in a list.

  3. Next to an integer type metafield, click + Add.

  4. Enter a number.

  5. Click Save.

Rating

  1. From your Shopify admin, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Navigate to the Metafields section, where the applicable metafield definitions display in a list.

  3. Next to a rating type metafield, click + Add.

  4. Enter a number.

  5. Click Save.

File reference

  1. From your Shopify admin, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Navigate to the Metafields section, where the applicable metafield definitions display in a list.

  3. Next to a file type metafield, click + Add.

  4. Select an existing file or upload a new file.

  5. Click Done.

  6. Click Save.

Page reference

  1. From your Shopify admin, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Navigate to the Metafields section, where the applicable metafield definitions display in a list.

  3. Next to a page type metafield, click + Add.

  4. Select a page in any of the following ways:

  5. Click Save.

Product reference

  1. From your Shopify admin, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Navigate to the Metafields section, where the applicable metafield definitions display in a list.

  3. Next to a product type metafield, click + Add.

  4. Select one or more products from the list. You can search and filter options to find specific products.

  5. Click Add.

  6. Click Save.

Product variant reference

  1. From your Shopify admin, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Navigate to the Metafields section, where the applicable metafield definitions display in a list.

  3. Next to a product variant type metafield, click + Add.

  4. Select one or more variants from the list. You can search and filter options to find specific products.

  5. Click Add.

  6. Click Save.

Metaobject reference

  1. From your Shopify admin, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Navigate to the Metafields section, where the applicable metafield definitions display in a list.

  3. Next to a metaobject type metafield, click + Add.

  4. Select a metaobject in any of the following ways:

    • Select an existing metaobject entry from the list.
    • Search for an existing entry.
    • Add a new metaobject entry. To add a new entry:
      1. Click Add Add entry.
      2. In the dialog, enter a value for each field in the metaobject.
      3. Click Save.
  5. Click Save.

Collection reference

  1. From your Shopify admin, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Navigate to the Metafields section, where the applicable metafield definitions display in a list.

  3. Next to a collection type metafield, click + Add.

  4. Select a collection in any of the following ways:

  5. Click Save.

URL

  1. From your Shopify admin, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Navigate to the Metafields section, where the applicable metafield definitions display in a list.

  3. Next to a URL type metafield, click + Add.

  4. Enter a valid URL.

  5. Click Save.

Single-line or multi-line text

  1. From your Shopify admin, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Navigate to the Metafields section, where the applicable metafield definitions display in a list.

  3. Next to a text metafield, click + Add.

  4. Depending on how you configured your metafield definition, do one of the following:

    • Enter your text.
    • Click Select an option, and then select a preset option from the list.
  5. Click Save.

True or false

  1. From your Shopify admin, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Navigate to the Metafields section, where the applicable metafield definitions display in a list.

  3. Next to a true or false type metafield, click either True or False.

  4. Click Save.

JSON

  1. From your Shopify admin, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Navigate to the Metafields section, where the applicable metafield definitions display in a list.

  3. Next to a JSON type metafield, click + Add.

  4. In the dialog, enter your data.

  5. Click Done.

  6. Click Save.

Mobile

Color

  1. From the Shopify app, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Tap Metafields to display the list of applicable metafield definitions.

  3. Tap the color metafield, then tap + Add.

  4. Select a color by doing one of the following:

    • Tap a color on the color picker.
    • Tap the Hex color box, and then enter an RGB color value.
  5. Tap Save.

Date

  1. From the Shopify app, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Tap Metafields to display the list of applicable metafield definitions.

  3. Tap a date type metafield, and then tap + Add.

  4. Use the calendar to select a date.

  5. Tap Save.

Date and time

  1. From the Shopify app, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Tap Metafields to display the list of applicable metafield definitions.

  3. Tap a date and time type metafield, and then tap + Add.

  4. Use the calender to select a date, and then select a time.

  5. Tap Save.

Dimension, weight, or volume

  1. From the Shopify app, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Tap Metafields to display the list of applicable metafield definitions.

  3. Tap a dimension type metafield.

  4. Tap + Add, then enter a value.

  5. Select a unit of measurement from the list.

  6. Tap Save.

Number

  1. From the Shopify app, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Tap Metafields to display the list of applicable metafield definitions.

  3. Tap an integer type metafield.

  4. Tap + Add, then enter a value.

  5. Tap Save.

Rating

  1. From the Shopify app, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Tap Metafields to display the list of applicable metafield definitions.

  3. Tap a rating metafield.

  4. Tap + Add, then enter a value.

  5. Tap ✓.

File reference

  1. From the Shopify app, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Tap Metafields to display the list of applicable metafield definitions.

  3. Tap a file type metafield.

  4. Select a file by doing one of the following:

  • To select an existing file from your Shopify store, tap a file from the list.
  • To upload a file from your device, tap Add file, select a file, and then tap Done.
  1. Tap Save.

Page reference

  1. From the Shopify app, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Tap Metafields to display the list of applicable metafield definitions.

  3. Tap a page type metafield.

  4. Select an available page.

  5. Tap Save.

Product reference

  1. From the Shopify app, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Tap Metafields to display the list of applicable metafield definitions.

  3. Tap a product type metafield.

  4. Select one or more products from the list. You can search for specific products.

  5. Tap Save.

Product variant reference

  1. From the Shopify app, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Tap Metafields to display the list of applicable metafield definitions.

  3. Tap a product variant type metafield.

  4. Select one or more variants from the list. You can search for specific variants.

  5. Tap Save.

Metaobject reference

  1. From the Shopify app, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Tap Metafields to display the list of applicable metafield definitions.

  3. Tap a metaobject type metafield.

  4. Select a metaobject in any of the following ways:

    • Select an existing metaobject entry from the list.
    • Search for an existing entry.
    • Add a new metaobject entry. To add a new entry:
      1. Tap Add.
      2. Enter a value for each field in the metaobject.
      3. Tap Save.
  5. Tap Save.

Collection reference

  1. From the Shopify app, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Tap Metafields to display the list of applicable metafield definitions.

  3. Tap a collection type metafield.

  4. Select a collection from the list. You can use the search to filter for a specific collection.

  5. Tap Save.

URL

  1. From the Shopify app, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Tap Metafields to display the list of applicable metafield definitions.

  3. Tap a URL type metafield, and then tap + Add.

  4. Enter a valid URL.

  5. Tap Save.

Single-line or multi-line text

  1. From the Shopify app, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Tap Metafields to display the list of applicable metafield definitions.

  3. Tap a text metafield.

  4. Tap the text box, and then enter your text.

  5. Tap Save.

True or false

  1. From the Shopify app, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Tap Metafields to display the list of applicable metafield definitions.

  3. Tap a true or false type metafield.

  4. Select True or False.

  5. Tap Save.

JSON

  1. From the Shopify app, go to the part of your store where you want to add a metafield value. For example, a specific product, collection, or customer.

  2. Tap Metafields to display the list of applicable metafield definitions.

  3. Tap a JSON type metafield, and then tap + Add.

  4. Tap the text box, and then enter your data.

  5. Tap Done.

  6. Tap Save.

Next steps after adding values to metafields

After you add values to your metafields, you can connect your metafields to your theme to display your custom information on your online store.