Day-0 Guide
General enterprise visibility, with access to the enterprise's general document spaces. No HR or payroll compartment access.Viewing as Enterprise Reader
Chapter 03 of 13DAY-0

Business systems should perform actions — not receive arbitrary database edits

When a real business creates an order, closes an opportunity or posts an invoice, it does not conceptually say:

Change column X in table Y.

It performs a business action.

Metrolane models mutations the same way.

Understand

Commands express business intent

Conceptually:

  • Close opportunity
  • Create sales order
  • Post invoice
  • Receive goods
  • Terminate worker

A command says:

This business action should occur.

The handler owns the rules for making it happen.

Handler flow

A typical mutation path is:

  1. authorize
  2. validate
  3. check idempotency
  4. begin transaction
  5. change source-system state
  6. write audit/event
  7. store result
  8. commit

That keeps business rules in one controlled place.

Why this matters

Different callers can use the same mutation path:

  • UI
  • seed process
  • tests
  • relay
  • simulator
  • future action tool

The caller changes.

The business rule does not.

See it in Metrolane

CRM to ERP

A CRM opportunity can become an ERP Sales Order through an explicit operational handoff.

Example:

CRM Opportunity OPP-2026-900001CLOSED_WON

OPPORTUNITY_TO_SALES_ORDER · INTEGRATION_RELAY

ERP Sales Order SO-2026-000001CRM_IMPORT
Important distinction

Cross-system handoff is not entity resolution

This:CRM Opportunity → ERP Sales Order

is a business-process handoff.

This:CRM Account + ERP Customer → canonical Organization

is identity resolution.

The arrows may look similar in a diagram.

Their meaning is completely different.

See it in Metrolane

One source record, two kinds of connection

Use:

CRM AccountACC-2026-900001

It can show:

Operational connection:ACCOUNT_TO_CUSTOMER→ ERP CUST-2026-000002
and separately, Canonical resolution:ACC-2026-900001ORG-000012

Events and relays

A command can produce an event representing something that happened.

A relay can then carry an eligible business fact into another system.

Conceptually:

  1. CRM command
  2. CRM state changes
  3. event / outbox
  4. relay discovers eligible work
  5. ERP command
  6. ERP state changes

This preserves the important boundary:

One source system does not directly rewrite another source system's tables.

Idempotency

A business command should be able to answer:

Did we already perform this request?

Without that, retries can create duplicate orders, duplicate postings or duplicate integration effects.

Idempotency is therefore part of the business mutation contract, not an afterthought.

Go deeper
Why the simulator must use handlers too

A tempting simulator design would be:

  1. generate event
  2. directly insert rows into source tables

Metrolane avoids that.

The simulator should be just another caller:

  1. Simulator
  2. Business command
  3. Handler
  4. Source-system mutation

Otherwise the simulated company would follow different business rules from the normal company.

That becomes especially important in Phase 10.

Chapter takeaway

  • Commands express business intent.
  • Handlers own authorization, validation, idempotency and mutation.
  • Relays carry business facts across system boundaries.
  • Operational handoffs remain distinct from identity resolution.
  • The simulator and future AI actions should use the same governed mutation path.