Nebo · tutorial 13 · run operations
Take an order all the way to the doorstep
Four employees passing one order between them: validated, shipped, restocked, and reordered, with money decisions handed to accounting.
This is the recipe where the handoff matters more than any single employee. Four narrow roles that pass work along beat one broad role, for a specific reason: the employee that validates orders should not be able to issue a refund, and the one that spots a stockout should not be able to spend money fixing it.
The chain
Steps
Build it one link at a time
Do not install all four and wire them together. Run fulfilment alone for a week, then add inventory, and so on. A four-employee chain that misbehaves is very hard to debug, because the symptom appears in a different employee from the cause.
Define what "cannot cleanly ship" means
The fulfilment employee's real job is deciding what to hold. Be specific, because the default behaviour of a helpful assistant is to push things through.
Watch the store rather than polling
Wire the handoffs with events
Each employee knows only its own trigger and its own emit. None of them holds the whole chain in its head, which is what keeps a failure local.
Give procurement a hard spend ceiling
Set the gates
Refunds and cancellations, on every employee in the chain. Vendor onboarding, always. Any purchase order over your ceiling. Proactive customer messages about a late delivery should start gated — a message saying an order is delayed is still a message that shapes a customer's day.
Verify
- Place a test order and follow it through all four employees
- Place one that should be held, and confirm it is held with the right reason
- Drive an item below its reorder point and confirm procurement asks rather than buys
- Confirm no employee in the chain can issue a refund
- Break one employee's connection and confirm the others degrade rather than stall entirely
When it goes wrong
An order stalls between two employees
The upstream workflow ended with empty output, which terminates the branch and means nothing was emitted. Check the last step produced something affirmative.
The same order is processed twice
Two triggers are firing for one event, usually a watch and a schedule both active during migration. Turn one off.
Reorder quantities are wrong
Lead time is missing from the calculation. A reorder point without supplier lead time is just a low-stock alert.