Importing Customer Phone Numbers

When importing your orders to Shopify we allow you to import customer data. This includes the customer's phone number. Importing a customers phone number can be a little tricky and there are three main things you should look out for when doing so.

Phone Number Format

When importing a customers phone number (E.164 format) , you must provide the phone number in the correct format. Shopify has validation in their systems to ensure the phone number field is sent in the correct format. The Shopify admin accepts a phone number that can be dialed from anywhere in the world.

At this time the Shopify API only allows phone numbers that are formatted with a + followed by the country code at the beginning of the phone number. We'll try to add the + to your phone number value on import, so if the phone number still does not import this is most likely because you have not provided a country code.

Shopify also validates that the area code and country code is valid. If you try to import an order that has a phone number with an invalid (an area code or country code that is not assigned) area code or country code Shopify will send back an error. Please make sure all area codes or country codes are valid before you perform your import.

An example format would be:

  • +16135551212
  • 6135551212
  • (613)555-1212
  • +1 613-555-1212

If you import a phone number that is not formatted correctly, Shopify will send back an error. To fix the problem, you'll need to edit the value in the column you've mapped to the customer.phone field to one of the above formats. If you're still having an issue with the phone format, please don't hesitate to let us know.

Shopify's Phone Number Validation

When importing orders with customer data you must provide a customer.email address, this is required by Shopify. Shopify uses the email address as the unique identifier for the customer. This means each email address can only be associated with a single customer.

Shopify's phone number validation is similar. Shopify requires you provide an email address with each customer but the phone number is optional. However, if you do decide to provide a phone number with your customer it must be unique to a single customer. Once you have added a phone number to a customer, you can not assign that phone number to another customer. If you do, you'll get the below error.

Shopify Phone Number Validation Error

Although the phone number is not required, it is still unique and can only be associated with a single customer. If this causes a problem for you and you do not want to apply the phone number to the customer you can still add it to your order by applying it to the order only.

Blank Email Address And Phone Numbers

Shopify allows you to provide an empty email address when creating orders.  If you provide a phone number with a blank email address Shopify will try and create a new customer instead of associating the order with the customer.   In these cases you will get an error message saying has already been taken.  This error is returned from Shopify and means the phone number is already associated with a customer.  Since Shopify does not associate the order by the phone number, they prevent the customer from being created which will prevent the order from being created as well.

There isn't a way to disable this validation as it's something that happens on Shopify's platform.  Since Shopify does not associate the order with a customer by the phone number you can either add an email address to the order or remove the phone number from your file.  If you do not provide an email address and/or a unique phone number on the order it will import successfully but will not associate to a customer.

Importing Phone Number Only

Although Shopify does allow you to create customers with a phone number only, their API does not allow you to associate orders with customers who do not have an email address. So at this time you must provide an email address when importing customer data with your order.

If you're in a situation where you don't have a customer's email address but you do have the customers phone number, you can import the phone on the order itself. This will not associate the order with the customer but it will allow you to import phone numbers with the order which still provides value.

To import orders with a phone number, simply map the phone number field on the Order Detail page in your data mapping.

Phone Data Mapping

Once you've clicked the checkbox to the left of the phone field and made sure the Header Name matches the column with the phone number in your CSV file, click the save button.

Once you've imported your order you will see the phone number details on the order like below:

Phone Number On Order

If you're still having issues with the phone field on either the Order Details or Customer, please don't hesitate to let us know.


Related Articles:


App: EZ Importer

Tags: ez importer, customers, orders