How to export your Shopify orders and products as CSV

Two files from Shopify admin · 4-minute read · no app, no API

The loss report needs two CSV files, and both come from Shopify admin in about a minute. Nothing is installed, no access is granted, and the files are read inside your browser — they are never uploaded.

Shopify renames menu items now and then, and the labels differ slightly by language and plan. The steps below are the shortest path to a file with the right columns; if a button is named differently in your admin, look for the same words.

1. Orders: the file with one row per line item

  1. In Shopify admin, open Orders.
  2. Click Export (top right of the orders list).
  3. Choose the orders to include. Orders by date with a range is the usual choice — for example the month a promotion ran.
  4. For format, choose CSV for Excel, Numbers, or other spreadsheet programs. The plain CSV option also works, but the Excel variant keeps product names that contain commas in one piece.
  5. Click Export orders. The file lands in your downloads, named like orders_export.csv.

This export writes one row per line item, with the order repeated on each of its rows. That shape is what makes a per-line comparison possible. A file with one row per order cannot be used, because the cost of each product is no longer attached to the price it sold for.

2. Products: the file that carries Cost per item

  1. Open Products in Shopify admin.
  2. Click Export.
  3. Choose All products (or the collection you discount).
  4. Choose the same CSV format as before and click Export products.
  5. Open the file and check two things: there is a Cost per item column, and it has numbers in it — not blanks.

Shopify's product export includes Cost per item and Variant SKU by default. If the column is there but empty, the cost has never been entered for that product; see how to add cost per item. Nothing can be measured without it, and the report will list those lines under “Missing cost” instead of guessing.

Which columns the report reads

You do not need to edit anything. This is here so you can tell, at a glance, whether an export is usable — and why a number might be missing.

Columns read by the loss report, by file, and what happens when one is missing
ColumnFileWhat it doesIf missing
NameOrdersGroups the line items of one orderFile rejected
Lineitem nameOrdersProduct name shown in the reportFile rejected
Lineitem quantityOrdersUnits on the line; cost is per unitFile rejected
Lineitem priceOrdersPrice per unit before discountsFile rejected
SubtotalOrdersUsed to work out the order-wide discountFile rejected
Lineitem discountOrdersThe discount already taken off the lineLine discounts are read as zero
Discount CodeOrdersGroups the loss by discount codeEvery line shows as “No discount code”
Financial StatusOrdersSkips refunded and voided ordersRefunded orders would be counted
Created atOrdersThe date range in the report headerNo period shown
CurrencyOrdersThe currency label, and a check that one currency is presentNo currency shown
Lineitem skuOrdersMatches the line to a costThose lines go to “Missing cost”
Variant SKU (or SKU)ProductsThe key the cost is looked up byFile rejected
Cost per itemProductsYour cost for one unitFile rejected

Two columns you might expect are not used: Total (it includes shipping and tax, which are not product revenue) and Lineitem compare at price (the “was” price, not what was paid). The comparison is always price after every discount against cost per item.

The three mistakes that make a report wrong

1. The wrong date range

“All orders” on a busy store is a huge file that says little. A range that matches one promotion — or the last 30 days — answers a question you can act on. If the range starts after the sale began, the loss from its first days is missing; if it ends mid-week, the totals will not match your weekly report. Note the range you chose next to the number you get.

2. A file with no line items

Some CSVs in circulation have one row per order: a totals-only summary from an accounting app, or a spreadsheet someone built from order totals. They have no Lineitem columns, so there is no per-product price to compare with a per-product cost. Use Shopify's own Orders export — the one with Lineitem name and Lineitem quantity columns.

3. Cost per item left blank

This is the most common one, and it fails quietly. If cost was never entered for a variant, that line is not counted as a loss and not counted as profit — it appears under “Missing cost”. A report where most lines are missing cost is not a clean bill of health. Fill in the costs for everything you discount, re-export products, and run it again.

When the export is huge

You have the two files — the rest takes a minute. The free loss report compares every order line's discounted total with its cost per item, lists the worst losses first, and groups them by discount code and product. It runs in your browser; the files never leave your machine.

Run the loss report