Skip to main content

How to add and manage customer metafield data in Shopify

Set up customer metafields in Shopify and populate them manually or automatically using Shopify Flow.

Customer metafields let you store custom customer data in Shopify, such as loyalty tier, birthdate, or preferred product category. Once set up and populated, you can use this data in Seguno Email Marketing to build segments and personalize email content.


What are customer metafields?

A customer metafield stores one custom value per customer. Before you can add values, you need to create a metafield definition. A definition acts as a template that sets the field's name, data type, and validation rules.

Shopify provides two types of definitions:

  • Standard definitions are pre-built by Shopify for common use cases. Use a standard definition when one is available. Standard definitions are universally compatible with Shopify apps, themes, and features.

  • Custom definitions are definitions you create for specialized data not covered by a standard definition, or when migrating existing metafields.

You can have up to 250 metafield definitions across your Shopify store.


Before you begin

  • Verify that your Shopify staff account has the customer permissions needed to create and edit metafield definitions. If you cannot access the settings in the steps below, ask your store owner to review your permissions.

  • Review the available data types to decide which one fits your data best. See metafield content types and values in Shopify Help for the full list.

Tip:

Whenever possible, use a standard definition instead of a custom one. Standard definitions are automatically configured and are compatible across all Shopify stores, apps, and themes.


Create a customer metafield definition

You create a metafield definition once. After it is created, the field appears on every customer record in your Shopify admin.

  1. From your Shopify admin, navigate to Settings > Metafields and metaobjects.

  2. Select Customers.

  3. Click Add definition.

  4. In the Name field, enter a name for your definition. For example, "Birthdate" or "Loyalty tier."

  5. If a matching standard definition appears as a suggestion, click it to use it instead of creating a custom one.

  6. Optional: In the Namespace and key field, review the automatically generated identifier. The default namespace is custom. Enter a new key value if needed. The namespace and key combination must be unique across your store. For example: custom.birthdate.

    1. Note: Record the exact namespace and key. You will need it when referencing this metafield in Seguno Email Marketing.

  7. Click Select type, then enter a search term or select the data type that matches your metafield:

    • Use Date for birthdates or anniversary dates.

    • Use Single line text for values like loyalty tier or product preference.

    • Use Integer for whole-number values such as a points balance.

  8. Optional: Click One value and select List of values if a customer can have more than one value for this field.

  9. Optional: Click Add description to add internal notes about what values should be entered.

  10. Optional: Select validation rules to limit accepted values. The available options depend on the type you selected.

  11. Optional: Select Storefronts to allow custom storefronts to access this metafield via the Storefront API.

  12. Optional: Toggle Definition pinned off if you do not want the metafield to display automatically on customer pages in your Shopify admin.

  13. Click Save.

Note:

Shopify POS displays only pinned customer metafields. If your team uses POS to look up customer records, keep the metafields most relevant to in-store interactions pinned.


Add values to a customer record manually

After creating a definition, you can enter values on individual customer records.

  1. From your Shopify admin, navigate to Customers.

  2. Select the customer you want to update.

  3. Scroll to the Metafields section on the customer detail page.

  4. Click the metafield field you want to fill in and enter a value.

  5. Click Save.

Add values in bulk using the bulk editor

To add or update metafield values for multiple customers at once, use Shopify's bulk editor.

  1. From your Shopify admin, navigate to Customers.

  2. Select the customers you want to update.

  3. Select Bulk Edit.

  4. Select Columns in the top right, then select the metafields you want to include.

  5. Click the metafield field you want to fill in and enter a value.

  6. Click Save.


Populate metafield values automatically using Shopify Flow

Shopify Flow is Shopify's built-in automation tool. The Update customer metafield action lets you automatically add or update a customer's metafield value when a specific event occurs, such as a completed order or a new subscription.

This is the most scalable way to keep metafield values up to date across your customer base without manual entry.

How it works

A Flow workflow has three parts: a trigger, optional conditions, and an action. For customer metafields, the workflow fires on a supported trigger, optionally checks a condition, and then runs the Update customer metafield action to write a value to the specified metafield.

Triggers that support the Update customer metafield action

The Update customer metafield action can be used in workflows that start with any of the following triggers:

  • Customer account disabled

  • Customer account enabled

  • Customer created

  • Draft order created

  • Subscription contract created

  • Order canceled

  • Order created

  • Order fulfilled

  • Order paid

  • Order risk analyzed

  • Order transaction created

  • Fulfillment created

  • Fulfillment event created

  • Refund created

  • Tender transaction created

Set up a workflow to update a customer metafield

  1. From your Shopify admin, open Shopify Flow.

  2. Click Create workflow.

  3. Select the trigger that should start the workflow. For example, select Order paid to update a metafield each time a customer completes a purchase.

  4. Optional: Click Add condition to limit when the workflow runs.

  5. Click Add action and select Update customer metafield.

  6. In the Metafield field, select the metafield by name, or enter the namespace and key manually.

  7. In the Value field, enter the value to write to the metafield. Format the value to match the metafield's data type. Warning: If the value does not match the metafield's data type, the workflow will fail when it runs. For example, a Date metafield requires a date formatted as YYYY-MM-DD, not plain text.

  8. Click Turn on workflow.

Note:

The Update customer metafield action uses the customer ID from the trigger event to identify which customer to update. This is set automatically and cannot be changed.


Common errors

Issue

Cause

Solution

Metafield section does not appear on customer records

The definition was unpinned during setup, or the staff account does not have the required permissions.

Verify the definition is pinned in Settings > Metafields and metaobjects > Customers. Confirm staff permissions with your store owner.

Namespace and key conflict error when creating a definition

Another definition is already using the same namespace and key.

Enter a new key value to make it unique. For example, change custom.birthdate to custom.customer_birthdate.

Metafield value fails to save manually

The value does not pass the validation rules set for the definition.

Review validation rules in Settings > Metafields and metaobjects > Customers and enter a value that meets the requirements.

Shopify Flow workflow fails to run

The value in the Update customer metafield action does not match the metafield's data type.

Verify the value is formatted correctly for the metafield type. For example, a Date field requires YYYY-MM-DD format.

Metafield is not available in Seguno Email Marketing

The definition exists, but no customers have values populated, or the namespace and key in Seguno Email Marketing do not match exactly.

Verify that at least one customer has a value, and verify the namespace and key match character for character.


FAQs

What is the difference between a standard and a custom metafield definition?

  • Standard definitions are pre-built by Shopify for common use cases and are compatible across all Shopify apps, themes, and features. Custom definitions are ones you create for specialized data not covered by a standard definition. Use a standard definition whenever one is available.

How many customer metafield definitions can I create?

  • Shopify allows up to 250 metafield definitions total across your store.

What is the difference between a namespace and a key?

  • A namespace groups related metafields together. The default namespace is custom.

  • A key identifies one specific metafield within that namespace.

  • Together they form a unique reference, such as custom.loyalty_tier. The namespace and key combination must be unique across your store.

Can I use Shopify Flow to update metafields that were created manually?

  • Yes. The Update customer metafield action in Shopify Flow works with any existing metafield definition, regardless of how it was created.

Did this answer your question?