How this app works
RE COGS resolves a single unit cost for every classification by walking a pecking order of sources. The first source that has a cost wins, and the app labels which one it came from.
Pecking order (current)
- FIFO Manager — fifo-manager. Pulls
avg_costper classification from/api/classifications. - Inventory Hub — Costs tab — inventory-hub. Uses the hybrid
resolvedlist (BQ batch + Firestore winners) from?endpoint=costs.
Classification set
The list of classifications shown is the union of whatever exists in the pecking-order sources. We do NOT pull classifications from NetSuite or any other catalog — if a classification doesn't appear in FIFO or Inv Hub, it's not in this app.
Portfolio
Portfolio is cross-referenced from amazon-api-pipes.eddie_v2_portfolio_level.vw_has_portfolio. For each classification we take the most common portfolio assignment in that view. A classification with no match shows blank and is counted in No Portfolio Match.
What each column means
- Classification — the canonical name as it appears in the winning source.
- Portfolio — from
vw_has_portfolio; blank means no match. - Cost / Unit — the unit cost from the winning source.
- Source — which pecking-order level supplied the cost (FIFO or Inv Hub).
- Detail — extra context (e.g.
FIFO blended avg cost, orinv-hub: bq_batch/inv-hub: firestore).
Adding a new source
Append it in re-cogs/main.py (fetcher + SOURCES list + loop order in build_cogs) and add the matching badge/filter in index.html. Higher in the loop order = higher in the pecking order.
| Classification | Portfolio | Cost / Unit | Source | Detail |
|---|---|---|---|---|
| Loading… | ||||