Skip to content

Costs: nova_share.costs and nova_share.cost_dictionary ​

Every Amazon cost line that is not a column of an order line, as Amazon settled it: one row per settlement line. cost_dictionary classifies every cost key.

At a glance ​

One rowone settlement line, fact_id
Holdsevery settlement line that is not a column of orders: the lines on the account, a marketplace, an FBA shipment, a removal order, a coupon or deal; the lines Amazon posts on a SKU and Nova books on the posted day, with or without an order id (the FBA reimbursements, their clawbacks and reversals, the fees Amazon posts on a refund, the HRRN return fee, liquidations, removals, inbound defects); the FBM postage Amazon posts with the order id and no product (mfn_postage_fee, mfn_shipping_chargeback); and the fee lines of an order line orders cannot hold: a multi-channel fulfilment order (S01-…), or no SKU on an order that holds no line of the ASIN
Not herethe fees of the sale Nova books on the order's purchase day (referral, FBA fulfilment, closing fees) and the refunds and sales deductions: the fee and refund columns of orders, on the order's SKU and purchase day in product_metrics. A cost key is in one of the two tables: which table holds a key
History2023-12
Refreshhourly. A line appears once, when Amazon releases it
Signfees negative, reimbursements positive, like the P&L
Ties toper cost_key and posted month, the key's column summed over pnl equals its column in orders plus SUM(amount) here on the rows with in_pnl = 1. The rows with in_pnl = 0 are lines the P&L does not book
Sync keyfact_id; pull by posted_day (60 days) or by ingested_at

Which table holds a key ​

Amazon's cost lines are in two tables. A cost key is in one of them, by the day Nova books it on.

KeysTableRule
the fees of the sale, booked on the order's purchase day: referral, FBA fulfilment, closing fees, the per-order reimbursements (native_level = order_item, but the three keys below)orders, one column per keythe order line is the grain of the key
the refunds and sales deductions (cost_level = deduction)orders, the refund blockthe same
every other key: the account, marketplace, shipment and promotion lines; the lines Amazon posts on a SKU and Nova books on the posted day (the reimbursements, their clawbacks and reversals, the fees of a refund such as refund_commission and refund_variable_closing_fee, fba_customer_return_feeHRRN); the FBM postage Amazon posts with the order id and no product (mfn_postage_fee, mfn_shipping_chargeback), placed on the lines of its order; and amazon_points_fee, get_paid_faster_fee, technology_feecosts, one row per linethe posted day is the clock of the key. The order id, when Amazon attaches one, is a label on the row

A line of an orders key that no order line holds is a row of costs, with native_level = 'order_item'. Two cases:

  • A line without its product: no ASIN, or the ASIN and no SKU on an order that holds no line of that ASIN. The P&L books it on the account line. in_pnl reads 1.
  • A line on a multi-channel fulfilment order (S01-…, S02-…, order_kind = 'poa'), which the order report does not hold. The P&L does not book it. in_pnl reads 0.

One line without a SKU stays in orders: a fee Amazon posts with the order id and the ASIN, on an order that holds one SKU of that ASIN. The order line carries it, and the P&L books it.

The FBM postage (mfn_postage_fee, and mfn_shipping_chargeback in Brazil and Mexico) is a row of costs with in_pnl = 1: Amazon posts it with the order id and no product, and the P&L places it on the lines of the order by units, or on the account line when your history holds no line of the order. The two columns of orders stay, always 0, for the queries that name them.

One line is in neither table: a fee posted on an order purchased more than 24 months ago, outside the window of orders.

How Nova classifies a cost ​

Three labels sit on every cost key, in cost_dictionary and on every row of costs. A fourth says how the line reaches a product row.

LabelColumnQuestion it answers
Blockfee_groupWhat is it? One of ten P&L blocks
Categorycost_levelWhat triggers it: a sale, holding stock, a decision, the account?
Originnative_levelOn what did Amazon post the line?
Placementallocation_method_targetHow does the line reach a product row?

The ten blocks: fee_group ​

In product_metrics, account_metrics and pnl, each block is a column of the same name. The ten blocks plus other_amazon_fees sum to amazon_fees.

fee_groupWhat is in itKeys, for example
fee_fba_fulfillmentpick, pack and ship; customer returns; weight-based feesfba_fulfillment_fee, fba_weight_based_fee, fba_customer_return_fee
fee_referral_closingreferral (commission), closing fees, premium experience, technology fee, and their refundscommission_fee (column referral_fee), fixed_closing_fee, variable_closing_fee
fee_fba_storagemonthly and long-term storage, AWD storage, reservation, per-SKU storage billingfba_storage_fee, fba_long_term_storage_fee, awd_storage_fee_base, fba_storage_billing
fee_fba_inbound_prepplacement, inbound transportation, freight and duties, prep, labeling, AWD processing, transportation and export declarationsfba_inbound_placement_fee, fba_inbound_transportation_fee, fba_labeling_fee, awd_processing_fee, awd_export_declaration_fee
fee_reimbursementswhat Amazon pays you back for lost or damaged units and fee errors, and what it claws backfba_reimbursement_warehouse_lost, fba_reimbursement_incorrect_fees_items, fba_reimbursement_reversal
fee_removal_disposalremovals, disposals, grade and resellfba_removal_fee, fba_disposal_fee, fba_grade_and_resell_fee
fee_mfn_shippingyour own shipping (FBM): postage, labels, surcharges, shipping chargebacks and their refundsmfn_shipping_postage, mfn_postage_fee, shipping_hb
fee_regulatory_taxdigital services tax, EPR, VAT on Amazon's services, marketplace facilitator, payment methoddigital_services_fee, epr_chargeback_eco_fee, vat_partner_fee, mpf_regulatory_fee
fee_subscription_accountsubscription, paid services, Amazon for All, cash on delivery, account adjustments, the Order Adjustments Amazon does not namesubscription_fee, paid_services_fee, amazon_for_all_fee, misc_order_adjustment
fee_coupon_deal_adscoupons, deals, Vine, Amazon Pointscoupon_redemption_fee, deal_participation_fee, vine_enrollment_fee

The cost categories: cost_level ​

The same P&L read by category. Every cost between net_sales and net_profit is in exactly one category, signed like the fees: negative a cost, positive a credit. On every row of pnl:

net_profit = net_sales + variable_costs + product_costs + one_off_costs + account_costs + advertising_costs

cost_levelTriggerP&L columnWhat is in it
variablea unit sold or returned. No sale, no costvariable_costsreferral, closing and FBA fulfilment fees, refund costs, FBM shipping, and the cost of goods sold
productkeeping the product in stock and replenished. Recurs without a decisionproduct_costsstorage, long-term storage, inbound transportation and placement, prep
one_offa decision or a correction on the productone_off_costsremovals, disposals, deals, coupons, Vine, inventory reimbursements and clawbacks, inbound defects, and the cost of the units lost, damaged or destroyed. Often positive
accountbilled to the account for a period, whatever the productsaccount_costs, on account_metrics and pnlsubscription, paid services, EPR, VAT on Amazon's services
deductionnot a cost: a refund or a chargeback, above net salessales_deductionsrefund_price_principal, shipping_chargeback
other_salesnot a cost: a sale booked with the cost linesother_salesliquidation_price_principal

Advertising is the last term: advertising_costs = −(ppc_spend + dsp_spend + sponsored_actions_spend). sponsored_actions_spend is on the account line only. Advertising is not a key of cost_dictionary.

A key keeps its category wherever its money lands: a storage lump no report could place is a product cost on the account row. A cost sits where its counterpart sits: the reimbursement of a lost unit and the cost of that unit are both one-offs. The cost of liquidated units stays variable, because its proceeds are sales.

Profit without one-offs = net_profit − one_off_costs: compare products week over week on their recurring economics. One-offs are often a net credit, so it reads a little lower than net_profit.

Where Amazon posts the line: native_level ​

native_levelPosted onIn costs?Keys, for example
order_iteman order line, with its SKUthree fees Amazon bills per order line that Nova carries as cost lines (amazon_points_fee, get_paid_faster_fee, technology_fee), and the fee lines no order line holds: a multi-channel fulfilment order, a line without a SKU that no order line carriescommission_fee, fba_fulfillment_fee
orderan order id, no SKUyesmfn_shipping_postage, fba_disposal_fee, adjustment_fba_fulfillment_fee
skua SKU, with or without an order idyes: the FBA reimbursements, clawbacks and reversals, the fees Amazon posts on a refund (refund_commission, refund_*_fee, a_to_z_refund_*_fee, chargeback_refund_*), the HRRN return fee, liquidations, removals, grade and resell, inbound defects, CSBA, Amazon for All, MPF, account adjustments. Not the refunds themselves (refund_price_principal, refund_shipping_*, the deductions): columns of ordersfba_reimbursement_warehouse_lost, refund_commission, removal_fee
inbound_shipmentan FBA shipment; order_id is the shipment idyesfba_inbound_placement_fee, fba_inbound_transportation_fee
removal_ordera removal orderyesfba_removal_fee
promotiona coupon or a dealyescoupon_redemption_fee, deal_participation_fee
marketplacethe marketplace, no objectyesfba_storage_fee, fba_labeling_fee, epr_chargeback_eco_fee, vine_enrollment_fee
accountthe account, no marketplaceyessubscription_fee, paid_services_fee, vat_partner_fee

How a line reaches a product row: allocation_method_target ​

ValueRuleWhere the money shows
directthe line names the SKU, or the order lineon that SKU's row in product_metrics, on the posted day
attachthe line names an object that knows its SKUs: an FBA shipment, a removal order, a coupon or deal, an orderon the object's SKUs. What the object cannot place stays on the account line
drivera report splits the line over SKUs: the storage and long-term storage reports, the removal report, the liquidation map, the Vine unitson the report's SKUs. The remainder stays on the account line
nativethe line names no product: subscription, paid services, EPR, AWD, dealsthe account line, account_metrics

Nothing is spread over the day's sales. A line lands whole or stays whole, so a product's margin is what Amazon charged on it. For every key whose table is costs, the sum over pnl equals the sum over the rows of costs with in_pnl = 1. When neither the object nor a report places a line and Amazon publishes its own per-SKU split of the fee, Nova uses that split (fallback = sku_economics).

allocation_method is the method before 2026-09-29

It reads prorata on the keys that were then spread over the day's sales. Read allocation_method_target for today's rule.

The cost dictionary ​

nova_share.cost_dictionary: one row per cost key, the same rows for every client. No org_key, no seller_partner_id. A key is never removed.

ColumnMeaning
cost_keyNova's cost key. Joins costs.cost_key; the fee columns of orders carry these names
export_namethe column of product_metrics that carries the key. Same as cost_key except on commission_fee (referral_fee), fba_customer_return_feeHRRN (fba_customer_return_fee_hrrn) and service_FBAPick&PackFee (service_fba_pick_pack_fee)
fee_groupthe P&L block, one of the ten above
cost_levelthe category: variable, product, one_off, account; deduction and other_sales for the keys above net sales
native_levelwhere Amazon posts the line, one of the eight above
allocation_method_targethow the line reaches a product row: direct, attach, driver, native
allocation_methodthe method before 2026-09-29: direct, driver, prorata
allocation_driverthe report behind a driver key: storage_report, ltsf_report, removal_report, liquidation_map, vine_units. NULL otherwise
behaviourwhat makes the amount move: pct_of_price, per_unit, per_order, per_unit_month, fixed_period, irregular
spreadmarketplaces_month on a period fee billed on one marketplace but covering the account: spread across the account's marketplaces by the month's sales. NULL otherwise
fallbacksku_economics on the keys Nova places with Amazon's own per-SKU split when neither the object nor a report can. NULL otherwise
is_adjustment_child1 on a _reversal, _correction or programme line of another key. Shown in the detail, counted inside the parent's net figure in every total
parent_keythe key an adjustment child belongs to. NULL otherwise

Join it on cost_key to label a line of costs, on export_name to label a column of product_metrics.

Columns of costs ​

GroupColumns
Accountseller_partner_id, seller_name, marketplace_id, marketplace_name, stock_region, org_key
The linefact_id (unique, stable across refreshes), cost_key, fee_group, cost_level, native_level, allocation_method
What it is attached toorder_kind, order_id, order_matched, child_asin, sku (filled on the sku lines, rarely elsewhere)
Whenposted_day (the marketplace-local accounting day), posted_at_utc, purchase_day (the ledger's sales lines; NULL on the sku lines: join orders on order_id and sku for the order's day)
Settlementsettlement_id, finance_api_key, transaction_type, transaction_status (RELEASED or DEFERRED)
Moneyquantity, amount + currency (your organization's primary currency), original_amount + original_currency (Amazon's own figure)
Row clockingested_at: when Nova read the line from Amazon, UTC
In the P&Lin_pnl: 1 when the P&L books the line, 0 when it does not. Never NULL. The last column

order_id is not always an order ​

order_kindorder_id holds
salesan Amazon order id (123-1234567-1234567)
inboundan FBA shipment id (FBA15…): joins inbound_shipments.shipment_id
awdan AWD replenishment or shipment id (repl-…, STAR-…)
removala removal order id
promotiona coupon or deal id
liquidationa liquidation reference
poaa multi-channel fulfilment order id (S01-…, S02-…): an order the order report does not hold
nonenothing: a true account-level line, or a line posted on a SKU alone
unknownan id Nova cannot classify

order_matched = 1 when Nova also holds the object behind the id; 0 when the kind was read from the id's shape only. On the sku lines Nova reads the shape only: order_matched = 0 and purchase_day is NULL.

Lines the P&L does not book: in_pnl ​

costs holds every line Amazon settled. The P&L does not book every one of them. in_pnl says which: 1 when the line's money is in pnl and in the app, 0 when it is in neither.

Per cost_key and month: the key's column over pnl = its column in orders + SUM(amount) over the rows of costs with in_pnl = 1.

in_pnlThe lineWhy
1a line on the account, a marketplace, an FBA shipment, a removal order, a coupon or dealthe P&L places it on a product row or on the account line
1a line Nova books on the posted day, on an ASIN with its SKU or with a SKU your catalogue holds for it: a reimbursement, a fee of a refund, the HRRN return feethe P&L books it on that SKU
1the FBM postage Amazon posts with the order id and no product: mfn_postage_fee, mfn_shipping_chargebackthe P&L places it on the lines of the order by units, or on the account line when your history holds no line of the order
1a line that names no product Nova can book it on: a fee of the sale without an ASIN, or with the ASIN and no SKU on an order that holds no line of that ASIN; a line booked on the posted day without an ASIN, or without a SKU on an ASIN your catalogue does not holdthe P&L books it on the account line of its marketplace, on the day Amazon posted it
0a fee of a multi-channel fulfilment order: order_kind = 'poa'the order is a sale made off Amazon that Amazon ships from your FBA stock. The P&L books a fee of the sale on its order line. The order report holds no line for this order, and its revenue is not in Nova

A line that names no product reads 0 until the next hourly build books it: one hour at most.

The P&L in Nova is the P&L of your Amazon sales. To add the fulfilment cost of your off-Amazon orders, sum the rows with order_kind = 'poa'.

Read the column, do not derive it

A row moves from 0 to 1 when Nova starts to book its kind of line. Filter on in_pnl, not on order_kind or sku: your query keeps tying to pnl.

sql
-- What Amazon settled in October that your P&L does not book, by key
SELECT cost_key, order_kind, count() AS lines, round(sum(amount), 2) AS amount
FROM costs
WHERE in_pnl = 0
  AND posted_day BETWEEN '2026-10-01' AND '2026-10-31'
GROUP BY cost_key, order_kind
ORDER BY amount;

Read it ​

sql
-- A month of cost lines, by block and category
SELECT fee_group, cost_level, round(sum(amount), 2) AS amount
FROM costs
WHERE posted_day BETWEEN '2026-10-01' AND '2026-10-31'
GROUP BY fee_group, cost_level
ORDER BY amount;

-- One key, month by month: the lines the P&L books equal SUM(fba_storage_fee) over pnl
SELECT toStartOfMonth(posted_day) AS month, round(sum(amount), 2) AS storage
FROM costs
WHERE cost_key = 'fba_storage_fee'
  AND in_pnl = 1
GROUP BY month
ORDER BY month;

-- The fees Amazon posted on refunds in October, next to the refunded order's purchase day
SELECT c.order_id, c.sku, c.cost_key, c.posted_day, o.purchase_day, round(c.amount, 2) AS amount
FROM costs AS c
LEFT JOIN orders AS o
    ON o.seller_partner_id = c.seller_partner_id AND o.order_id = c.order_id
   AND o.child_asin = c.child_asin AND o.sku = c.sku
WHERE c.cost_key IN ('refund_commission', 'refund_commission_refund', 'refund_variable_closing_fee')
  AND c.posted_day BETWEEN '2026-10-01' AND '2026-10-31'
ORDER BY c.posted_day;

Inbound fees per FBA shipment ​

The inbound fees Amazon bills per shipment carry the shipment id in order_id (order_kind = 'inbound'): fba_inbound_placement_fee, fba_inbound_transportation_fee, fba_inbound_transportation_program_fee, fba_post_inbound_transportation_fee, fba_inbound_defect_fee, the global freight and duty keys, and their reversals. A shipment can carry several lines of one key (a charge and its reversal, a re-bill): sum per shipment. Prep and labeling fees (fba_labeling_fee, fba_warehouse_prep_fee) carry no shipment id (order_kind = 'none'). A shipment older than 18 months, or cancelled, has no row in inbound_shipments; its fees are still here.

sql
-- Placement and transportation per FBA shipment, next to what was shipped and received
SELECT f.shipment_id, s.shipment_status, s.units_shipped, s.units_received,
       f.placement_fee, f.transportation_fee, f.all_inbound_fees, f.currency
FROM (
    SELECT seller_partner_id, order_id AS shipment_id,
           sum(if(cost_key LIKE 'fba_inbound_placement_fee%', amount, 0))      AS placement_fee,
           sum(if(cost_key LIKE 'fba_inbound_transportation_fee%', amount, 0)) AS transportation_fee,
           sum(amount)                                                         AS all_inbound_fees,
           any(currency)                                                       AS currency
    FROM costs
    WHERE order_kind = 'inbound'
    GROUP BY seller_partner_id, order_id
) AS f
LEFT JOIN (
    -- one row per shipment: the shipment totals repeat on every SKU line
    SELECT seller_partner_id, shipment_id,
           any(shipment_status)            AS shipment_status,
           max(shipment_quantity_shipped)  AS units_shipped,
           max(shipment_quantity_received) AS units_received
    FROM inbound_shipments
    GROUP BY seller_partner_id, shipment_id
) AS s ON s.seller_partner_id = f.seller_partner_id AND s.shipment_id = f.shipment_id
ORDER BY f.all_inbound_fees;

Sync ​

  • A line appears once, when Amazon releases it. Pull by posted_day (the last 60 days at each run) or by ingested_at for the new lines.
  • Upsert on fact_id.
  • cost_dictionary: replace your copy at each pull; a key is never removed.