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

  1. SAP B1: Delivery Note Add
  2. Guard: Delivery Note
  3. SL Login (B1SESSION)
  4. GET Delivery + AddressExtension
  5. Normalize Saudi National Address + Weight
  6. Carrier: Create Shipment
  7. PATCH Delivery: U_TrackingNo + Label
  8. Carrier Tracking Webhook
  9. Status == delivered?
  10. POST /Invoices (base=Delivery, BaseType=15)
  11. PATCH Delivery: U_TrackingStatus

All templates