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.

The following examples describe the steps to add values to metafields that have different content types.

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, and then tap SELECT COLOR.

  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 the check mark, and then tap the check mark again.

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 the date metafield, and then tap SELECT DATE.

  4. Use the calendar to select a date, and then tap DONE.

  5. Tap the check mark.

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 the date and time metafield, and then tap SELECT DATE AND TIME.

  4. Use the calendar to select a date, and then tap NEXT.

  5. Use the clock to select a time, and then tap DONE.

  6. Tap the check mark.

Dimension

  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 dimension metafield.

  4. Tap the Dimension box, and then enter a value.

  5. Select a unit of measurement from the list.

  6. Tap the check mark.

Weight

  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 weight metafield.

  4. Tap the Weight box, and then enter a value.

  5. Select a unit of measurement from the list.

  6. Tap the check mark.

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 the volume metafield.

  4. Tap the Volume box, and then enter a value.

  5. Select a unit of measurement from the list.

  6. Tap the check mark.

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 the number metafield.

  4. Tap the Number or Decimal box, and then enter a value.

  5. Tap the check mark.

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 the rating metafield.

  4. Tap the Rating box, and then enter a value.

  5. Tap the check mark.

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 the file reference metafield, and then tap SELECT FILE.

  4. Tap CONTINUE.

  5. 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 +, select a file, and then tap UPLOAD.
  6. Tap the check mark.

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 the page reference metafield, and then tap SELECT PAGE.

  4. Select an available page, and then tap the check mark.

  5. Tap the check mark again.

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 the product reference metafield, and then tap SELECT PRODUCT.

  4. Select a product from the list, and then tap the check mark.

  5. Tap the check mark again.

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 the product reference metafield, and then tap SELECT VARIANT.

  4. Select a product from the list, and then select a variant.

  5. Tap the check mark, and then tap the check mark again.

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 the metaobject reference metafield, and then tap SELECT ENTRY.

  4. Select an entry from the list, and then tap the check mark.

  5. Tap the check mark again.

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 the collection reference metafield, and then tap SELECT COLLECTION.

  4. Select a collection from the list, and then tap the check mark.

  5. Tap the check mark again.

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 the URL metafield.

  4. Tap the text box, and then enter a web address.

  5. Tap the check mark.

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 the text metafield.

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

  5. Tap the check mark.

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 the true or false metafield, and then select True or False.

  4. Tap the check mark.

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 the JSON metafield.

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

  5. Tap the check mark.

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.

Can’t find the answers you’re looking for? We’re here to help.