Rollout¶
A rollout plan for any integrator pushing data into FG.AI WMS through this contract. The most important section is the upsert order at onboarding — dependency violations are the dominant cause of onboarding pain, and they are entirely avoidable by sequencing correctly.
Suggested upsert order at onboarding¶
Run the initial load in this order. Each step depends only on prior steps.
UoMs —
POST /wms-ingest/v1/master/uoms?mode=bulkAddresses —
POST /wms-ingest/v1/master/addresses?mode=bulk(warehouses + customers + suppliers + carriers)Locations: warehouses —
POST /wms-ingest/v1/master/locations?mode=bulk(kind=WAREHOUSE)Locations: zones —
POST /wms-ingest/v1/master/locations?mode=bulk(kind=ZONE)Locations: bins —
POST /wms-ingest/v1/master/locations?mode=bulk(kind=BIN)SKUs —
POST /wms-ingest/v1/master/skus?mode=bulkBOMs —
POST /wms-ingest/v1/master/boms?mode=bulk(only after all referenced SKUs are present)Lots / Serials —
POST /wms-ingest/v1/master/lots?mode=bulk,POST /wms-ingest/v1/master/serials?mode=bulkInventory snapshot —
POST /wms-ingest/v1/inventory/snapshot(scope=FULLper warehouse, at a clean cutover point)Documents — push only the documents still open at cutover (open POs, open receivers, open shippers, open work orders, in-transit transfer orders)
After this sequence, the FG.AI planner is ready to take over. Open documents start being planned and dispatched on the FG.AI side; the upstream continues to be the system of entry but stops planning.
Skip steps that do not apply to your operation. Most warehouses use lots or serials but not both; most do not use BOMs.
Implementation checklist¶
Use this as a rollout plan. Each item is independently verifiable.
Map upstream natural keys to
source_idfor every entity class. For composite keys, pick a deterministic separator (.or:) and document the convention.Decide
source_versionsemantics. Cheapest option: increment per row on every source-side update. Alternative: epoch milliseconds. Whichever you choose, ensure monotonicity.Build the initial-load orchestrator in the order above. Use
?mode=bulkfor every step; poll/jobs/{job_id}for completion.Build the steady-state change emitter. Source-side changes to master data or documents trigger a
?mode=upsertcall. Keep the samesource_idand incrementsource_version.Build the inventory snapshotter. Full snapshot at cutover; partial snapshots periodically during the overlap period (if any).
Implement the three webhook receivers. Verify HMAC over the raw body before parsing. Be idempotent on
correlation_id.Build a quarantine triage UI (or surface
GET /quarantinein your existing ops tool) so the data team can resolve conflicts without an FG.AI engineer in the loop.Add a mapping lookup utility so support can answer “what is FG.AI’s
internal_idfor our SKU X?”.Plan the cutover runbook. Freeze the upstream’s planning loop, run the initial bulk load, post the FULL inventory snapshot, switch operations to FG.AI.
Verify with replay tests for every inbound and outbound endpoint. Confirm
REPLAYsemantics work on retries and that webhook receivers do not double-apply on at-least-once redelivery.
Joint verification before go-live¶
Test |
What to verify |
|---|---|
Cross-warehouse credential rejection |
A credential for |
Webhook signature mismatch |
A request with a wrong |
Request replay |
A second send of the same |
Item replay |
A second send of the same item with the same |
Quarantine triage |
A deliberate unknown-UoM SKU upsert produces |
Bulk job polling |
A |
Webhook redelivery idempotency |
A duplicate webhook with the same |
Cutover snapshot accuracy |
The full snapshot’s quantities exactly match the upstream’s known position before flipping FG.AI to authoritative. |
Cutover day¶
Sequencing for the cutover day itself, after onboarding has been completed and verified in a non-production environment:
Freeze the upstream’s planning loop. Stop releasing new work; let in-flight work settle.
Drain in-flight movements. Wait for all expected open transactions to land in the upstream.
Post the final FULL inventory snapshot. Use a deliberate operational pause (e.g. end of the shift) for a clean snapshot.
Push all open documents as they stand at the snapshot timestamp.
Switch FG.AI to authoritative. From this point, inventory writes flow through FG.AI WES → FG.AI WMS, not through this contract.
Keep the upstream as the customer-visible system of entry. Continue ingesting new master and document upserts via this contract; stop pushing inventory.
Monitor for 48–72 hours. Watch for unexpected quarantines or webhook redelivery failures. Roll back to upstream-authoritative if the numbers drift unacceptably.
The cutover snapshot is the single most-consequential payload — verify it twice.
Common rollout pitfalls¶
Pushing documents before master data. Documents quarantine because their SKU / location / party references resolve to nothing. Sequence per the upsert order.
Pushing bins before zones (or zones before warehouses). Hierarchy unresolved → quarantine. The order above prevents this.
Forgetting
source_version. Out-of-order delivery silently overwrites newer state with older. Always sendsource_versionif the upstream can produce one.Using
full-refreshfor a partial change. Afull-refreshof one item tombstones every other item in that collection. Useupsertfor partial changes.Skipping HMAC verification on webhooks. “We’re behind a VPC anyway” is not an answer — the contract requires it.
Re-using
correlation_idacross logically distinct requests. Request-level idempotency depends on thecorrelation_idbeing unique per logical action.Cutover without a final FULL snapshot. FG.AI’s starting inventory position is whatever the most recent snapshot says. If you skip the final snapshot, FG.AI starts authoritative on stale data.
After cutover¶
The integration enters a stable steady state:
Master data flows on every change (low volume).
Documents flow on every state-relevant event (moderate volume).
Inventory writes flow from FG.AI to the upstream via the
inventory.adjustedwebhook (the upstream may choose to mirror or ignore).Quarantines are rare; when they happen, the triage UI handles them without engineering involvement.
If the integration is operating cleanly, the only ongoing engineering work is reacting to upstream API changes and FG.AI minor-version upgrades.