MES Production Completion → SAP B1 Receipt/Issue from Production

MES completion event posts back to SAP Business One: receipt of finished goods via InventoryGenEntries (BaseEntry = production order), component issue via InventoryGenExits (or backflush), then closes the production order with a PATCH. Idempotent on the MES event id.

Steps in this flow

  1. MES: Completion Event Webhook
  2. Guard: MES Completion Event
  3. SL Login (401→relogin, retry once)
  4. SL: POST /InventoryGenEntries (receipt)
  5. Backflush BOM?
  6. SL: POST /InventoryGenExits (component issue)
  7. Order Complete? (final or qty reached)
  8. SL: PATCH /ProductionOrders (close)
  9. Notify: Production Posted

All templates