Skip to main content

Adding your cost per unit

Sync costs from Shopify or enter them yourself, one SKU, many at once, or by CSV, so Margins can calculate COGS and real margins.

Written by Emily Burrows

About

Your cost per unit is what turns sales into margins. Margins can sync it automatically from Shopify; for every other sales channel it's the one number only you can supply.

This article covers all four routes: syncing from Shopify, adding a cost to a single product, correcting many at once, and importing by CSV. Every cost carries a start date and applies from that date forward until the next one begins, so a cost change adds to your history instead of rewriting it.

Before you begin

  • Decide what goes into your cost. Most brands use an average landed cost: product plus freight, duties, and inbound fees. See Calculating your average cost per unit.

  • Merge your duplicates first. Only the primary product's cost is used, so a cost entered on a duplicate does nothing. See Merging duplicate products.

  • Know the date each cost should start from. Margins recalculates COGS from that date forward.


1. Sync your costs from Shopify

If you keep cost per item up to date in Shopify, Margins picks it up. No work on your end.

Shopify is the only channel that exposes cost data, so a synced cost belongs to the Shopify product only. Your Amazon, TikTok, or wholesale sales arrive as separate products with no cost unless you add a cost or merge them with a Shopify product. Merge each set with the Shopify product as primary, and that one cost then covers every channel selling the SKU.

  1. In Shopify, set Cost per item on the product or variant.

  2. In Margins, go to Products and merge the other channels' copies into the Shopify one, making the Shopify product primary. See Merging duplicate products.

On Actions → Bulk costs edit you'll see how many products are on synced costs. Those are edited in Shopify, not here.

Note: a cost that came from Shopify should be edited in your Shopify admin instead of Margins and it flows back through.


2. Add a cost to one product

Use this for a single SKU that needs an updated cost.

  1. Go to Products.

  2. Click the product name.

  3. Open the Cost per unit tab.

  4. Click + Add cost.

  5. Enter the amount in Cost per unit ①.

  6. Click Save.

The new cost appears at the top of the timeline and Current cost updates. Net units depleted on that entry shows To be updated ① until Margins finishes recalculating.

If a product already has a cost history, you'll also see a field to enter a From date to select from when the new cost should apply.

Note: you're adding a cost, not replacing one. Earlier entries stay on the timeline and keep applying to the units that sold while they were in effect.


3. Correct costs for many products at once

  1. Go to Products.

  2. Click Actions → Bulk costs edit.

  3. Optional: turn on the missing-cost toggle to show only products without a cost.

  4. Type a cost into the Average cost field on any row.

  5. To apply one cost to several products, tick their checkboxes and enter the amount in Set cost for [n] selected product ① at the top right corner.

  6. Read the note beside each row you changed ①. It names the exact date the cost will apply from, and says whether it's replacing an existing cost.

  7. Click Save ① in the bar at the bottom of the page. Discard ② throws the changes away.

After you save, each product's Average cost recalculates for the period you're viewing.

Important: this page doesn't always add a new dated cost. On a product with no cost yet, it applies from the From date of the period you have selected. On a product that already has one, it replaces that entry and takes over its date. The note in step 6 tells you which is happening read it before you save.

Tip: click Export costs first. You get your current costs in a file you can check against your own records before you start typing.


4. Import costs from a CSV

Best when you're setting up for the first time, or after a vendor price change across many SKUs.

  1. Go to Products.

  2. Click Actions → Bulk costs edit, then Import CSV.

  3. Click Download the CSV template.

  4. Fill in a cost and a date for each SKU. The SKUs in your file have to match the SKUs in Margins, that's what the file is matched on.

  5. Click Click here to choose a file and select your file.

  6. Review the uploaded data, edit anything that looks wrong, and save.

Once saved, your costs appear on each product's Cost per unit timeline and COGS recalculates from each cost's date forward.

Important: saved imports can't be reverted. To fix a bad import, upload a corrected file or edit the costs directly in the app.

Two things about the date column that catch people out:

  • The date is when the cost starts to apply, and it keeps applying forward from there. A cost dated 01-01-2023 applies from January 1, 2023 until the next cost begins.

  • If Margins already holds cost entries dated after the date in your file, and those SKUs are in your upload, the uploaded cost overwrites them.

Tip: to build the file, export the product list from Products with the missing-cost toggle on. You get exactly the SKUs that still need a cost.


FAQs

I set costs in Shopify. Why do my Amazon sales still show no cost?

Because the synced cost belongs to your Shopify product, and Amazon arrives as a separate one. Merge them with the Shopify product as primary. See Merging duplicate products.

If I edit a Shopify cost in Margins will it sync back to Shopify?

No. To protect the integrity of your data, we have read-only access to your Shopify admin. Change it in your Shopify admin and the new cost flows through to Margins.

Can I enter a cost for a date in the past?

Yes. Margins recalculates COGS from that date forward.

What if a product has no cost at all?

Its COGS is zero and its margin shows as 100%. See Why are my products missing cost per unit?


Related articles

Did this answer your question?