SAP S/4HANA and ShipStation integration
SAP S/4HANA runs procurement and finance for enterprise supply chains. ShipStation manages shipping, carrier rates, and fulfillment for multi-channel order operations. Connecting the two keeps procurement and fulfillment aligned: purchase orders from SAP flow into ShipStation for supplier shipment tracking, and shipment receipts flow back into SAP so receiving GL postings and cost center allocations happen automatically without manual reconciliation.
What moves between them
The flow is bidirectional. Purchase orders and purchase requisitions from SAP S/4HANA are polled daily or on a custom schedule and synced to ShipStation as purchase orders for supplier fulfillment, tagged with the SAP PO number and supplier ID. ShipStation shipment notifications arrive via webhook and ml-connector receives the pointer, fetches the full shipment details, and posts the receipt into SAP S/4HANA's Goods Receipt API to trigger receiving GL postings and cost center allocation. Supplier master data (suppliers, addresses, company codes) is synced from SAP to ShipStation to maintain supplier reference data on both sides.
How ml-connector handles it
ml-connector stores SAP OAuth 2.0 credentials and retrieves tenant-specific token and API endpoints from the Communication Arrangement details, then caches tokens and refreshes before expiry. It polls SAP purchase orders and requisitions using the LastChangeDateTime filter to detect changes since the last run. For ShipStation, ml-connector registers a webhook endpoint to receive shipment and fulfillment events, validates signatures, and fetches the full shipment resource via authenticated GET to the resource URL within the webhook event window. Since ShipStation V1 datetime fields are in PST/PDT, ml-connector converts to UTC before posting into SAP GL Account Line Items. Purchase order numbers are the natural idempotency key; ml-connector deduplicates by orderKey when syncing to ShipStation. Because S/4HANA GL accounts and cost centers are read-only, cost center allocation comes from the purchase order coding block and PO item splits. ShipStation rate limits at 40 requests per minute for V1, so ml-connector implements exponential backoff and tracks remaining quota. Every record carries an audit trail of poll time, matched GL accounts, and cost center allocations.
A real-world example
A mid-sized industrial distributor runs SAP S/4HANA for procurement, GL postings, and cost accounting across three warehouses and two regional offices. They use ShipStation to consolidate inbound orders from their website, EDI partners, and distributor portal, manage rate shopping across UPS, FedEx, and regional carriers, and track shipments. Before the integration, the procurement team manually entered purchase orders into ShipStation for tracking, received shipments by hand into a spreadsheet, then re-keyed the totals into SAP for goods receipt and GL posting, creating a three-day delay and frequent mismatches between ShipStation quantities and SAP inventory. With SAP S/4HANA and ShipStation connected, each purchase order pushed from SAP appears in ShipStation within minutes, shipment receipts post automatically into SAP, cost centers are allocated by the PO coding block, and month-end inventory reconciliation starts with synchronized data.
What you can do
- Sync purchase orders from SAP S/4HANA to ShipStation daily or on custom schedule, including supplier data and cost center allocations.
- Receive ShipStation shipment and fulfillment webhooks and post Goods Receipts back into SAP S/4HANA with matched GL accounts and cost centers.
- Authenticate SAP using OAuth 2.0 Client Credentials with tenant-specific token endpoints, and ShipStation using API Key authentication, with automatic token refresh.
- Convert ShipStation V1 datetime fields from PST/PDT to UTC and align supplier master data across both platforms.
- Deduplicate orders using orderKey and track every record with full audit trail of polling times, matched costs, and receipt status.
Questions
- Which direction does data move between SAP S/4HANA and ShipStation?
- The flow is bidirectional. Purchase orders and supplier data flow from SAP S/4HANA into ShipStation for fulfillment tracking. Shipment receipts and fulfillment events flow from ShipStation back into SAP S/4HANA to post Goods Receipts, trigger GL postings to the matched cost centers from the purchase order, and update inventory. GL accounts and cost centers are maintained in SAP only and read from SAP into ShipStation for reference.
- How does ml-connector handle SAP S/4HANA's tenant-specific OAuth endpoints and ShipStation's webhook payloads?
- ml-connector requires the SAP admin to provide the Communication Arrangement details including the token endpoint and OAuth scope, which are tenant-specific and must not be constructed manually. For ShipStation webhooks, ml-connector validates the incoming signature, then immediately fetches the full shipment or order resource via authenticated GET to the resource URL provided in the webhook pointer, converting ShipStation V1 datetime fields from PST/PDT to UTC before posting into SAP.
- What happens if a shipment is partially received or a purchase order is split across multiple shipments?
- ml-connector tracks each Goods Receipt line independently by SAP PO item number and ShipStation shipment ID. Partial receipts are posted as separate GL transactions to the cost center from the PO item coding block. If a single SAP PO splits across multiple ShipStation shipments (common in drop-ship scenarios), each shipment webhook triggers a separate Goods Receipt, and ml-connector deduplicates by the combination of SAP PO number and ShipStation shipment tracking number to prevent duplicate GL postings.
Related integrations
More SAP S/4HANA integrations
Other systems that connect to ShipStation
Connect SAP S/4HANA and ShipStation
Free to use. Add your credentials, ping your real systems, and see if we fit.
Get started