← back to Dw Five Field Step0
config-snapshots/price-finder-cost-map.json
51 lines
{
"_doc": "Per-vendor cost resolution for the price-finder. basis='cost' => cost_expr already yields OUR net cost. basis='retail' => cost_expr is vendor MSRP, net cost = value*(1-discount). Discount is read live from vendor_registry.vendor_discount_pct. NEVER guess a cost column \u2014 verify by inspection before adding.",
"vendors": {
"Romo": {
"table": "romo_catalog",
"cost_expr": "GREATEST(COALESCE(NULLIF(total_price_per_roll,0),0), COALESCE(NULLIF(trade_price_per_roll,0),0)*(1+COALESCE(tariff_pct,0)/100), COALESCE(cost,0)*1.10)",
"basis": "cost",
"verified": "2026-06-11",
"note": "DTD-B 2026-06-11: landed cost = trade_price_per_roll*(1+tariff). 2026-06-11 fix: GREATEST guards 57 corrupt total_price_per_roll rows (were ~10x low). Designer-Net (no discount)."
},
"Thibaut": {
"table": "thibaut_catalog",
"cost_expr": "your_cost",
"basis": "cost",
"verified": "2026-06-11"
},
"Osborne & Little": {
"table": "osborne_catalog",
"cost_expr": "price_retail::numeric",
"basis": "retail",
"verified": "2026-06-21",
"note": "2026-06-21 fix (vp-dw-commerce): price_trade is EMPTY (0/787); the real catalog price is in price_retail (781/787). Repointed from empty price_trade -> price_retail, basis=retail so net cost = price_retail*(1-discount). Was silently resolving 0 cost for all 955 flagged Osborne SKUs."
"Designtex": {
"table": "designtex_catalog",
"cost_expr": "price_retail::numeric",
"basis": "cost",
"verified": "2026-06-11",
"note": "price_trade EMPTY; Steve 2026-06-11 'designtex price / .65 / .85' \u2014 designtex catalog price (price_retail) IS our cost"
},
"Ralph Lauren": {
"table": "rl_catalog",
"cost_expr": "cost",
"basis": "cost",
"verified": "2026-06-11"
},
"WallQuest": {
"table": "wallquest_catalog",
"cost_expr": "price_retail::numeric",
"basis": "cost",
"verified": "2026-06-11",
"note": "price_retail holds cost; price_dw is our retail"
},
"York Contract": {
"table": "york_contract_catalog",
"cost_expr": "retail_price",
"basis": "retail",
"verified": "2026-06-11",
"note": "only retail in catalog; net cost = retail*(1-discount)"
}
}
}