Shopify product CSV import: how to avoid losing variants, IDs and sales history

Updated 2026-11-22

Exporting products, editing the spreadsheet and importing it back is the fastest way to bulk-edit Shopify products. It's also how many stores lose variant history. These are the things that go wrong, and how to check for them before you click Import.

How Shopify matches your rows

Shopify identifies a product by its Handle and each variant by the handle plus its option values (Option1/2/3 Value). It doesn't use the variant's internal ID in the standard product CSV. So:

  • Change an option value (for example "S" → "Small") and Shopify sees a new variant. The old variant, with its ID, sales history, variant metafields and inventory links, can disappear, and apps, feeds or ads pointing at the old variant ID break.
  • Change a handle and Shopify creates a new product, leaving the old one in place, so you get duplicates.

Blank cells overwrite data

With "Overwrite products with matching handles" checked, Shopify's documentation says a blank non-required column overwrites the existing value with blank. A column you cleared or forgot to fill (barcodes, descriptions, SEO fields) gets wiped.

Merchants also report overwrite imports deleting variants that were missing from the file. Keep every variant row in the file unless you mean to remove it.

Sorting breaks product groups

A product's variants are consecutive rows under the same handle. Sorting the sheet by another column can split those groups apart and give you surprising results.

Five-step preflight checklist

  1. Export a fresh backup right before editing, and keep it untouched.
  2. Delete the columns you aren't changing from the file you import. Missing columns are left alone; blank ones are overwritten.
  3. Don't rename option values unless you accept the variant being recreated.
  4. Don't sort the sheet, or sort it back by handle before importing.
  5. Diff the edited file against the backup before importing: look for changed option values, missing variant rows, changed handles and cells that went from a value to blank.

A free tool for step 5

I built a free preflight checker: drop your fresh export and the file you're about to import, and it lists every variant that would be recreated or deleted and every cell that would be blanked. It runs in your browser: check your CSV.