Order intake
Simulated customer demand enters through a controlled document layer, then every item, quantity and account must resolve against closed master data before the workflow can continue.
A synthetic distribution company, a mock D365 data surface and a hard question: can an AI-assisted workflow carry one transaction across planning, logistics, quality and finance without losing control of the evidence?
A single email demo is easy to make persuasive. Supply-chain work becomes difficult when one decision changes several records, several teams and a customer promise at once.
I built this simulation to make those dependencies visible. It follows synthetic orders through purchase, confirmation, receipt, quality release, delivery, invoice matching and cash — with exceptions deliberately injected along the way.
No write without evidence and permission.
The agent may extract, calculate and recommend. A simulated system action happens only after the required data checks and the right approval gate have passed.
The model keeps information, physical product and cash connected. Each stage has its own state, checks and human boundary.
Simulated customer demand enters through a controlled document layer, then every item, quantity and account must resolve against closed master data before the workflow can continue.
The flow checks released on-hand stock first, allocates what can ship now, and purchases only the uncovered gap instead of blindly turning demand into a full purchase order.
Supplier confirmations can arrive clean, late or split. The simulation updates delivery schedules, propagates promise-date risk and preserves the history of what changed.
Inbound goods move through receipt, quarantine and a separate quality release. Stock cannot become available merely because a receipt record exists.
Released batches are allocated by expiry-aware rules, with partial deliveries and backorders represented explicitly rather than hidden inside one status.
The model closes both sides of the transaction: three-way AP matching and payment, then customer invoicing, receipt and cash allocation.
External commitments, price disputes, delivery promises and other consequential actions are staged for review. Only narrow, whitelisted routine actions may pass automatically.
Every simulated read, recommendation, approval and write-back carries a trace, so the result can be replayed and challenged instead of accepted as model prose.
I wrote seven concrete failure stories first: silence after a PO, partial supply, a delayed promise, a price variance, a batch-expiry decision and an invoice outside tolerance.
A mock OData-style layer gives sales orders, purchase orders, batches, receipts, activities and invoices explicit state and observable reads and writes.
Incoming documents become structured facts; rules test those facts; approval gates decide whether an action may proceed; only then does the simulated write-back happen.
Each scenario ends with machine-checkable claims: the right quantity was purchased, the right batch was allocated, the right exception was held and the right communication stayed pending review.
The first end-to-end version linked order through payment. A second realism pass added true ATP, quality release, landed cost, GST and the customer cash-receipt loop.
The case study ends by separating demonstrated logic from missing production infrastructure: real identity, ERP events, idempotency, outbox processing, evaluation data, access control, observability and recovery.
This project shows how I translate supply-chain operations into explicit state, testable rules, permission boundaries and a productionisation plan — while staying honest about the distance between a simulation and a deployed enterprise system.
Resonated with something? Leave me a note — or leave a way to reach you, and I'll write back.
看到有共鸣的地方?给我留言——或者想认识、想聊聊,留下联系方式,我会回信。
The pigeon is on its way. Thank you for the note — I'll read it, and if you left a contact I'll write back.
鸽子起飞了——我会读到的,留了联系方式的话我会回信。
// prototype — the relay isn't wired up yet; this was a demo flight and the note wasn't actually sent