Amazon Purchase Cost Overview
Shows the active purchase cost on every Amazon Product Strategy alongside what each alternative cost source would set it to — and lets you re-point or override the cost source in bulk.
Purpose
- Stock / Purchase / Sales managers auditing and correcting the purchase cost that drives Amazon min/max pricing.
- Answers: what cost is each strategy using right now, and how does it compare to the Supplier, PO, and FBA-transfer alternatives?
- Acts as a control surface: stage per-row overrides or bulk-update the cost source for selected strategies.
- Highlights where the live value drifts from the auto-source preview.
How to Access
Desk > Reports > Amazon Purchase Cost Overview, or /app/query-report/Amazon Purchase Cost Overview.
Report type: Script Report. Reference DocType: Amazon Product Strategy.
Filters
| Filter | Type | Required | Description |
|---|---|---|---|
| Strategy | Select | No | fba / sfp / backorder / default. Matches the strategy's strategy_name. |
| Current Source | Select | No | Manual / Supplier-Sync / PO-Sync / FBA-Transfer / Auto-Sync / Amazon-Sync. Matches the active cost row's source. |
| Proxy SKU | Link → Proxy SKU | No | Restrict to one Proxy SKU. |
| Item | Link → Item | No | Restrict to one Item. |
| Item Group | Link → Item Group | No | Restrict by the Item's group. |
| Source Type | Select | No | All (default) / Manual (only manual rows) / Auto (everything except Manual). Applied in Python after the query. |
Columns
| Column | Type | Description |
|---|---|---|
| Proxy SKU | Link → Proxy SKU | The Proxy SKU behind the strategy. |
| Item | Link → Item | The Item. |
| Strategy | Link → Amazon Product Strategy | The strategy document name. |
| Strategy Name | Data | fba / sfp / backorder / default. |
| Current Source | Data | source of the active (rank 1) purchase-cost row. |
| Current Value | Currency | value of that active purchase-cost row. |
| Supplier-Sync | Currency | Preview: effective supplier purchase cost for this item+UOM (bundle/pack-aware). |
| PO-Sync | Currency | Preview: effective cost from the latest submitted Purchase Order rate (bundle/pack-aware). |
| FBA-Transfer | Currency | Preview: last_transfer_rate × conversion_factor, only for FBA Proxy SKUs; blank otherwise. |
| Last Updated | Datetime | modified timestamp of the active cost row. |
How It Works
The base query joins Amazon Product Cost → Amazon Product Strategy → Proxy SKU → Item, keeping only the active purchase-cost row: parenttype = "Amazon Product Strategy", rank = 1, and cost_type in the set of Cost Types flagged is_purchase_cost = 1. If no purchase Cost Type exists, the report is empty.
flowchart LR CT[Cost Type<br/>is_purchase_cost=1] --> Q Q[Amazon Product Cost<br/>rank=1, purchase cost] --> J[join Strategy + Proxy SKU + Item] J --> R[rows: current source + value] R --> S[Supplier-Sync preview<br/>get_effective_supplier_purchase_costs] R --> P[PO-Sync preview<br/>get_effective_po_purchase_costs] R --> F[FBA-Transfer preview<br/>last_transfer_rate × conversion_factor] S & P & F --> OUT[report rows] OUT --> BTN[Bulk Update Source / Save Overrides] BTN --> API[bulk_update_purchase_cost_source]
- Supplier-Sync / PO-Sync previews come from
get_effective_supplier_purchase_costs/get_effective_po_purchase_costs, keyed by(item, uom). "Effective" means bundles are costed from components and packs are scaled by the UOM conversion factor. - FBA-Transfer preview is only computed when the Proxy SKU
is_fbaand has an item+uom:last_transfer_rate × get_conversion_factor(item, uom). - Source Type post-filter:
Manualkeeps rows whosecurrent_source == "Manual";Autokeeps everything else.
Bulk update / overrides
Two toolbar actions call the whitelisted bulk_update_purchase_cost_source:
- Bulk Update Source — apply one source to all checked rows.
- Save Overrides — commit per-row staged edits (pencil icon on each value cell).
Server-side guard rails: source must be one of ALLOWED_BULK_SOURCES = {Manual, Supplier-Sync, PO-Sync, FBA-Transfer}; Manual requires a value; a row with no active rank-1 purchase cost row is skipped; FBA-Transfer can only be set on FBA strategies (enforced in the dialog). The call returns {updated, skipped} and skipped rows are listed with their reason.
Conditional formatting (from the report JS)
- Current Source —
Manualshown in amber (#b54708), any other (auto) source in green (#067647); a staged change shows the new source in amber with a(staged)tag. - Current Value — staged manual edits render amber/bold; staged auto edits show
(auto). - Supplier-Sync / PO-Sync / FBA-Transfer previews — when a preview differs from the current value by more than
0.0001, the cell is shown in amber (#b54708) to flag drift.
Notes
- A purchase Cost Type (
is_purchase_cost = 1) must exist or the report returns nothing. - Preview columns are read-only suggestions; nothing changes until you stage/commit an override.
- This cost is the same
Purchase Costshown — and floor-checked — in Amazon Pricing Push Readiness.