Customer CSV column descriptions

Descriptions of the columns for the customers CSV file.

To import customers into Shopify using the Transporter app, you need a CSV file that contains only this record type.

CSV sample file

Download a sample customer CSV file: customers.csv.

You can use the Transporter command-line tool to generate this CSV file or you can follow the format described below to create it yourself.

Column descriptions

The following table describes the column headers for the CSV file:

Descriptions of all table column headers for the CSV file
Column Description
First name
The first name of the customer. This column and the Last Name column are required if neither the Email nor the Phone Number columns are included.
Last name The last name of the customer. This column and the First name column are required if neither the Email nor the Phone Number columns are included.
Email The unique email address of the customer. This column is required if the Phone Number or the First Name and Last Name columns are not present. The domain (for example, @mydomain.com) needs to be valid.
Company The name of the customer's business, if one exists.
Address1 The first address line. This column is required for an address. For example, 150 Elgin St.
Address2 The optional address line. For example, Unit 202.
City The name of the city. This column is required for an address. For example, Ottawa and Berlin.
Province The name of the region (such as the province, state, prefecture, or territory), where the customer is located. If you include a value for this column, then you must also include a value for the Province Code column. For example, Mexico city, New York, Nunavut.
Province code This column is required when you specify the Province column. The subdivision assigned code (ISO 3166-2) for the region, such as the state, province, prefecture, or territory, in the country. An ISO3116-2 code has the following parts:
  • 2-character country code - do not include this part.
  • hyphen (-) that separates the two parts of the code - do not include the hyphen.
  • 1-to-3-character subdivision code - include this part only.
ISO3116-2 code structures
ISO 3166-2 subdivision code Province code
MX-MEX (Mexico City, Mexico) MEX
US-NY (New York, United States) NY
AR-B (Buenos Aires, Argentina) B
FR-21 (Côte-d'Or, France) 21
Country The name of the country of the customer address. This column is required for an address. For example, Canada and Australia.
Country code Specify the Country code even when you specify Country. The two-letter (ISO 3166-1 alpha-2 code) for the country of the customer address. For example, CA for Canada and AU for Australia.
Zip The zip, postal code, or postcode of the customer address. For example, K2P 1L4.
Phone

The unique phone number (E.164 format) for the customer. This column is required if neither the Email column nor the First name and Last name columns are included.

A phone number can be formatted using different formats, but each format must represent a number that can be dialed from anywhere in the world. The following formats are all valid:

      
6135551212
+16135551212
(613)555-1212
+1 613-555-1212
Accepts Marketing Whether the customer has consented to receive marketing material via email. Valid values:
  • true - The customer has agreed to receive marketing material.
  • false - The customer hasn't agreed to receive marketing material. This is the default value.
Values are case sensitive
Tags A string of comma-separated tags that are used for filtering and search in your Shopify admin and in your storefront. Each comma-separated tag can have up to 255 characters. For example, "Loyal, New customer, Marketing".
Note A note about the customer. For example, "This customer placed an order that had a fraud warning" or "Harry loves the color millennial pink".
Tax Exempt Whether the customer is exempt from paying taxes on their order. Valid values:
  • true - Taxes won't be charged to the customer's orders at checkout.
  • false - Taxes will be charged to the customer's orders at checkout. This is the default value.
Values are case sensitive
Metafield Namespace A container for a set of metafields. To import metafields, you need to include values in all 4 metafield columns (Metafield Namespace, Metafield Key, Metafield Value, and Metafield Value Type). You should define a custom namespace for your metafields to distinguish them from namespaces used by apps and Shopify (including the default global). Maximum length: 20 characters.
Metafield Key The name of the metafield. Maximum length: 30 characters. This column is required when other metafield columns are included.
Metafield Value The information to be stored as metadata. This column is required when other metafield columns are included.
Metafield Value Type The metafield's information type. Valid values:
  • string
  • integer
  • json_string
Values are case sensitive This column is required when other metafield columns are included.

Remarks

File name

The name of your CSV file needs to include the word customer (name of the object type that it contains). For example, mycustomers.csv. The file needs to be in UTF-8 format.

Unique identifiers

A customer can be uniquely identified by one of the following:

  • Email
  • Phone Number
  • First Name and Last Name

Your CSV file must contain these unique identifier columns.

Multiple addresses

If your customer has multiple addresses, then create a row for each additional address.

In the customer row, enter the customer's default address.

In each additional address row, include the customer's unique identifier, which is either their Email, Phone Number, or First Name and Last Name combination.

Additional addresses cannot have separate names associated with them. The first and last name of the customer applies to all addresses. Additional phone numbers can be added for each additional address (provided that you aren't using the phone number as the customer's unique identifier).

For example:

Customer CSV file with multiple addresses

Ready to start selling with Shopify?

Try it free