ml-connector
SAP S/4HANAFedEx

SAP S/4HANA and FedEx integration

SAP S/4HANA manages procurement and supply chain finance. FedEx handles physical logistics and package tracking. Connecting the two keeps your purchase orders aligned with actual shipment status, eliminates manual tracking number entry, and gives finance visibility into delivery exceptions before invoices arrive. ml-connector bridges the authentication and API differences so your procurement team sees where every order is without leaving SAP.

How SAP S/4HANA works

SAP S/4HANA exposes purchase orders, purchase requisitions, business partners, suppliers, GL accounts, cost centers, and supplier invoices through OData V2 and V4 REST APIs over HTTPS, with tenant-specific base URLs. Authentication uses OAuth 2.0 Client Credentials, with tokens typically valid for 12 hours and cached to avoid token endpoint exhaustion. SAP S/4HANA has no native webhooks, so purchase order and supplier data is read by polling with timestamp filters or delta tokens. Key entities include A_PurchaseOrder, A_PurchaseOrderItem, A_Supplier, A_BusinessPartner, and A_SupplierInvoice.

How FedEx works

FedEx exposes shipments, tracking events, rate quotes, freight shipments, and pickup management through REST JSON APIs over HTTPS. Authentication uses OAuth 2.0 Client Credentials with API Key and Secret from the FedEx Developer Portal, returning a bearer token with a 1-hour TTL that ml-connector caches to avoid token rate limits. FedEx offers paid webhooks (Advanced Integrated Visibility) for tracking push events, but Track API is free and accepts up to 30 tracking numbers per request. FedEx requires an account number for account-rated shipment creation and provides a transactionId field for client-side idempotency deduplication.

What moves between them

The main flow runs from SAP S/4HANA to FedEx. ml-connector reads purchase orders and supplier details from SAP S/4HANA on a schedule you control and creates shipments in FedEx, mapping SAP business partner addresses to FedEx destination and origin addresses. Tracking events flow from FedEx back to SAP S/4HANA, where delivery status is recorded on the purchase order line items. Reference data such as suppliers and cost centers are read from SAP to ensure every shipment maps to a valid organizational dimension.

How ml-connector handles it

ml-connector stores SAP S/4HANA OAuth credentials (Client ID and Secret) and FedEx OAuth credentials (API Key and Secret) encrypted, and maintains separate bearer token caches for each system, refreshing before expiry. For every purchase order in SAP S/4HANA, ml-connector reads the supplier, line items, and delivery address, then calls FedEx Ship API with the address details and order reference. FedEx returns tracking numbers, which ml-connector stores in the purchase order line items in SAP S/4HANA. On every sync cycle, ml-connector polls FedEx Track API for status on all outstanding tracking numbers, updates the purchase order with delivery events, and flags exceptions for finance and procurement to investigate. SAP S/4HANA's tenant-specific base URL is validated per customer, and FedEx rate limits (1,400 transactions per 10 seconds per project, and 3 tokens per second at the IP level) trigger automatic backoff. Every record carries a full audit trail.

A real-world example

A mid-sized distributor runs SAP S/4HANA for procure-to-pay and uses FedEx for last-mile delivery across multiple regional warehouses. Before the integration, the procurement team manually entered FedEx tracking numbers into purchase orders after shipments were dispatched, and finance had no visibility into delivery status until invoices arrived days later. Accounts payable spent time chasing late deliveries and matching invoices to orders without a shipping date trail. With SAP S/4HANA and FedEx connected, each outbound shipment is created automatically in FedEx with the supplier address and order reference, tracking numbers populate purchase orders in real time, and the finance team sees exception alerts when deliveries are delayed before the invoice lands. Month-end close starts with a clear delivery status on all purchase orders.

What you can do

  • Create FedEx shipments automatically from SAP S/4HANA purchase orders, mapped to the correct supplier and destination addresses.
  • Track FedEx package delivery status and update SAP S/4HANA purchase order line items with tracking numbers and delivery events.
  • Map SAP S/4HANA business partners and cost centers to FedEx shipment references so procurement and finance can trace every order end-to-end.
  • Authenticate SAP S/4HANA with OAuth 2.0 Client Credentials per Communication Arrangement and FedEx with API Key and Secret, managing token expiry and rate limits on both sides.
  • Sync purchase order and tracking data on your schedule with a full audit trail and exception alerts for late deliveries.

Questions

Which direction does data move between SAP S/4HANA and FedEx?
The primary flow is SAP S/4HANA to FedEx. Purchase orders and supplier details move from SAP S/4HANA into FedEx to create shipments. Tracking events flow back from FedEx into SAP S/4HANA to update delivery status on purchase order line items. Reference data such as suppliers and addresses is read from SAP S/4HANA to ensure shipments map to valid organizational dimensions.
How does ml-connector handle OAuth and rate limits for both systems?
ml-connector stores SAP S/4HANA Client ID and Secret, and FedEx API Key and Secret, encrypted. It maintains separate bearer token caches for each system and refreshes tokens before expiry. FedEx rate limits at 1,400 transactions per 10 seconds per project and 3 tokens per second at the IP level; ml-connector caches tokens to avoid exhausting the token endpoint and backs off automatically when limits are approached.
How do I map SAP S/4HANA suppliers and addresses to FedEx shipments?
ml-connector reads SAP S/4HANA purchase orders and extracts the supplier, delivery address, and line item details from the OData APIs. It maps the SAP business partner record to FedEx destination and origin addresses, and includes the purchase order number as a reference field on the shipment. FedEx Track API accepts tracking numbers for lookup, and ml-connector updates purchase order line items with delivery status on every sync cycle.

Related integrations

Connect SAP S/4HANA and FedEx

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started