Go-live cutover runbook¶
This is NOT the install runbook. It exists for one specific situation: the store is ALREADY LIVE and taking orders while ForgeSync is being installed. Orders placed before webhooks are armed never fire a webhook, and the ongoing reconcile sweep only looks back a short window, so without this procedure every order from before arming quietly never reaches the ERP. A fresh store with no order traffic can skip this page entirely; Install sequence covers it.
The shape of the problem¶
Three windows exist on cutover day:
- Before webhooks: orders exist in Shopify only. Nothing will ever push them.
- The gap: between "store took its first order you care about" and "webhooks armed and verified". Same as window 1 but it grows while you work.
- After webhooks: orders flow on their own.
The procedure closes windows 1 and 2 by machine, with the same idempotent admission the webhook path uses, so running it twice, or overlapping it with live webhook traffic, cannot double-export an order.
Preconditions¶
fe:verify --installexits 0 (the install itself is done).- If Book web orders in Sage is still off (the "Not yet" answer at install), orders that arrived meanwhile are held, not booked. Turning it on is the go-live moment: from then on new orders book on their own, and the held ones wait for this procedure, which picks the boundary.
- The ERP export path has been proven with the canary order + readback gate (install sequence, final step).
- Agree the CUTOVER BOUNDARY with the customer: the earliest order that should reach the ERP (a date, or an order number). Orders older than the boundary are history the ERP already has by other means; pulling them in creates duplicate bookings.
Procedure¶
- Arm webhooks:
php artisan fe:webhooks:ensure(no--dry-run). Re-run; the second pass must report zero drift. Note the time; this stamps the end of the gap window. - Verify arming with a live event: place a $0-impact draft or a real test order; watch it appear in the export queue on its own. Until one order has arrived VIA WEBHOOK, do not proceed; you would backfill into a still-open gap.
- Backfill the gap, dry-run first:
php artisan forgesync:orders:backfill --from=<boundary> --to=<now> --dry-run
php artisan forgesync:orders:backfill --from=<boundary> --to=<now>
The command fetches real orders over the Admin API and admits them through the same rules as the webhook, with one addition that makes it restore-safe: any order the ERP already knows (checked locally, then against the live bridge) books directly as SENT with its ERP order number instead of re-exporting. A bridge failure HOLDS the order rather than guessing. 4. Prove zero duplicates: for the backfilled range, every order must hold exactly one queue row (the unique order id guard enforces this; the dry-run report is the evidence), and spot-check the external-key readback on two or three: the ERP shows exactly one sales order carrying each web order number. 5. Overlap check: re-run the backfill for the same range. Every line must report already-known/skipped, zero new enqueues. That re-run IS the no-duplicates proof for the record; keep its output with the go-live notes. 6. Hand the queue to the schedule: confirm the drain job exports the backfilled rows in order, then watch the first fully-organic webhook order export end to end. Cutover is complete at that point, and the ongoing reconcile sweep covers webhook misses from here on.
If something holds¶
Held rows in the backfill are the system refusing to guess (unreachable bridge, unresolved customer, unmapped ship method). Resolve by the hold reason exactly as in the customer service runbook; never delete a held row to make the report clean.
Record¶
The go-live note for the engagement file: boundary chosen and by whom, webhook arming time, backfill range and counts (admitted / already-known / held), the zero-new-enqueues re-run output, and the readback spot-check order numbers.