Overview

Customer Fields stores custom data in two places; the app's database and Shopify’s Metafields. 

When a customer record is saved, and the data being saved contains values for custom data columns, then the app will store metafield data on the Customer object in Shopify. The app's metafields use customer_fields as the namespace, and data as the key. This metafield data is accessible via the Shopify API, or on front-end using liquid.

The latest version of Customer Fields saves all of the metafield data in a single json string. The value of the string contains the app's data column keys and respective data column values. Please note that metafields are only used for custom fields; the data for standard fields is saved to the normal places within Shopify.

To display data values on the storefront or in email notifications, you'll need to use the following syntax:
{{ customer.metafields.customer_fields.data["DATA COLUMN KEY"] }}  
 

Specific examples

Display value for a data column with the key of pet_name 

Your pet's name: {{ customer.metafields.customer_fields.data["pet_name"] }}

<!-- Outputs:
Your pet's name: Franklin
-->

Display value for a date data column, using a liquid date filter to control the format 

Your Birthday: {{ customer.metafields.customer_fields.data["birthday"] | date: "%b %d, %Y" }}

<!-- Outputs:
Your Birthday: February 6, 1945
-->

Looking for more technical details?

Learn more about metafields using our Developer Documentation.

Did this answer your question?