The Customer Fields app uses Data columns as a mechanism to handle data attributes for each customer record. These data columns allow the app to create, update, filter, format, and import/export customer data in a reliable fashion.
Generally speaking, a data column must exist for the app to save and retrieve any data values for a customer. Since data columns are created automatically when adding fields in the app's form builder, you shouldn't need to take any additional steps to ensure that your customer data will be saved when a form is submitted.
Standard vs. Custom
It's important to understand the difference between Standard and Custom data columns:
Standard data columns are reserved for all of the standard customer fields (aka properties) in Shopify, such as a customer's first name, last name, email address, phone number, and default address.
Custom data columns are used for any custom customer fields you wish to use, such as a customer's gender, birthday, favorite color, etc.
Data column structure
Each data column has the following attributes:
Label - A human-friendly name for the data column.
Namespace - A machine-friendly identifier which combines with the key to reference custom data columns.
Key - A unique, machine-friendly name for referencing the data column.
Data type - Indicates the type of data being stored.
Data types
Here's an overview of the different data types that are currently available in Customer Fields:
Common types
single_line_text
- Used for simple strings of text (single line only; no line breaks)text
- Used for complex strings of text with multiple linesinteger
- Used for whole numbersfloat
- Used for numbers that contain decimalsboolean
- Used for true/false valuesdate
- Used for dates (without time of day)datetime
- Used for dates (with time of day)email
- Used for email addressesphone
- Used for phone numbersfile
- Used for file uploads, with files hosted on the app's CDNfile_reference
- Used for file uploads, with files hosted on Shopify's CDNNote: Files uploaded using this data type can be found in the Shopify admin under Content > Files
list
- Used to store multiple values in a single row (also known as an array)
Advanced types
The app also supports two special data column types, which can be used to store multiple pieces of data for more complex use cases. These advanced data column types are great for storing a single group of related data, or multiple sets of related data:
group
- Used to store an object of datagroup_list
- Used to store a list of objects
Group data columns are normally only meant for use with the address fields in the app's form builder, but they can be used with custom-built forms as well. Please note that custom group
data columns and any child columns nested under a group
cannot be used for forms created in the app's form builder.
Group list data columns can also be used with custom-built forms, or by using a repeating group field in the app's form builder. Learn more about repeating group fields using this help article.
How do I create and use data columns?
There are two ways to create data columns in Customer Fields:
By adding custom fields to a form via the form builder
Using the data columns page in the app admin
As you can imagine, data columns are used in many different places throughout the app. See below for a quick breakdown:
Customer directory
Data columns are shown on the app's customer directory page. You can easily filter your customers by data columns using the customer directory. You can also choose which specific data columns are shown in the directory by using the column picker in the top right of the table.
Pro tip: You can learn more about the customer directory using this help article.
Customer detail pages
Data columns are also shown on the app's customer detail pages. When viewing a specific customer record in the app admin, you will see data columns in several places, including the 'Overview' and 'Form data' cards. You can also favorite certain data columns to highlight your most important data.
Data columns page
There are certain cases where you might want to create a data column that is not part of a form. Or, perhaps you want to change the label for an existing data column. Both actions are possible using the data columns page in the app admin.
The data columns page is designed to organize your data columns into groups. Simply click on a tab to see a list of data columns for each group:
Data imports and exports
When you export your customer data to a CSV, you will see data for all of the data columns you selected. When you import a CSV to add new customers or edit existing customers, you will need to map the app's data columns to the columns in your CSV file.
Manage your data columns
Favorite certain data columns
You can favorite certain data columns to highlight your most important customer data. When you favorite a data column, the app will automatically show the favorited data column (and its value) inside the 'Overview' card, which is found when viewing a customer's details in the app's admin area.
You can favorite data columns by clicking the star icon on the Form data card on the customer details page (as shown above).
You can also use the data columns page to favorite certain data columns, or view a list of your current favorite columns using the Favorite tab.
Archive and delete old/unused data columns
Since the app automatically creates data columns when using the form builder, there may be cases where you have leftover data columns that are old and no longer being used.
You can archive these data columns quickly and easily using the 'Archive selected' button, which is found after clicking on the Custom tab on the data columns page in the app admin.
Note: You cannot archive any data columns that are being used by a form. If you wish to archive a data column that is being used by a form, then you must either delete the form altogether or use the app's form builder to edit the data columns in use by the fields in the form. Once a data column is no longer being used by a form, you can archive it using the Custom tab.
Once a data column has been archived, you can permanently delete it from the app using the Archived tab.
Deleting a data column in the app will also delete the corresponding metafield definition in Shopify and all saved values for the metafield.
Questions or concerns?
If you need help with data columns or if you have any questions, please don't hesitate to contact our Customer Success team. You can contact us via live chat or email (support+cf@heliumdev.com).