Skip to content

Chapter 0 — Master Data

0.1 — Locations: install-base vs regular (and zones)

⚙ Process: none — pure master data (master.site, site_class), written by the import or edited in the Sites grid. Every planning process reads the class to decide what a location's demand MEANS.

The three classes (one row per class; supporting facts stay inside that row):

site_class Meaning for planning
managed — regular locations What it is: the stock-holding planning nodes — warehouses, DCs, depots, plants.
Demand meaning: its own demand — forecast + order book at that location, replenished from its inbound routes.
install_site — install-base locations What it is: customer/producer sites that USE the parts (a tyre plant, a fleet operator).
Demand meaning: not its own replenishment need — direct customer demand for the warehouses serving it. Its forecast/orders roll up to the serving location tagged as install-base-direct (5.7); MEIO sizes the serving site on the GROSS served stream; netting subtracts the approved standard→IB replenishments from the IB's plan (5.8); and supply ships the IB as a committed outflow (7).
zone — zones What it is: geographic zones are master.site rows of this class — every real site's zone_id references its zone row.
Demand meaning: grouping only — never stocked, never replenished; the zone pass (6) and the geography queries read them.

The one-sentence difference

a regular location's demand is its own problem (replenish it); an install-base location's demand is its serving warehouse's problem (direct demand there, shipped to the IB as a committed outflow — and the IB's own replenishment forecast is netted by exactly those approved shipments so the same physical flow is counted once).

0.2 — Supersession: the time-phased item replacement

⚙ Process: no pipeline step — supersession is master data: replacement edges in {schema}.item_supersession (from_item → to_item, optional site_id, effective_date, demand_factor, stock_rollable), written by the import (Point 2's item_supersession step) or edited in the Master Data grid. Every planning process then applies the time-phased migration at its own hook — "behave normally until supersession: the SL is defined till the date, orders are cut at the date". The forecast-side hooks are 5.9; the mechanism is implemented ONCE in utils/supersession.py and consumed everywhere.

Edges import.item_supersession (staging) → import step Point 2 → {schema}.item_supersession from_item → to_item effective_date · demand_factor

Netting streams split at the date (pre-cutover stays, post moves × factor) → Rollup both passes split row by row → MEIO replaced SKUs drop from sizing once the planning date passes → Supply SS taper from the date + BUY/MAKE routes blocked → UI arrows ↘ superseded / ↗ superseding / ↕ both on every item name, every screen ( SupersessionContext )

The chain display — how a replaced item is shown. In grids, tables and dropdowns across the app, item names carry a small arrow in front of them: ↘ this item is being replaced, ↗ this item replaces another, ↕ both — a middle link in a longer replacement chain. The series detail page adds a badge next to the title — ↓ Superseded (rose), ↑ Latest revision (emerald), ↕ In Chain (amber) — and clicking it lists the whole chain with its cutover dates and jumps straight to the latest revision.

The supersession badge popup

The series page of a replaced item (the demo tenant): clicking the badge opens the chain — ↘ the replaced part, →, ↗ its successor, and the cutover date (here 24 Jul 2026). The "→ Latest" link jumps straight to the successor's page.

The cutover, live on the series. On the replaced item's series page, open the Supply tab: the Inventory Projection chart draws a dotted red vertical line at the effective date, labeled with the arrow and the date. Everything left of the line is normal planning for the old item — its buffer is held, orders are cut as usual; from the line onward no further replenishment is planned for it and the buffer runs down, while the demand migrates to the successor. Hovering the line explains exactly that.

The cutover mark on the Inventory Projection chart

The dotted cutover line on the replaced item's supply projection (the demo tenant, effective 24 Jul 2026): the plan holds the item's safety stock until the line, then tapers it to zero as the successor takes over. The same line appears on the successor's chart, labeled with the ↗ arrow.

What supersession MEANS to each planning process (the time-phased rule — buckets before the effective date stay on the old item, buckets at/after move to the successor × demand_factor):

Process Effect
Forecast The demand dataframe is migrated pre-forecast; the netting redirect is the migration point in replays. The statistical forecast continues for the old item until the effective date, then stops.
Netting (5.8) Every statistical, causal, and maintenance consumption stream splits at the date; the successor carries post-cutover demand and duplicate weeks are summed.
Rollup (5.7) Both passes split row by row at the date, including replenishment seeds and kit_make components.
MEIO (6) The replaced SKU drops out of sizing once the planning date passes the effective date; site-specific edges drop only that site's SKU.
Supply (7) Safety stock tapers to zero from the first week at/after the date; the old item's BUY/MAKE routes are blocked.
UI Arrows appear on every item name, with the chain badge and manager views exposing the replacement graph.

Fail-loud: an edge whose effective date falls inside the 52-week horizon with a missing successor item aborts netting/rollup/supply with the exact remediation; the list API LEFT-JOINs and flags broken edges instead of hiding them. Site-specific edges redirect only at their site; global edges everywhere.

Editing supersession edges — where, and what each option means. Open Settings → Master Data → Objects → the "Objects" dropdown → Supersession. The page lists every edge (↘ from-item → ↗ to-item), with search, + New edge, per-row ✏️ Edit / 🗑️ Delete, and — when you click a row — a chain panel on the right drawing the whole replacement graph with a role chip (Top revision / Intermediate / Superseded) and clickable predecessors. Edits auto-save ~800 ms after your last change (the app-wide convention — there is no Save button). The options:

The Supersession editor

The Supersession editor (the demo tenant): every edge as ↘ from → ↗ to with its effective date; the row's factor and roll-up flag are editable inline. Clicking a row opens the chain panel — the replacement graph, each item's role, and the latest revision one click away.

Option What it means
Replaced item (from) The outgoing part
Replacing item (to) The successor that takes over
Site (optional) Leave blank = the edge applies at all sites; pick one to scope the replacement to a single location
Effective date The cutover: before it, planning keeps the old item normally; from it onward, demand migrates to the successor. Leave blank = immediate
Demand factor How much of the replaced item's demand the successor inherits (1.0 = all of it)
Roll up stock When on, the old item's on-hand stock counts toward the successor's coverage at the cutover
Notes Free text — e.g. the engineering change (ECO) number

The edge form — every option

Editing an edge: the from/to items, the optional site scope, the effective date, the demand factor, the roll-up-stock toggle and notes — each change auto-saves as you type.

Safety rails you will meet: you cannot point an edge at an item that does not exist, an item cannot supersede itself, and the same edge twice is rejected. An edge whose successor disappears later is flagged red in the list and stops planning runs until you fix or delete it — deliberately loud, never silently ignored.

0.3 — Audit & observability (application-wide)

⚙ Process: no pipeline step — the audit infrastructure runs alongside every process. Every planning action is recorded somewhere; this section maps WHERE.

Why the audit exists: a supply-planning system makes decisions worth millions — the planner, the auditor, and the customer all need to trace who ran what, on what data, with what result, and when. Four audit surfaces cover the full lifecycle:

Audit surface Traceability details
Process Log (pipe_process_log) What it records: every pipeline-step execution, who triggered it, start/end, row count, log tail, and error; one row per (run, step).
Where you see it: Process Log (/logs), filterable by pipeline, step, status, and date.
Import audit (import.import_run + import_table_result) What it records: every ETL/import run, run kind, source, per-object staged/loaded/rejected counts, samples, and duration.
Where you see it: the run history of the Stage / Import process cards (the Configure modals) and “View rejected rows”.
Configuration audit (interact_planning_event) What it records: every configuration change, actor, entity, old/new values, and timestamp; append-only.
Where you see it: Audit Log (/audit), filterable by user, entity, action, and date.
Historization log (sys_historization_log) What it records: every archive run, copied objects, bucket date, per-object counts, status, and trigger source.
Where you see it: Pipelines → Archiving, with per-pipeline and per-object history.

The four surfaces answer four different questions

the Process Log answers "what did the engine DO?" (every run, every step). The Import audit answers "what data landed WHERE?" (every object, every count). The Configuration audit answers "who CHANGED what?" (every parameter edit). The Historization log answers "what was ARCHIVED?" (every bucket copy). Together they form the complete traceability chain: data in → configuration → computation → results → archive.

How each audit surface is configured

Audit surface Configuration and retention
Process Log Configuration: automatic for every pipeline step; level and verbosity come from system log settings.
Retention: grows with use, queryable by date, not automatically pruned.
Import audit Configuration: automatic for every ETL/import run; tenant capture_rejections controls rejected-row samples.
Retention: run history remains queryable; rejection samples are capped.
Configuration audit Configuration: automatic for scenario edits, parameter overrides, and planning-date changes; writes append-only interact_planning_event rows.
Retention: permanent by design.
Historization log Configuration: automatic for every archive run; retention is configured per historization scenario.
Retention: follows the historization scenario's retention setting.

Where do I see who changed what?

Every configuration change — a scenario edit, a parameter override, a planning-date change, an import settings update, a replay run — is recorded as an audit entry with:

Column What it shows Example
Changed by The user's email — WHO made the change ops@example.com
Entity type + action WHAT was affected and HOW import / set (stage settings updated) · replay / create (a new replay)
Old value The state BEFORE the change (null on create) {"status": "completed"}
New value The state AFTER the change {"process": "flow_history_source", "params": {}}
Timestamp WHEN — the exact moment 2026-11-09 15:44:25

Audit Log page — every configuration change with who/what/when

Where you see it: the Audit Log page (route /audit). Each row shows the user who made the change, the entity type and action, the old and new values, and the timestamp. Filterable by entity type, action, user, and date range. The the demo tenant tenant carries 3,052 audit entries.

Process Log page — the pipeline execution audit

The Process Log (route /logs): every pipeline step execution with its status, timing, row counts, and the expandable log tail — the engine's heartbeat.

Audit Log page — the configuration change audit

The Audit Log (route /audit): every configuration change with the user, the entity, the action, and the timestamp — the append-only change trail.

0.T — Step-by-step test walkthrough

Master data verification — every step needs only the UI and one exported grid.

# Where to look / what to click You should see
1 Settings → Master Data → Sites the grid lists every location; each row carries a site_class: managed (stocked), install_site (customer/producer), zone
2 Sites grid → filter site_class = zone the geographic zones are rows of the same table; every real site's zone_id points at one
3 Sites grid → filter site_class = install_site customer/producer sites flagged; open one → its zone assignment and (optionally) max_capacity_qty
4 Master Data → Supersession → new edge pick From item, To item, effective date a few weeks out, demand_factor 1.0; the row auto-saves
5 Supersession → try an edge with a missing To item save is REJECTED with the validation message (fail-loud) — no silent edge
6 Open any item-name surface (Dashboard, Items grid) the replaced item's name carries ↗, the successor's ↑ — arrows render app-wide
7 Audit Log (route /audit) your supersession create is logged: user, entity, old/new value, timestamp
8 Process Log (route /logs) each pipeline step run listed with status; expand one entry for the log tail

Master Data grids

Where the master-data grids live: Settings → Master Data — one grid per entity.

Audit Log

The Audit Log: who changed what, when — append-only.