How to export customer metafields in Shopify

Shopify just rolled out its new functionality for importing and exporting customer metafields. Learn how to use this new feature
Froonze
April 22, 2024

Shopify just rolled out its new functionality to import and to export customer metafields.

This is a fantastic addition to Shopify's existing tools for collecting and analyzing the valuable customer data. We anticipate Shopify will introduce more features like this, such as improved metafield support within workflows.

While exporting is pretty straightforward, there are a couple of cautionary steps to take before importing metafields to an existing customer base.

How to export customer metafields in Shopify

Exporting Customer Metafields

Exporting your customer data, including tags and metafields, provides a valuable backup and lets you analyze the data in external tools. Here's how to export them:

  1. Head to the Customers section in your Shopify admin
  2. Click on Export on top
  3. In the Fields included section, check the box Customer metafields. Optionally you can also tick the box Customer tags to export the tags in the same file
  4. Click Export Customers to generate and download a CSV file containing your customer data and metafields. Done. You will most likely be sent the spreadsheet file in your admin email. Within the file you'll be able to find separate columns for each of the customer metafields set up in your shop. The header for each metafield column is formatted specifically: metafield_name (customer.metafields.namespace.key)
Export customer metafields in Shopify

Importing Customer Metafields

Importing metafields requires more caution compared to exporting. This is because you want to avoid accidentally overwriting or modifying existing customer data in your database. To safeguard your information, it's recommended to export your entire customer list and data first. This way, you'll have a secure backup ready and available.

While importing can be used to add entirely new customers, this tutorial focuses solely on updating existing customers and metafields with new or different values, which is likely the most relevant scenario for the readers of this article.

  1. Follow the instructions from the previous step to export your customers as a CSV file. Choose a safe location to store this file
  2. Prepare the CSV file with the customer data and metafields you want to import. Make sure it includes the following:
    • One column with a unique customer identifier to match existing entries. This can be either the "Customer ID" or "Email" depending on your data (the header of the column must also be either "Customer ID" or "Email")
    • Include a separate column for each customer metafield you want to add or update. The header for each column needs to be formatted specifically: metafield name (customer.metafields.namespace.key)
    • The corresponding metafield values for each customer. Shopify supports specific metafield types during import. Make sure the metafields value in the file are compatible with the type of data. For example date, number or boolean metafields require an specific format, while text type metafields will accept simple strings of text
    • Here's a simple tip for ensuring your import file matches the format required by Shopify: Modify an Exported File. Start by exporting a sample of your customer data using the instructions in the previous steps. Duplicate it. This file will have the correct header format and data types of existing metafields. You can then modify this file with your desired updates for import.
  3. Here is a sample file too so you can take it as reference
  4. Navigate to the Customers section in your Shopify admin. Click on Import on top.
  5. Click Add file and select your prepared CSV. Then click on Import Customers
  6. Since you are updating existing profiles, check the box next to Overwrite existing customers that have the same email or phone number.
  7. Click Import customers to initiate the import process. Shopify will update existing customers based on the data contained in the file.
  8. For large datasets, consider importing in smaller batches and be checking the results after each import

Create, view, and use customer metafields to segment your customers

One of the most powerful features of Shopify is its ability to segment customers based on their behavior, preferences, and other attributes. This can help businesses create targeted marketing campaigns, offer personalized discounts, and improve customer retention.

Customers can of course also be segmented based on customer metafield values. If you want to know more details about how to create new metafields and use them to segment your audience, don't miss our other article at this link.

How to collect metafield data directly from customers

Collecting metafield custom data directly from customers on the site requires access through API, so most likely you will need to use an app that is able to collect this data through forms that the customer will be able to submit while navigating the site.

Check on our Custom Forms plugin. Custom Forms allows you to create registration and profile forms with custom fields to collect any additional data you need from your customers. Each custom field is connected to a Shopify customer metafield, in which the data is stored and can be accessed as described in the articles. Any question about just contact our support at support@froonze.com

Froonze Registration Form
View of Froonze Custom Registration Form

Froonze Customer Accounts Concierge
Get the app today
Turn the account page into a beautiful portal with
Froonze Customer Accounts Concierge
  • 200+