Skip to main content

Order-level cost allocation across seven platforms: the field mapping that makes it possible

Seamline Editorial · Finance content team · Updated

The order adds up. The SKU does not. A single order can tie to the cent at header level and still carry the wrong margin on every line, because totals live on the header and costs live on the SKU, with no rule connecting the two. The fix is not a cleaner report. It is a field map: name one line-item model, decide where each platform’s product price, discount and tax land, and choose one allocation key for every header-level amount. Bundles stay one row until you split them by cost × quantity. This article documents that map from an internal OMS rules document, anonymized.

The order ties out. The SKU margin does not.

The order adds up. The SKU does not. Header revenue can match a settlement exactly while the margin on every line is still wrong.

The reason is structural. A platform sends one set of numbers for the order and another for the lines. Discounts, shipping, tax, tips and subsidies often live only on the header. Your cost lives on the SKU. Without a rule that moves header amounts onto lines, the two never meet.

Teams usually notice this as a margin that drifts with order shape. Single-item orders look fine. Bundles and multi-line orders look wrong. The order total is unchanged, so the report is trusted and the SKU decision is not.

The answer is a field map, not a cleanup project. Decide once where each platform’s product price, discount and tax land, and how each header amount is allocated. The same order then produces the same SKU cost every time it is loaded.

A perfectly reconciled order total is not evidence that SKU costs are right. The header can be exact while every line margin is off.

One line-item model, eight income buckets

The document resolves every platform line into the same buckets. Three describe the product and tax: product_price, product_discount and tax_income. Five more capture the rest of what the customer paid: shipping_in_price, platform_discount, tip_fee, insurance_price and other_in_price.

The pre-discount product total is the canonical figure, labeled product_price_no_discount. On the stored line, the post-discount amount sits in product_price and the discount sits in product_discount. The detail view then adds them back together as product_price + product_discount. That split is deliberate: the discount stays visible as its own number instead of being buried inside a net figure.

Two allocation keys do most of the work. Header amounts are allocated by each line’s share of product_price. Shipping insurance is the exception: the document allocates it by product_cost. Shipping income is pushed to the lines at order creation. Subsidies, tips and adjustments are allocated later, when the detail view is built.

A documented zero is a real value. When the rule writes a fixed 0 for a bucket, that means the platform settlement does not expose the amount in a form the model relies on. An empty cell in your own model is different: it usually means nobody decided. The difference matters at audit time.

How do seven platforms map product price, discount and tax?

This is the core of the model. The table reads as three questions for each platform: where does product_price come from, where does discount come from, and how is tax treated. Read the cells as rules, not as estimates.

Where the document says “same as above” or does not list a field, the row says so. No platform field has been added from assumption. If a platform maps only part of a bucket, the table shows that partial mapping rather than a tidy full one.

Platform × field mapping: product price, discount and tax (seven platforms)
Platformproduct_price (pre-discount total)discount (product_discount)tax (tax_income)
AmazonItemPrice − PromotionDiscount; in EU/Middle East also less ItemTax. Detail view = product_price + product_discount.PromotionDiscount.Line tax = product tax + shipping tax + duty. US/EU/CA/MX: tax_income = 0 in financial reporting, line tax in management reporting; other sites: line tax.
ShopifyoriginalTotal − line-level discount allocation. Detail view = product_price + product_discount.Sum of discountAllocations.Line tax, aggregated the same way. tax_income = line tax; independent-site expense tax recorded as 0.
Shoplazzaline_items.total − line-level product discount; shipping-insurance and insurance SKU lines priced at 0. Detail view = product_price + product_discount.discount_applications where target_type = line_item.Same as Shopify: tax_income = line tax.
ShoplineUnit price × quantity − line discount allocation. Detail view = product_price + product_discount.discount_allocations.Same as Shopify: tax_income = line tax.
AliExpressUnit price × quantity written directly, already pre-discount. Store coupon promotion_fee split by each line’s share of product total. Detail view = product_price + product_discount.promotion_fee, allocated to product_discount by each line’s share of product total.Order tax from include_tax_fee; after allocation to lines, tax_income = line tax.
TikToksale_price taken directly, with no discount subtracted. Detail view = sale_price.Fixed 0 on the line. Order-level promotion stays on the header and is not split to lines.Order tax from product and shipping tax under payment; after allocation to lines, tax_income = line tax.
Temu / Walmart / 1688Not parsed; depends on import or manual entry. If line data exists, product_price + product_discount.Not separately implemented.Profit branch fixed at tax_income = 0.
Field names and rules from an internal OMS order-detail SKU allocation document, anonymized. “Fixed 0” and “not parsed” are the documented states, not omissions. No platform field has been inferred.

A bundle stays one row until you split it by cost × quantity

A bundle is sold as one order item but consumed as several SKUs. The document keeps it under a single order_item_id, then splits it to child SKUs within that id in proportion to cost × quantity.

Why cost × quantity rather than revenue share? Because the split is assigning cost, not sales. Revenue is what the customer paid for the bundle; cost is what the components used. A two-unit bundle with one expensive component and one cheap one does not split 50/50. It splits by what each child SKU actually consumed.

The same instruction appears for the other platforms as “same as above, split by cost”. Where the document uses that shorthand, it means the same order_item_id rule, not a second method. Treating the shorthand as a looser rule is how two platforms end up with different margins for the same bundle.

Do the split before any margin is computed. If the bundle is booked as one SKU and split later inside a report, the discount, tax and shipping allocations have already been attached to the wrong line. Fixing the split after allocation does not fix the allocation.

Splitting a bundle by revenue share instead of cost × quantity makes margins look plausible and still assigns cost to the wrong SKU.

Which platforms actually populate the other income buckets?

The five remaining buckets are where a model either stays honest or starts inventing numbers. Shipping income is summed on the header and pushed to lines at order creation. Amazon sums ShippingPrice − ShippingDiscount, with shipping tax removed in Europe and the Middle East; Shoplazza uses total_shipping plus the shipping SKU less the shipping discount; TikTok takes payment.shipping_fee. Every parsed platform then allocates by product_price share.

Platform subsidy is a narrower field. The document writes a fixed 0 for Amazon, Shopify, Shoplazza and Shopline. Only AliExpress and TikTok expose a source: storeDirectDiscount.amount, and platform_discount plus payment_platform_discount respectively. Both are allocated at detail time by product_price share.

Tips appear on the Shopify family only: totalTipReceivedSet, total_tip_received and total_tip_received_set. Shipping insurance also appears there, and it is the one bucket allocated by product_cost rather than product_price. Other income is documented in a single place: adjust_fee.amount on AliExpress.

Read a fixed zero as a decision, not as laziness. It means the settlement does not expose that bucket in a form the model trusts, so the rule writes zero rather than guessing which line should carry it. A blank cell in your own sheet usually means no one made that decision at all.

Platform × field mapping: the five secondary income buckets (seven platforms)
PlatformShipping incomePlatform subsidyTipShipping insuranceOther income
AmazonSum of ShippingPrice − ShippingDiscount (EU/Middle East less shipping tax); by product_price shareFixed 0Fixed 0Fixed 0Fixed 0
ShopifyDiscounted logistics line + shipping SKU; by product_price shareFixed 0totalTipReceivedSet; by product_priceShipping-insurance SKU total; by product_costFixed 0
Shoplazzatotal_shipping + shipping SKU − shipping discount; by product_price shareFixed 0total_tip_received; by product_priceadditional_total + shipping-insurance SKU; by product_costFixed 0
Shoplineshipping_lines total + shipping SKU; by product_price shareFixed 0total_tip_received_set; by product_priceShipping-insurance SKU amount; by product_costFixed 0
AliExpressOrder total − discounted goods amount; by product_price sharestoreDirectDiscount.amount; by product_priceFixed 0Fixed 0adjust_fee.amount; by product_price
TikTokpayment.shipping_fee; by product_price shareplatform_discount + payment_platform_discount; by product_priceFixed 0Fixed 0Fixed 0
Temu / Walmart / 1688Not parsed; if header data exists, by product_price shareNot implemented, usually 0Fixed 0 / not implementedFixed 0 / not implementedFixed 0 / not implemented
Same internal OMS document, anonymized. “Fixed 0” means the rule writes zero; it is not a missing field. Shipping insurance is the only bucket allocated by product_cost.

What to check before you trust a SKU margin

The mapping is only useful if it survives a spot check. Pick one order with a bundle, a discount and tax, then walk the line by hand. The five checks below are the ones the document makes possible; none of them require a new data source.

Two boundaries are worth naming. First, this map allocates amounts the platforms actually report; it does not compute marketplace fees. Amazon publishes referral fees by category on its pricing page (checked 2026-11-21), and those fees are a separate cost layer from product price, discount and tax. Second, this map says nothing about order state. Shopify separates order status from payment status. Paid, Authorized and Pending are payment states, not fulfillment states (checked 2026-11-21). A line can be allocated correctly on an order that is still unpaid.

The tax rule here is a data rule, not tax advice. The Amazon US/EU/CA/MX branch decides which field a tax amount is written into for reporting; it does not decide what tax is owed. Educational content only.

Seamline’s role is the detection layer: tracing each allocated amount back to the header field it came from, so a SKU margin can be challenged with evidence instead of defended with a total. The boundary is deliberate: this is reconciliation and detection, not filing.

  • Reconstruct the gross: product_price + product_discount must equal the platform pre-discount total.
  • Confirm the allocation key: product_price for most income, product_cost only for shipping insurance.
  • Confirm the stage: shipping at order creation; subsidy, tip, insurance and adjustments at detail time.
  • Check the tax branch: financial reporting and management reporting can differ on the same Amazon order.
  • Treat “not parsed” platforms as manual input, not as zero revenue.

Open any line and add product_price + product_discount + allocated shipping + allocated tax. If the sum cannot be traced to a named header field, the allocation is a guess.

FAQ

What does product_price mean in this model?

It is the post-discount product amount stored on the order line. The pre-discount total is rebuilt as product_price + product_discount. Keeping the discount in its own column is what makes the gross visible and auditable.

How are bundle products split across child SKUs?

Within the same order_item_id, the document splits the bundle in proportion to cost × quantity. The other platforms are described as “same as above, by cost”. The split assigns cost, so a revenue share is the wrong key.

Why is platform_discount zero on some platforms?

Because the internal document writes a fixed 0 for Amazon, Shopify, Shoplazza and Shopline. Only AliExpress and TikTok have a documented source field. Zero is the rule, not a gap. Do not fill the cell from assumption.

When should tax_income be zero?

For Amazon, US/EU/CA/MX sites record tax_income = 0 in financial reporting while management reporting uses line tax; other sites use line tax. Temu/Walmart/1688 fix it at 0. This is a field rule, not tax advice; educational content only.

Trace every allocated cent back to its header

The demo shows how Seamline follows discounts, shipping and tax from platform headers down to the SKU line, so a margin can be checked against the field it came from.

Open the demo