Example
Complete procedure: a guest-facing procedure that builds an order and takes payment before confirmation or sync.
Goal: One coherent purchase path — shared payment core for occupancy and menu flows.
Typical step order
- Guest / time / elements context — as in booking-classic-occupancy, or skip occupancy for booking-menu-checkout.
- Build the order
- Add Position (
AddPositionToOrder) — configured orderables; quantities usually FromOtherParameter. - Order from menu (
OrderFromMenu) — guest-picked SKUs.
- Add Position (
- Online direct payment (
PayNow) — checkout when gross total > 0; skipped when nothing is owed. - Persist / notify — Create a reservation (
SyncReservationEntry) / Create an order (SyncOrderEntry) / Create an invoice (SyncInvoiceEntry), then Inform guests via email (InformGuestViaEmail) → Inform operators (InformOperator).
Choosing order-building steps
| Scenario | Prefer |
|---|---|
| Fixed or parameter-driven price list | Add Position (AddPositionToOrder) |
| Guest browses menu | Order from menu (OrderFromMenu) |
| Multi-night stay | Add Nights Position (AddNightsToOrder) before Online direct payment (PayNow) |
| Pay first, order more later | Online direct payment (PayNow) then Reorder menu (ReOrderMenu) / Submit as reorder (SubmitAsReorder) |
Related patterns: booking-classic-occupancy, booking-menu-checkout, booking-kiosk-tickets.
Testing split: Component guides for knobs; this pattern for chaining; Playwright for one E2E path; procedure-manager tests for Online direct payment (PayNow) edge cases.