Channel orders, cost per SKU and fees
Effective cost, allocation per item and nothing counted twice
Contribution margin by item, SKU and channel
Dashboard, AI agent and channel report
What it solves
- The margin of each SKU and each marketplace accounts for all variable costs, not just COGS.
- No cost goes in twice: commission, shipping, payment fees and media each appear once.
- It becomes clear how much the installment card fee and each channel's commission eat into margin.
Business questions it answers
Ask your agent these questions once the case is live.
What you need
- Marketplaces, own store and hub or ERP connected to Nekt
- Cost per SKU with an effective date (spreadsheet or ERP product record)
- The fees of each channel and of the card acquirer, per installment
What you get
- A table by order line item and day with revenue, each cost and the margin
- Margin dashboard by SKU, channel and period, with a ranking of the worst margins
- A cost coverage indicator, to know how much of revenue has reliable COGS
- An AI agent that answers questions about profit with each channel's rules
Where to activate
SKU, quantity, revenue, COGS, commission, shipping, media, taxes and margin in R$ and %, filterable by channel.
Answers questions about profit by product and channel with each marketplace's rules already applied.
SKU sold without a registered cost, and SKU with negative margin for the week.
Each channel has its own commission, shipping and date rules, and costs usually live in a spreadsheet. Start with one channel and one closed month. The detailed view has the business rules, the pitfalls and the acceptance test. Or send everything straight to your agent with the Nekt MCP.
Each channel delivers revenue and cost its own way: a unit commission in one, commission plus service fee in another, values in cents in a third, and the same shipment repeated under two statuses. Product cost lives in a spreadsheet that changes over time, and a SKU without a cost silently becomes zero cost. Whoever calculates on the order total and stacks everything on top ends up deducting the same fee twice or forgetting the installment card fee.
How it is usually done, and the rule
Each row is a mistake that already happened in practice.
The lowest reliable level is the order's line item (SKU). Allocate the order's shipping, coupon discount and service fee to the item (by item value or by quantity, with the criterion declared). Kits and bundles are exploded into their components, allocated by each component's value. Order, SKU, channel and month are sums of items.
Before deducting a component, check whether it is already inside another line. A per-order fulfillment fee that already includes payment processing does not get a card fee on top. Revenue already net of tax does not get tax deducted again. A marketplace's net payout already comes without commission.
Use the unit cost that applied on the order date, from a dated table per SKU. The current product record cost only serves as an estimate, flagged as such. For own production, the factory-to-store transfer cost goes in without the ICMS (state VAT) credit; for resale, invoice cost x (1 minus the supplier's ICMS rate). Packs multiply the quantity (x2, x3, x6) when the line represents the pack.
When the SKU is not in the cost table, COGS stays null and the item gets a coverage flag. Report coverage: the percentage of revenue with a known cost. Margin for an item without cost does not enter the best-margin ranking.
On Mercado Livre, sale_fee is per unit: multiply by quantity. On Shopee, commission is commission_fee plus service_fee, and the subtotal received is escrow_amount. On Magalu, values come in cents and are divided by 100. On Amazon, the same shipment appears as DEFERRED_RELEASED and as RELEASED with the same value: count it once per shipment.
On Mercado Livre, the seller's real shipping cost is in orders.payments[].shipping_cost, at the payment level, not in orders.shipping. Free shipping for the buyer is a seller cost. In your own store, use the real shipping cost or the effective rate by product and destination, never the shipping charged to the customer.
When customers mostly pay by card in installments, the acquirer fee varies with the number of installments (around 14% for 12 installments). Apply the installment fee of each sale. If the mix shifts from single payment to 12 installments, real margin falls even at the same price and the same COGS.
Fulfillment fees, shipping tables and commissions change over time. Store each rate by product, channel or country and effective period, and apply the one in effect on the order date. A lifetime average rate distorts both past and present.
Cancelled, failed, pending or draft orders are excluded entirely: no revenue, no cost, no count. A refunded order keeps zero revenue but retains COGS and shipping cost and counts as an order. An internal or test order zeroes everything. The margin reference date is the order confirmation date.
Media goes in by product and day, from the spend of the campaign tied to the product. In marketplace Ads, shared groups (catalog, family) attribute to a sibling item: a SKU with zero Ads may still have received media. Estimated tax is labeled as estimated. Contribution margin measures profitability; expected net and actual payout measure reconciliation and are not mixed.
Where each cost comes from, by channel
Normalize each channel before adding up.
Definitions
Pitfalls that already happened
SKUs missing from the cost table went in with zero COGS and showed up as the most profitable products in the operation.
Null cost with a flag, coverage indicator and an alert for SKUs sold without cost.
Amazon returns the same shipment as DEFERRED_RELEASED and RELEASED. Adding both doubled commission and shipping on the vast majority of shipments.
One row per shipment, from the most recent settlement.
Shipping read from orders.shipping on Mercado Livre was not the seller's cost, and margin per listing came out wrong until it was fixed.
Seller shipping in orders.payments[].shipping_cost.
A single fulfillment fee per product, averaged over the whole history, was off by 14% to 30% in the months before a rate revision.
Rates by effective period, applied by order date.
In one of the stores, the line quantity represented a pack of 2, 3 or 6 units. Without the multiplier, COGS was underestimated.
Multiplier table per pack SKU, per store; a new pack SKU with no row triggers an alert.
The average of each day's or SKU's percentage margins does not match the month's margin and overweights low-volume items.
Sum the components and divide once.
Acceptance test
The case is done when every item passes.
- For one marketplace and one closed month, total commission and fees match the marketplace's own sales or payout report (difference below 1%).
- The sum of contribution margin by SKU equals the sum by order and the channel total for the same period (zero difference).
- No sold item has zero cost without a flag, and the month's cost coverage is reported alongside the margin.
- On Amazon, each shipment appears only once in the costs table.
- The month's margin % is recomputed from the components and does not diverge from the item table.
Agent package
Paste into Claude, ChatGPT or any client with the Nekt MCP connected.
Contribution margin by order and SKU - Grain: one row per order line item, per day (order confirmation date). Order, SKU, channel and month are sums of items. - No financial value is added or deducted twice. If a line already contains commission, shipping, media, discount or fee, that component is not applied again. - COGS = unit cost effective on the order date x quantity x pack multiplier. A SKU without cost has null COGS and a coverage flag; never zero. - Mercado Livre: commission = sale_fee x quantity; seller shipping = orders.payments[].shipping_cost. - Shopee: commission = commission_fee + service_fee; received = escrow_amount. - Magalu: values / 100. - Amazon: a shipment counts once (do not add DEFERRED_RELEASED to RELEASED). - Acquirer fee applied by each sale's number of installments. - Cancelled, failed and pending orders are excluded. Refunded: zero revenue, costs retained, order counted. Internal or test: everything zero. - Margin % = sum of margin / sum of revenue. Never an average of percentages. - Estimated tax is always reported as estimated. - Contribution margin measures profitability. Expected net and actual payout measure reconciliation. Do not treat them as equivalent. - Transfers between companies in the same group are not revenue. Client exceptions: - <client>: own production COGS = transfer price x <factor> (without ICMS credit). - <client>: per-order fulfillment fee already includes the payment fee; do not add a card fee. - <client>: pack SKUs <list> with multiplier <n>.
Build the "Contribution margin by order and SKU" case in my Nekt workspace following the rules at https://academy.nekt.com/en/industrias/varejo/margem-contribuicao-pedido-sku.md. 1) Find the source tables and confirm the columns the rules use. 2) Create a transformation at the stated grain applying every rule. 3) Run the acceptance test and show me the result of each item. 4) Create the case's context document in the workspace, leaving my clients' exceptions open for me to fill in.
Variations
The same order in the marketplace, the hub and the ERP: reconcile by pack_id and store order number, with a confidence level.
No marketplace: COGS, acquirer fee per installment and single-payment vs. installment mix by store.
Revenue excluding VAT or sales tax by country, fulfillment rate by product and country, and Break CPA by product.