Pecking order: 1. FIFO Manager  →  2. Inventory Hub (costs tab)
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)

  1. FIFO Managerfifo-manager. Pulls avg_cost per classification from /api/classifications.
  2. Inventory Hub — Costs tabinventory-hub. Uses the hybrid resolved list (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, or inv-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.

Classifications
From FIFO
From Inv Hub
No Portfolio Match
Unit costs by classification
Classification Portfolio Cost / Unit Source Detail
Loading…