Skip to main content
← Commerce insights

D2 Commerce Knowledge · COGS

COGS should follow the SKU, quantity and historical cost — not a shop average.

Marketplace product cost becomes useful when every sold SKU resolves to a controlled unit cost for the correct period. Effective dates, bundle rules and visible exceptions keep contribution reproducible when product costs and catalog structures change.

Direct answer

How should marketplace COGS be calculated?

Calculate COGS from sold quantity multiplied by the valid unit cost for each SKU and transaction period. Maintain the cost outside the report in a controlled cost master with stable SKU keys and effective dates. When the order contains a bundle, apply a documented bundle or component rule. If the cost cannot be resolved, keep the economics incomplete instead of substituting zero or a shop average.

COGS model

SKU → valid cost → quantity → contribution → exception control.

01

Identify the sold unit

Resolve the marketplace SKU, variation or bundle that the order actually sold. Do not calculate cost until the commercial unit is unambiguous.

02

Resolve the valid cost record

Use the controlled cost master to find the unit cost whose effective period applies to the transaction.

03

Apply quantity

Multiply the valid unit cost by quantity sold, or apply the documented component rule for bundles.

04

Preserve the evidence

Keep the SKU key, cost source, effective date and mapping logic so the historical result can be reproduced later.

05

Calculate contribution

Combine COGS with valid revenue and the other variable selling costs in scope to understand product-level contribution.

06

Surface exceptions

Unknown SKUs, missing costs, overlapping cost periods or unresolved bundles remain visible until an owner resolves them.

Operating formula

COGS = Σ(sold quantity by SKU × valid unit cost for that SKU and period)

For bundles, replace the single-SKU cost with the governed bundle cost or documented component-cost sum. This is a marketplace operating model; the business should keep its chosen accounting classification explicit.

Cost master

The cost master is the control surface — not a hard-coded spreadsheet cell.

Stable SKU key

Use an identifier that remains stable across order exports, internal product records and reporting transformations. Display names are useful context but should not be the only join key.

Unit cost

Store the controlled direct product cost used by the reporting model, together with the unit that cost refers to.

Effective period

Record when the cost becomes valid so a later cost update does not rewrite earlier contribution history.

Cost source

Preserve where the cost came from — for example an approved internal cost record — so changes can be investigated instead of appearing as unexplained margin movement.

Bundle rule

Define whether a bundle has its own cost or inherits cost from component SKUs and quantities. The rule should be explicit rather than inferred at report time.

Data-quality state

Mark missing, overlapping or unverified cost records as exceptions. A blank cost is an operational issue, not evidence that product cost is zero.

Bundle rules

Bundles need their own cost logic.

Dedicated bundle SKU

The marketplace bundle has its own controlled cost record.

Use when the bundle is managed commercially and operationally as a distinct sellable unit.

Component decomposition

Bundle COGS is the sum of component quantity × valid component cost.

Use when the bundle is assembled from existing SKUs and the component relationship is governed.

Changing bundle composition

The component rule itself needs an effective period or version.

Use when the same marketplace bundle identifier can represent different component structures over time.

Unknown bundle mapping

Contribution remains incomplete until the product composition is resolved.

Do not substitute a shop-average cost merely to make the row complete.

Cost classification

COGS is not every expense required to run the shop.

Direct product cost

COGS

Cost attached directly to the unit or components sold.

Per-order packaging

Separate variable selling cost

Track separately when it changes with fulfillment and matters to contribution analysis.

Variable fulfillment cost

Separate variable selling cost

Keep separate when the business wants the contribution view to include order-linked fulfillment economics.

Ads

Acquisition cost

Do not bury media spend inside COGS; preserve it as a distinct commercial cost layer.

Affiliate / creator commission

Selling / acquisition cost

Keep commission visible so product cost and acquisition economics can be diagnosed independently.

Software, fixed labor, agency fee

Outside product COGS in this operating model

These may matter to broader operating profit, but should not be silently mixed into SKU product cost.

Exception control

Missing cost is an exception state — not zero.

Unknown SKU

Order line cannot be mapped to the controlled cost master.

Resolve the canonical SKU/variation mapping before finalizing contribution.

Missing effective cost

SKU exists, but no valid cost record covers the order date.

Add or correct the historical cost period rather than applying today's cost backward.

Overlapping cost periods

More than one cost record appears valid for the same SKU and date.

Resolve the governance conflict before choosing a value.

Bundle components unresolved

The sellable bundle exists but its cost composition is unknown.

Restore the bundle or component rule before reporting product-level contribution.

Unit mismatch

Cost is stored per case, pack or component while order quantity uses another unit.

Normalize the unit rule explicitly before multiplication.

Cost source changed

The economic movement may reflect a source revision rather than operating performance.

Keep source/version context so historical restatements can be distinguished from real margin change.

Decision rules

COGS should change what you scale, price or investigate.

A high-revenue SKU has weak contribution

Inspect SKU COGS, selling price, vouchers, Ads and commission together before increasing spend.

Shop margin is positive but one SKU is negative

Do not let shop-level aggregation hide a product whose economics are consuming contribution.

Current cost increases

Apply the new cost from its valid effective point; do not silently rewrite prior periods unless the business deliberately restates history.

Bundle sales grow quickly

Confirm bundle cost mapping before treating the incremental revenue as profitable growth.

A SKU has no reliable cost

Exclude its contribution from decision-ready profitability or label it incomplete until the cost is restored.

COGS ratio moves sharply

Check product mix, effective cost changes, bundle mapping and unit conversions before attributing the movement to selling performance.

COGS checklist

Before using SKU contribution, verify the product-cost layer can be reproduced.

Use stable SKU and variation identifiers instead of relying only on product names.

Maintain direct product cost in a controlled source rather than hard-coding it inside report formulas.

Add effective dates so cost changes preserve historical reproducibility.

Declare the unit each cost refers to and normalize case, pack, item or component quantities explicitly.

Give every bundle a documented bundle-cost or component-decomposition rule.

Version bundle composition when the components can change over time.

Keep packaging and other variable selling costs separate when they are not part of the chosen COGS definition.

Treat missing cost, unknown SKU and overlapping cost periods as exceptions rather than zero values.

Calculate order-level COGS before rolling results up to SKU, campaign, channel or shop where the identifiers support it.

Review SKU contribution before scale decisions when product economics materially differ.

Preserve the source and rule that produced historical COGS so later audits can reproduce the number.

Commerce reporting

Need SKU cost, Orders and contribution to reconcile automatically?

D2 can structure the cost master, SKU mapping, bundle rules and exception layer so product profitability remains reproducible as the catalog and costs change.

Discuss commerce reporting

FAQ

COGS questions for marketplace commerce

How should COGS be calculated for TikTok Shop or Shopee?

For marketplace contribution analysis, calculate COGS from the quantity sold for each SKU multiplied by the valid unit cost that applies to that SKU and transaction period. Preserve the cost source and effective date so historical orders can be reproduced instead of being recalculated with today's cost.

Why does a SKU cost master need effective dates?

Product cost can change over time. Effective dates let the reporting model apply the cost that belonged to the historical transaction rather than overwriting prior periods whenever the current purchase or manufacturing cost changes.

How should bundles be handled in COGS?

Give the bundle a controlled bundle cost or decompose it into component SKUs using a documented rule. The mapping should be deterministic and versioned enough to reproduce historical orders; leaving bundle cost implicit can overstate contribution.

Are packaging, fulfillment, software and agency fees part of COGS?

Not automatically. This operating model treats COGS as direct product cost. Per-order packaging or fulfillment can be tracked as separate variable selling costs when they matter to the decision, while software, fixed labor or agency fees may sit outside COGS. The classification should remain explicit and consistent.

What should happen when an order contains an unknown SKU or missing cost?

Keep the affected order or SKU in an exception state. Do not silently treat missing cost as zero or replace it with a convenient shop average. Restore the SKU mapping, bundle rule or valid cost record before presenting the contribution as decision-ready.

Why is shop-average COGS risky for scale decisions?

A shop average can hide large differences between SKUs. Products with different product cost, selling price, vouchers, Ads and commission can contribute very differently even when total-shop margin looks acceptable. Scale decisions should use the lowest reliable SKU or bundle economics available.