Select Page

This is for the app Shopify Import and Export CSV.

If you want more example CSV files, I have lots more I use to test the app with. Just send me an email hello@programmerhat.com

An easy way to use the CSV app to do updates on products

Do an export of all the products in the CSV app. Then delete all rows except for the products you want to update.

Then you can update the CSV, and use the “Import” function in the app.

Example CSV file to import and create products

This creates 3 products: “Example Hat”, “Example Pants”, “Example T-Shirt”.

This also creates 3 variations on “Example T-Shirt”, so this examples teaches you how the variations work in Shopify.

https://ecomapps.programmerhat.com/csv-import/csv/regression_blank_gids.csv

Example CSV file to set inventory numbers of products

The two important column names are “Variant Inventory Tracker” and “Variant Inventory Qty”. You will see in the example CSV that “Variant Inventory Tracker” should have all “shopify”, and the “Variant Inventory Qty” should be a number.

https://ecomapps.programmerhat.com/csv-import/csv/regressioninventory.csv

Example CSV file to set Harmonized System Code (or HS Tariff code)

The important column is “Harmonized System code”.

https://ecomapps.programmerhat.com/csv-import/csv/test_hs_code.csv

What do each of the column names mean in the example CSV file?

Perhaps the easiest way to do learn the meanings of each of those column names is to create 2-5 products in Shopify, then use the “Export” CSV function in the app, then you can examine which columns have the values that you put in for each product.

More specific documentation (work in progress. I should add more. Email me if you need more hello@programmerhat.com)

Track Inventory?

The column name to use is “is variant tracked?“. Possible values in the column are either “true” or “false”. Example CSV file: https://ecomapps.programmerhat.com/csv-import/csv/test_inventory_tracked.csv

Then you should see 1 product’s inventory is tracked, while 1 product’s inventory is not tracked. See screenshot:

Sales Channel

Here’s an example CSV file you can use. I use it to test the column: https://ecomapps.programmerhat.com/csv-import/csv/test_channel.csv

The column name to use is “Channel”.

I’ve noticed that if the “status” of the product is “active” (and by default it is active), then the “Online Store” channel will always be active. You can make the status of the product “draft” to prevent “Online Store” channel from being automatically added.

Also if you want to have multiple channels for a product, you’d wanna comma-delimit the channels, like this: “Online Store, Google & YouTube”.

Example of metafield

Metafield column name needs to be in a special format: “Metafield: <key>.<name> [type]”. For example: “Metafield: csvapp_namespace.csvapp_key [single_line_text_field]”

Here’s an example CSV that creates a metafield on the product with handle “example-hat-1”: https://ecomapps.programmerhat.com/csv-import/csv/metafield_regression.csv

Example of variant metafield

Variant metafield column name needs to be in a special format: “Variant Metafield: <key>.<name> [type]”. For example: “Variant Metafield: csvapp_namespace.csvapp_key [single_line_text_field]”

Here’s an example CSV that creates a variant metafield on the product with title “CSV app – test variant metafield”, and with tag “csv”: https://ecomapps.programmerhat.com/csv-import/csv/test_variant_metafield.csv

What is a Option Name and Option Value?

This is a critical concept for understanding variants. Shopify uniquely identifies variants of a product based on Option Name and Option Value.

Here is a screenshot of variants as an example:

The Option Name is “Size”, and the possible Option Values are S, M, L.

So for variants of a product, the Option Values must be different between the variants. For example here: one variant has Size “S”, another variant has Size “M”, another variant has Size “L”.

Now in your CSV, variants cannot have duplicate values for the same variant.

Hope that clears it up. If not, please email me asking me to explain this better.

Error: The variant ‘Default Title’ already exists.

Variants are uniquely identified by Option Name and Option Value.

You have variants here based on the “handle” or “title” as the identifier, but you didn’t give them unique Name/Value combos.

Look at this example CSV which successfully creates products. One of them has variants, and notice how the Name+Value are different: https://www.programmerhat.com/faq-for-import-csvs-into-shopify-using-ez-csv-import-csv-export-app/#Example_CSV_file_to_import_and_create_products

Error: Invalid Taxonomy

The app is trying to find the ID of the taxonomy you wrote in the CSV.

The app gets the list of taxonomies from Shopify: https://help.shopify.com/txt/product_taxonomy/en.txt

In that large text file, the IDs are on the left, and the category/taxonomy is on the right. The separator is the dash “-“.

Example: the ID for “Animals & Pet Supplies” is “1”, which is the second row in that text file.