Importing COGS (unit cost)

The COGS (unit cost) import writes the cost per item on your Shopify inventory items from a spreadsheet. It's the fastest way to fill in the unit costs that power EcomSolo's Profit reports — one row per SKU, one number, done.

It's a dedicated importer on purpose: the Products import (productSet) deliberately leaves cost alone, and the Inventory import only sets quantities. COGS import does exactly one thing — set InventoryItem.unitCost on items that already exist — so it can't accidentally touch anything else.

For the wizard itself — uploading, mapping, dry runs, schedules — see Importing into EcomSolo.

File shape

One row per item: an identity column plus a cost.

SKUCost
WATCH-00145.00
KEYBOARD-00212.50
  • SKU identifies the item (see How items are found).
  • Cost is the unit cost to set — a plain number, in your store's currency. 0 is a valid cost and really sets zero; a blank cost is a row error, not "skip" (COGS import exists to set a cost, so a missing one is rejected so you notice).

Recognized column headers

Auto-detect maps common cost/COGS export headers for you, so files from Shopify, Matrixify, or a hand-made cost sheet map on upload:

Header in your fileMaps to
SKU, Variant SKUSKU
Cost, Unit Cost, Cost Per Item, COGSCost
Inventory Item IDInventory Item ID (bypasses the SKU lookup)

Operations

COGS rows only ever update the cost on items that already exist — nothing is created and nothing is deleted. So Create is rejected (a row error tells you to use Upsert or Update), and Delete isn't offered. Upsert, Update, and Merge all behave identically: they write the cost in your file. See Choosing the operation.

How items are found

Rows are matched to Shopify inventory items by SKU, using EcomSolo's synced inventory data for the target store:

  • The SKU must already exist in the store — check the Inventory dashboard in EcomSolo; anything listed there will resolve.
  • If you have the numeric Inventory Item ID from an export, an Inventory Item ID column bypasses the SKU lookup entirely.
  • A SKU the store doesn't have is reported per row as not found — the rest of the file still applies.

Dry run, results, and freshness

  • The dry run validates every row — unknown SKUs and non-numeric or negative costs are reported per row before anything is written.
  • After the run, the error report lists every row with its outcome.
  • Costs you set are visible in Shopify admin immediately, and EcomSolo's Profit reports pick them up on the next profit calculation — filling missing unit costs is exactly what lifts the "COGS coverage" figure there.

Sample file

A ready-to-run sample lives at features/importing/examples/inventory-cogs-wowstore.csv:

SKU,Cost
WOW-WATCH,45.00
WOW-KEYBOARD,12.50

Troubleshooting

Error in the reportWhat it means / what to do
SKU 'X' was not found in the store's inventoryThe SKU doesn't exist in the target store (or hasn't synced yet). Check it on the Inventory dashboard first.
row requires a Sku or an InventoryItemIdEvery row needs one identity column — a SKU, or an explicit Inventory Item ID.
row requires a CostThe Cost cell is blank. COGS import sets a cost, so an empty cost is rejected rather than silently skipped.
Cost 'X' is not a valid numberRemove currency symbols and thousands separators — a plain number like 12.50.
Cost cannot be negativeUnit cost must be zero or positive.

FAQ

Does this change my selling prices? No — COGS import sets the cost (what the item costs you), never the price a customer pays. Prices are set on the Products import.

Does it create products or inventory items? No — it only updates the cost on items that already exist. Import the products first if they aren't in the store yet.

Why is there a separate import for cost? The Products import treats a product's variants and options as a complete desired state, and it leaves cost out by design. A dedicated, update-only COGS import lets you fill costs safely without any risk to product data or stock.

Can I schedule it? Yes. A scheduled COGS import re-reads the saved file (or Google Sheet — ideal, since a supplier's cost sheet changes over time) on your chosen cadence, keeping unit costs current for accurate profit reporting.