SAP S/4HANA and WooCommerce integration
WooCommerce drives online orders, and SAP S/4HANA runs procurement and finance. Connecting the two keeps your SAP business partner master data in sync with web customers, and every order placed on WooCommerce flows into SAP as a purchase requisition or sales order draft awaiting procurement approval. New customer information, billing addresses, and contact details from WooCommerce update the business partner database in SAP without manual re-entry. Order totals and item-level details map to the correct SAP cost objects and GL accounts, so accounting records are accurate from the moment the order enters the system.
What moves between them
Customer records and order data flow from WooCommerce into SAP S/4HANA. When a customer is created or updated in WooCommerce, ml-connector writes or updates the matching business partner in SAP with the customer's billing address, email, and contact phone number. When an order is placed in WooCommerce, ml-connector creates a purchase requisition or sales order in SAP with order header totals mapped to GL accounts and cost centers, and line items mapped to product masters or temporary item codes. Refunds in WooCommerce update the SAP requisition status. No data flows from SAP back to WooCommerce; the integration is unidirectional.
How ml-connector handles it
ml-connector registers a webhook at WooCommerce for order.created, order.updated, customer.created, and customer.updated events. When WooCommerce fires a webhook, ml-connector verifies the signature using the webhook secret with HMAC-SHA256, then extracts customer and order records. For SAP S/4HANA, ml-connector obtains an OAuth 2.0 bearer token from the tenant-specific token endpoint supplied in the Communication Arrangement, caches it, and refreshes before expiry to avoid mid-request token failures. Customer billing addresses from WooCommerce map to SAP business partner address segments, and email and phone are stored in the communication data. WooCommerce order totals and item details are mapped to SAP GL accounts and cost centers according to rules you define per order type (B2B sales, internal procurement, etc.). If a WooCommerce webhook fails or SAP write temporarily rejects the record, ml-connector retries with exponential backoff and maintains a full audit trail so the record can be replayed. Webhook disablement due to 5 consecutive failures is surfaced as an alert so you can re-enable and catch up on missed orders.
A real-world example
A mid-sized B2B distributor runs WooCommerce for a direct-order web store serving small businesses and field offices, and uses SAP S/4HANA for enterprise procurement, inventory, and accounting. Before the integration, the order-entry team logged into SAP daily, created purchase requisitions by hand from overnight WooCommerce orders, and manually entered customer shipping and billing details from the web platform into SAP business partner records. With WooCommerce and SAP S/4HANA connected, each order appears in SAP within seconds of being placed on the web, requisitions are pre-filled with shipping address and GL cost center, and new customers are automatically registered in SAP so procurement staff see them immediately when approving the order.
What you can do
- Sync WooCommerce customer records into SAP S/4HANA as business partners with full contact and address information.
- Create SAP purchase requisitions or sales orders from WooCommerce orders with line items mapped to GL accounts and cost centers.
- Receive WooCommerce webhooks on order.created, order.updated, customer.created, and customer.updated, and process them immediately.
- Authenticate securely to SAP S/4HANA using OAuth 2.0 with tenant-specific token endpoint and to WooCommerce using API keys.
- Audit every customer and order sync, with alert notifications if WooCommerce webhooks are disabled due to repeated failures.
Questions
- Do new SAP sales orders or requisitions created from WooCommerce orders require additional approval before procurement?
- Yes. ml-connector creates the orders in SAP with all customer, address, and GL account details pre-filled, but the orders are typically in draft or awaiting-approval status. Your SAP procurement team reviews, confirms quantities and pricing, and releases them into the workflow. This prevents accidental purchase of web orders without verification.
- What happens if a WooCommerce webhook fails repeatedly and becomes disabled?
- WooCommerce automatically disables a webhook after 5 consecutive non-2xx responses. When this occurs, ml-connector detects the failure pattern and sends an alert to your operations team. You must manually re-enable the webhook in WooCommerce, and ml-connector provides a replay feature to catch any orders that were missed while the webhook was disabled.
- How are WooCommerce products mapped to SAP purchase requisition line items?
- ml-connector uses a mapping table you configure that connects WooCommerce product IDs or SKUs to SAP material masters or temporary item descriptions. If a WooCommerce product has no mapping, ml-connector can create a temporary item record in SAP or reject the order with an alert. The mapping table also specifies the GL account and cost center for each product or product category.
Related integrations
More SAP S/4HANA integrations
Other systems that connect to WooCommerce
Connect SAP S/4HANA and WooCommerce
Free to use. Add your credentials, ping your real systems, and see if we fit.
Get started