SAP B1 ↔ Shipping Carrier (Create Shipment, AWB, Tracking)
On SAP B1 delivery note add, call the carrier (Aramex/DHL/SMSA) create-shipment API using ship-to from AddressExtension, write the AWB to U_TrackingNo, attach the label PDF via Attachments2, then update U_TrackingStatus on tracking events and optionally auto-create the AR invoice from the delivery on 'delivered'. Idempotent per delivery note.
Steps in this flow
- SAP B1: Delivery Note Add
- Guard: Delivery Note
- SL Login (B1SESSION)
- GET Delivery + AddressExtension
- Normalize Saudi National Address + Weight
- Carrier: Create Shipment
- PATCH Delivery: U_TrackingNo + Label
- Carrier Tracking Webhook
- Status == delivered?
- POST /Invoices (base=Delivery, BaseType=15)
- PATCH Delivery: U_TrackingStatus