SAP B1 ↔ Supplier EDI (ORDERS Out, INVOIC In → 3-Way-Match Draft)
Outbound ORDERS EDI from SAP B1 PurchaseOrders; inbound INVOIC mapped to a SAP B1 Purchase Invoice landed as a Draft (DocObjectCode) after a 3-way match against the PO + GRPO, translating the supplier's item codes via the BP catalog-number cross-reference and enforcing price/qty tolerance before human review. Idempotent per supplier invoice number.
Steps in this flow
- PO Approved (SAP B1) / INVOIC In
- SL Login (B1SESSION)
- GET /PurchaseOrders (for ORDERS)
- Export ORDERS → Supplier (EDI/JSON)
- INVOIC Received Webhook
- Guard: Supplier Invoice No
- Translate Supplier Codes → ItemCode
- 3-Way Match: INVOIC vs PO vs GRPO
- POST /Drafts (oPurchaseInvoices, base=GRPO 22)
- Retry on 401 (re-login)
- Notify AP: INVOIC Draft for Review