Engineering

The pragmatic case for event sourcing in ERPs

Event sourcing is oversold as an architecture and undersold as a bookkeeping technique. In ERP systems, where every number must be explainable, the ledger model earns its complexity.

Daniel Reyes · Principal Engineer · Jun 28, 2026 · 12 min read
Warehouse worker scanning stock barcodes

The question auditors actually ask

Nobody asks an ERP what the stock level is. They ask why it changed. A mutable row cannot answer that, so teams bolt on audit tables, then history tables, then a reversal flag, and eventually rebuild an event log badly.

Event sourcing simply admits this up front: store the facts that happened, derive the current state.

Where it pays, and where it does not

Apply it to domains where the sequence of changes is itself business-critical. Inventory movements, financial postings, payroll adjustments, and order state transitions all qualify: each has a legal or operational requirement to explain the current number.

Do not event-source your customer table. A supplier's phone number has no interesting history, and modelling it as a stream buys nothing but ceremony.

  • Good fits: stock ledger, general ledger, order lifecycle, price changes, approvals.
  • Poor fits: settings, reference lists, user profiles, content.

Projections and the rebuild button

Read models are caches. A stock-on-hand table, an aged receivables view, a dashboard aggregate — all are derived, all are rebuildable. That is the operational superpower: when a reporting bug is found, you fix the projection code and replay, rather than issuing correction scripts against live balances.

Make rebuild a routine operation, not an emergency one. If replaying a year of events takes eight hours and has never been rehearsed, you do not have a rebuild button.

Versioning is the real discipline

Events are immutable, which means mistakes in their shape are permanent. Every event gets a version field from day one, and every consumer upcasts old versions to the current shape on read. Never rewrite history to fix a schema; write a new event type and migrate consumers.

This is the part teams skip, and it is the part that decides whether the system is still maintainable in year five.

Key takeaways

  • Event-source the domains where history is the product: inventory, ledger, payroll.
  • Keep CRUD for reference data — customers, products, settings.
  • Projections are disposable; the event log is not. Version your events from the first release.

Working on something similar?

Talk it through with a senior engineer — no sales script, no obligation.

Request a free consultation

Keep reading