Why Shopify's orders_export_1.csv Breaks Naive Pick List Scripts (And How to Group by Name)
If you export unfulfilled orders from Shopify Admin, you get a file named orders_export_1.csv.
A common mistake when writing a quick script or Excel macro to build a warehouse pick list from that file is assuming one CSV row = one order.
In Shopify's export format, a single order with three different SKUs spans three consecutive rows. Only the first row of that order carries the full billing/shipping address and order-level totals; the subsequent rows repeat the Name column (for example, #1041) and fill in the Lineitem name, Lineitem quantity, and Lineitem sku columns while leaving several order-level columns blank.
What goes wrong in naive scripts
- Grouping by the wrong column: If someone maps
Lineitem nameas the order identifier or iterates row-by-row without grouping byName, a 3-item order turns into 3 separate packing slips. - Blank or zero quantities: Cancelled line items or partial edits in weird exports can leave
Lineitem quantityempty or0.parseInt("", 10)givesNaN, which silently breaks total unit counts. - Missing SKUs on custom variants: Small shops often have variants without a
Lineitem sku. If your pick list aggregator keys strictly onLineitem sku, those items get lumped into a single""bucket regardless of product title.
A minimal browser-side grouping snippet
Here is the exact grouping logic we use to turn raw orders_export_1.csv rows into both per-order slips and a combined SKU pick summary without uploading customer PII to a server:
export function summarizeShopifyOrders(rows) { const ordersById = new Map(); const pickMap = new Map(); for (const row of rows) { const orderId = (row["Name"] || "").trim(); if (!orderId) continue; const qty = Number.parseInt(row["Lineitem quantity"], 10); if (!Number.isFinite(qty) || qty <= 0) continue; const sku = (row["Lineitem sku"] || "").trim(); const title = (row["Lineitem name"] || "").trim(); // Fallback key when a merchant hasn't assigned SKUs to every variant const pickKey = sku ? `SKU:${sku}` : `TITLE:${title}`; if (!ordersById.has(orderId)) { ordersById.set(orderId, { orderId, shippingName: row["Shipping Name"] || row["Billing Name"] || "", items: [], }); } ordersById.get(orderId).items.push({ sku, title, qty }); const existing = pickMap.get(pickKey) || { sku: sku || "—", title, totalQty: 0 }; existing.totalQty += qty; pickMap.set(pickKey, existing); } return { orderCount: ordersById.size, orders: Array.from(ordersById.values()), pickList: Array.from(pickMap.values()).sort((a, b) => a.sku.localeCompare(b.sku)), }; } Sample test files
If you want a clean dummy file to test your own parser without touching real buyer addresses, I put a fictional shopify-orders-sample.csv and an edge-case file in an open repo here: yhx123/ecommerce-order-csv-samples.
And if you just want to drop an orders_export_1.csv into a browser tab and print the combined pick list plus 4x6 or A4 packing slips right away, that is what we built OrderQuill's Shopify Pick List tool for. Everything runs locally in the browser tab.