All things Shopify and commerce
According to the Shopify Help documentation, not only can you create customer metafields but you can also use those fields as import fields when importing customers. I cannot make this work. I opened a ticket and was told that it would not work which is contrary to the documentation. That ticket remains open with no activity over the last few business days.
If anyone has gotten this to work with the current (August 2024) release of Shopify, would you please share what you did and any tips you discovered to make it work?
Thank you kindly.
Solved! Go to the solution
This is an accepted solution.
Hi Paul,
That's a good suggestion, I will do that and see what I learn, and update this post.
Thank you!
from where are you importing the customers and metafields?
The source for the import is a CSV file based on the Shopify template. The additional columns have been added and named as per the Shopify documentation to import customer metafields, but the import function says that they are invalid.
Any such customer metafields for importing must already exist in the admin
and be a specific type
https://help.shopify.com/en/manual/customers/import-export-customers#supported-metafields
Also make sure the CSV itself is free of errors, otherwise be more exact with whatever error messages are showing and where and how.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
Hi Paul,
The customer metafields do exist in the admin. I followed the instructions exactly to create the column headers in the import CSV using the data from the naming from the customer metafields exactly. In this scenario, all the metafields are single line text which is supported per the link that you provided. The failure occurs during the Preview phase of the import where it says that the fields do not exist, even though they do.
Thanks for trying to help
Have you tried exporting then reimporting the exact CSV shopify gives when it includes metafields to check your syntax
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
This is an accepted solution.
Hi Paul,
That's a good suggestion, I will do that and see what I learn, and update this post.
Thank you!
Hi Paul,
Thank you for the suggestion. I discovered that the documentation was not completely clear. Your idea gave me the full field names and the import worked as hoped.
Thank you very much sir.
I attempted to export my customers but the custom metafield did not export. Do you have any more info since you got it to work?
edit: Nevermind, I finally figured it out
For all others playing at home. I have dropped a few hours on this today. The information is 'kind-of' in the documentation, but it is not as clear as it should be. Things I learned.
I put the CSV columns in the exact order that the default fields and metafields columns are in, in the Shopify metafile settings and sample export CSV file.
The CSV column heading in your import file must have the exact syntax. When I created one of the metafields, it was assigned an identifier of custom.customer_number . I assumed, incorrectly, that this would be the column heading for the csv import file, but I eventually discovered that the column heading had to be customer.metafields.custom.customer_number , because I was importing into the Customer module. First trap for young players.
The second trap is that at the time that I was doing my importing and exporting, only six specific data formats out of the available 26 data formats for metafields are supported for importing and exporting to CSV files. (no, I don't understand why this is the case either - probably to support the external Shopify App community so you are 'encouraged' to purchase another App to support this usability). So, if your metafield is set up with a type other than Boolean, Date, Date and Time, Integer, Decimal, Single line text; then it will neither import nor export in the version of Shopify I am using at the time of writing. Hopefully this will be remedied soon.
My Third mistake was related to the country codes. The ISO reference page provided shows three different options for each Country. For example; Australia has AU, AUS or 036. It would appear that Shopify only accepts the two digit version of the ISO codes. I was using the three digit in my initial upload.
My next challenge is that I did three uploads, to get some corrected data in from my CSV file (one of the entries had multiple lines in one of the metafields, which Shopify does not currently allow. Even though I decided to not overwrite customers existing records, somehow, Shopify imported eight customer records instead of one; thereby duplicating seven records which I now need to find - an annoying task in itself, because I cannot seem to sort the customer records by customer name - I am still trying to mentally come to terms with this. I can only assume I am getting something wrong.
Finally, a simple suggestion for Shopify Developers - If you look back to pre-1980's computing practices, you will see this really neat trick for importing date into an existing database. It involves a processing called "mapping". Try to stay with me here; what you do is, when the user uploads a file, you present the user with a list of the available fields in your database (the fields to which data can be imported) and then next to each of those fields you have a dropdown box of all the available fields from the CSV import file, and, you have preselected the field you feel most likely corresponds to the relevant field in your database, or you have left the dropdown box blank if it is unclear what the mapping should be. The user can then leave a dropdown box blank - that field is not being imported, agree with the preselection already made - well done Shopify AI, or select another field from the dropdown box to match the existing database field with the field (column name) being imported from the CSV. Of course, data type checks can be done to warn a user that they are trying to import a URL into a Date field, or text in to and integer field, and so on. Grab any computing book from the 1980's; it will be in there somewhere. And while you are at it, would be great to increase the number of supported metafield types, preferably to 26.
Other than that, enjoying my learning process.
thank you for clarity on the metafield setup. I was having a similar issue. Do you have any tips for matching up customer order data to imported customers?
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024