Shopify & Commerce Technology

Why One Cost Field Isn't Enough for Margin-Aware Pricing on Shopify

Shopify stores one cost per variant, but real product costs include freight, duties, commissions, and exchange rates. Here is how to price with the full picture.

Ozan Ertürk 3 min read

Shopify gives each product variant a single “cost per item” field. It is a sensible default: one number that lets the platform show gross margin and profit reports. For many stores, though, that one number is where pricing accuracy quietly breaks down.

The cost a store actually pays

For a product bought from a supplier and sold online, the true cost of one unit is usually the sum of several parts:

  • the supplier price, often in a different currency from the one the store sells in;
  • freight to the warehouse, which varies by shipment and season;
  • import duties and taxes, which depend on the product category and the destination;
  • commissions and fees from marketplaces, payment providers, or partners;
  • an exchange rate that changes continuously.

A single cost field can hold the total, but only as a number someone calculated at some point in the past. When freight rates rise or the exchange rate moves, that number goes stale — and every margin calculation built on it goes stale with it.

How margin erodes without anyone noticing

The pattern is familiar to anyone who has run a catalogue for a while. Costs change gradually and in several places at once. Prices, meanwhile, change only when someone sits down to update them. In between, products keep selling at prices that were right a few months ago.

Nothing looks broken. Orders come in, revenue reports look normal, and the gap appears only when someone reconciles margins at the end of a period. By then, the store has sold weeks of inventory below the margin it intended.

The root cause is not carelessness. It is that the pricing logic lives in a spreadsheet, outside the system that sets prices, and moving numbers from one to the other is manual work that competes with everything else.

Treat pricing as a formula, not as edits

A more reliable approach is to move the pricing logic itself into the system:

1. Model landed cost explicitly. Instead of one cost number, keep the components — supplier price, freight, duties, commission, currency — and compute the landed cost from them. When a component changes, every affected product’s cost updates with it.

2. Express the price as a formula. “Landed cost multiplied by a target markup, rounded to a price ending” is a rule that can run on every product. Conditional logic handles different price bands: cheaper items might carry a higher multiplier than expensive ones.

3. Set guardrails. Two limits catch most mistakes: a minimum margin a price must never fall below, and a maximum change per run so that a data error cannot double a price overnight.

4. Skip, don’t clamp. When a calculated price would breach a guardrail, the safest behaviour is to leave that product unchanged and report it, rather than silently forcing the price to the nearest allowed value. A breach usually means something upstream needs attention — a wrong cost, a missing duty rate — and a person should see it.

5. Keep a rollback point. Before any bulk price update runs, save the exact previous price of every variant. If something goes wrong, restoring the catalogue should take one step.

Where competitor prices fit

Competitor prices are a useful input, but a risky trigger. Following a competitor automatically can turn their pricing mistake into yours, or start a race to the bottom that no one intended. A safer pattern is to monitor competitor prices, use them as a variable inside the pricing formula, and require approval before a competitor-driven change is applied.

The broader point

Margin protection is a good example of where intelligent commerce systems start: not with a model making creative decisions, but with an accurate picture of the business, explicit rules, and changes that are safe to make and easy to undo. Once that foundation exists, adding analysis and recommendations on top of it — which products are drifting toward their margin floor, which cost component moved the most — becomes straightforward.

We built DX Profit Margin Editor Pro around this approach: landed-cost formulas, margin and change guardrails that skip rather than clamp, competitor tracking with approval, and one-click rollback.

Ready to Build a More Intelligent Business?