October 14, 2026 · CostSentry

Keeping a Cost History for Shopify from CSV Exports

Dark illustration: a fan of identical spreadsheet sheets with dated tabs, spread out over time, under a thin gold price line that steps upward

Shopify keeps one cost per variant and forgets the old one the moment you change it. If you want to know what a SKU cost in March, or when its margin started slipping, you have to keep that record yourself. The cheapest way is a folder of dated product exports and a spreadsheet that stacks them. You need no app, and once it is set up it takes about twenty minutes a month.

What to export, and when

The standard product export (Products → Export, all products, CSV) already has what you need. Out of its many columns, keep four:

When you export decides what the history can prove. Take a snapshot before and after every cost import, plus one on the first of each month as a baseline. The before-and-after pair shows exactly what a given import changed, and the monthly one catches edits made by hand in the admin. If you already follow a routine like the one in From Inbox Chaos to a Price-File Process, the export becomes the first and last step of each intake.

Folder and naming rules

A year from now you will need to find the right file without guessing. These rules make that possible:

  1. Use one name pattern: products_2026-04-01_monthly.csv, products_2026-04-14_before-supplierA.csv, products_2026-04-14_after-supplierA.csv. The date comes right after the prefix, in year-month-day order, so the files sort themselves.
  2. Never edit an export. Copy it into the working sheet and leave the raw file as Shopify produced it. If something needs fixing, fix it in the sheet and leave a note.
  3. Write one log line per file: date, reason, who exported it, and the supplier file it relates to. A plain text file in the same folder is enough.

Building the history sheet

Create one long table with five columns: snapshot_date, sku, cost, price, note. Each export adds a block of rows under the previous one. You can paste by hand or use a query tool that appends every file in the folder. Either way, the table only grows downward.

To compare two snapshots, put the newer one in a sheet with SKU in column A and cost in column C, and pull the older cost next to it:

=VLOOKUP(A2, Prev!A:C, 3, FALSE)

Then the change and the margin at current retail:

Cost change % = (new cost - old cost) / old cost
Margin %      = (price - cost) / price

A #N/A from the lookup means the SKU wasn't in the older snapshot. It is either a new item or a renamed SKU, and you want to know which, so keep those rows visible.

A worked example: three SKUs, four snapshots

Here is the stacked history for three items across four monthly exports:

SKUJan 1Feb 1Mar 1Apr 1Retail
HX-10406.006.007.207.2012.00
VL-221018.5018.5018.5019.9829.00
KT-00073.103.10(blank)(blank)7.50

The blank cost is the case you would almost never catch otherwise. The import traps that cause it are covered in How to Bulk Update Cost per Item in Shopify.

Rules that keep the history honest

Where the DIY approach stops

The snapshots record what Shopify had in the cost field. If nobody updated cost per item, the history shows a flat line while the supplier's price went up. Resolution is limited by your schedule too: two changes between monthly snapshots look like one.

File size is rarely the problem. A catalogue of 5,000 SKUs exported weekly adds 260,000 rows a year, well inside a spreadsheet's limit of just over a million rows. The harder part is discipline. Someone has to take the exports on time, every time, and the routine tends to lapse in the busy months when prices move most.

For a store with a few hundred SKUs and one or two suppliers, the folder and the lookup are usually enough, and they make the quarterly price review much faster. With a bigger catalogue or more suppliers, CostSentry can keep the history instead. It builds it from the supplier price lists themselves, matched by SKU, and flags rises, drops and margin breaches as each new list arrives. Why the single cost field isn't enough on its own is covered in Shopify's Cost per Item: One Number, No History.

Check your last export against the new price list

Drop in your Shopify product export and a supplier CSV, see which SKUs match and which now fall below your target margin. Free, no account.

Open the free checker ↗
Runs in your browser. Nothing uploaded, no account.