Turning ERP transactions and targets into commercial intelligence
A fictional data architecture case: grain, conformed identity, late-arriving facts, corrections and period close—before any dashboard is built.
Independently created. Contains no employer or client implementation detail, internal names or figures.
01The outcome
One conformed model at account × product line × month, with an explicit period status, from which every performance metric is computed once and published to the CRM.
Orders, invoices and targets arrive from different systems at different grains and times—so every report answers a slightly different question.
What is the grain of each fact, and where do they meet without double counting?
Conform facts in the data platform at a shared grain and publish metrics—rather than copying transactions into the CRM or reporting from each source separately.
A B2B manufacturer sells through several of its own companies, each with its own ERP company code. Commercial teams want one view of orders, invoices and targets per customer, subsidiary and period. Today each region exports ERP data into spreadsheets, joins it to the CRM by customer name and computes its own performance figures.
02The reality · current state
What the data does today.
- Order lines and invoice lines are joined directly, so partial deliveries are counted twice
- Customers are matched by name; groups buying through several legal entities split or collide
- Invoices arrive a day after orders, so yesterday’s performance looks worse every morning
- Targets set mid-year are compared with full-year actuals
- Cancelled orders and credit notes are removed or ignored depending on who built the report
- Each region converts currency with its own rate
03Target flow
Where the data comes from, where it goes—and how.
Every hand-over is named with its mode. The mode follows the business tolerance for waiting, inconsistency and loss.
- 01 · ERPERP ordersFeeds by Batch
Order lines per company, every version kept.
- 02 · ERPERP invoicesFeeds by Batch
Posted invoice lines, including credit notes.
- 03 · PlanningTargetsFeeds by Batch
Published target versions by account, product line and month.
- 04 · CRMCRM accountsFeeds by Event
Commercial accounts, hierarchy and legal-entity links.
- 05 · Data platformData platformHands over by Batch
Conformed facts and the analytical customer key.
- 06 · Data platformMetric computationHands over by Batch
Performance to target, coverage and period status.
- 07 · CRMCRM activation
Read-only signals on the account, with an as-of date.
04Contracts
What one row or message means.
Meaning, grain, key, freshness and owner—written down before anything is mapped.
Order line
A commercial commitment; changes until delivered or cancelled.
- Grain
- One row per order line per version
- Key
Company + order + line + version- Freshness
- Daily by 06:00
- Owner
- ERP data owner
Invoice line
A recognised sale. Corrected by credit notes, never edited.
- Grain
- One row per posted invoice line
- Key
Company + invoice + line- Freshness
- Daily by 06:00
- Owner
- Finance
Target
A published plan; partial-year targets start at their effective month.
- Grain
- Account × product line × month
- Key
Target version + account + line + month- Freshness
- On publication
- Owner
- Sales operations
Customer dimension
One commercial account as it was on each date, linked to its legal entities and ERP customers.
- Grain
- One row per account per validity period
- Key
Analytical customer key- Freshness
- Hourly from CRM events
- Owner
- CRM data owner
05Key dimension · Grain, identity & freshness
Four sources, four grains, one place to meet
Each source keeps its native grain. They are compared only at a conformed grain, with rules for what arrives late and what gets corrected.
- Order lines
- Native grain
- Order line × version
- Arrives
- Daily, same day
- Corrections
- New version; cancelled is a status
- Invoice lines
- Native grain
- Posted invoice line
- Arrives
- Daily, often a day after the order
- Corrections
- Credit-note line, never an edit
- Targets
- Native grain
- Account × product line × month
- Arrives
- On publication, sometimes mid-year
- Corrections
- New target version
- Accounts
- Native grain
- Account × validity period
- Arrives
- Hourly events
- Corrections
- Merge keeps the surviving key; history re-points
Account × product line × month
- Orders and invoices are aggregated separately and compared at this grain—never joined line to line.
- A partial-year target counts from its effective month; months before it have no target, not a zero.
- A month stays provisional until the finance close; late invoices recompute it.
- Cancelled orders keep their history and drop out of open orders.
- Amounts are converted once, at the reporting rate, in the data platform.
The grain decision is the architecture. Every later metric inherits it.
07Failure & recovery
Design the failure path before the happy path.
- Invoices arrive a day after ordersCompleteness per company and dayMark the month provisional; recompute when they arriveData platform team
- An order is cancelled after being countedNew order version with a cancelled statusLatest version wins; history keeps bothERP data owner
- An ERP customer maps to no CRM accountUnmapped-customer check on every loadPark under “unmapped” and route to master data—never drop the revenueMaster data
- A target is republished mid-yearNew target versionRecompute affected months; keep the previous version for auditSales operations
08Candidate architectures
Credible options, judged against these premises.
Copy transactions into the CRM
Few transactions, one company
Cost: CRM volume, no point-in-time history, every team recomputesReport straight from each source
One source per question
Cost: Different grains and timing give different answers to the same questionConform in the data platform, publish metrics
Several sources and companies, shared definitions
Cost: Needs grain and identity contracts and a freshness promise09The second layer
Questions that change the design.
Grain
- What is the grain of each dataset?
- Can order and invoice lines be joined—or only compared at a shared grain?
- How are partial-year targets represented?
Timing
- What happens when one source updates later than another?
- When is a period final?
- How are cancelled or corrected transactions represented?
Meaning
- How are customers identified consistently?
- Which currency is authoritative?
- Where are metrics computed—and how are they activated in the CRM?
10Decisions & outputs
What the work produces.
- 01Canonical grain model
- 02Conformed customer identity
- 03Dataset contracts
- 04Metric contracts
- 05Freshness & period-close rules
- 06Activation model