Shopify ↔ SAP S/4HANA
Shopify orders become SAP sales orders. SAP deliveries become Shopify fulfillments.
A storefront moves at checkout speed; SAP moves by document flow — sales order, delivery, goods issue, billing. Connecting them by hand means exporting orders, keying them into SAP and updating Shopify’s stock from a report that is already out of date. PartnerMCP creates each Shopify order in SAP S/4HANA through SAP’s published sales order API, publishes SAP stock to Shopify locations, turns goods issue into a Shopify fulfillment and carries refunds, returns and cancellations into SAP’s own documents.
You
“Create SAP orders from Shopify, synchronize inventory, fulfillment, refunds and cancellations.”
PartnerMCP· I will:
- Subscribe to orders/paid, orders/cancelled, refunds/create and the returns webhooks, verify every HMAC signature and de-duplicate on X-Shopify-Webhook-Id.
- Map each shopper to an SAP customer — one per buyer, or the shared web-sales customer your SAP team uses — and take the sales area from your rules.
- Create the SAP sales order in one deep insert — header, to_
Item lines with Material and RequestedQuantity, and to_ Partner — with the Shopify order name as Purchase Order By Customer. - Where prices must match SAP, simulate first: the simulation API runs pricing and availability without saving, and differences go to review.
- Publish stock: read SAP material stock for the plants and storage locations you map, and set Shopify’s available quantities with inventory
Set Quantities — idempotent and compare-and-set. - When SAP posts goods issue on the outbound delivery, create the Shopify fulfillment on the order’s fulfillment orders.
- Turn refunds into credit memo requests and returned goods into customer returns; cancel open orders the way your SAP process does, never by deleting them.
- Reconcile every day — Shopify deletes a webhook subscription after 8 consecutive failed deliveries, so nothing depends on webhooks alone.
- Order placed — Shopify: Trigger · webhooks
- Customer match — PartnerMCP: Customer ⇄ A_BusinessPartner
- Schema mapping — PartnerMCP: SKUs · taxes · shipping
- Create sales order — SAP S/4HANA: A_SalesOrder + A_SalesOrderItem
- Monitor fulfillment — PartnerMCP: picking · shipping · returns
- Shipment — SAP S/4HANA: A_OutbDeliveryHeader
- Fulfill + tracking — Shopify: Fulfillment
- Inventory levels — Shopify: InventoryLevel
- Refunds & cancellations — SAP S/4HANA: API_CREDIT_MEMO_REQUEST_SRV
What syncs, and which way.
Every record that moves between Shopify and S/4HANA: what starts it, and what it produces on the other side.
Shopify to SAP S/4HANA:
Order → A_SalesOrder + A_SalesOrderItem- When
- orders/paid webhook, HMAC-verified
- Result
- SAP sales order by deep insert through API_
SALES_ ORDER_ SRV; the SAP order number kept against the Shopify order.
SAP S/4HANA to Shopify:
A_MatlStkInAcctMod → InventoryLevel- When
- Scheduled read of API_
MATERIAL_ STOCK_ SRV for the mapped plants and storage locations - Result
- Shopify’s available quantity set per location with inventory
Set Quantities.
SAP S/4HANA to Shopify:
A_OutbDeliveryHeader → Fulfillment- When
- Goods issue posted (PostGoodsIssue) on the outbound delivery
- Result
- fulfillmentCreate on the order’s FulfillmentOrders.
Shopify to SAP S/4HANA:
Refund → credit memo request- When
- refunds/create webhook
- Result
- A credit memo request through API_
CREDIT_ MEMO_ REQUEST_ SRV, so SAP billing issues the credit memo.
Shopify to SAP S/4HANA:
Return → customer return- When
- returns webhooks, when goods come back
- Result
- A customer return through API_
CUSTOMER_ RETURN_ SRV.
Shopify to SAP S/4HANA:
Cancellation → A_SalesOrder- When
- orders/cancelled webhook
- Result
- Open order canceled by your SAP rule; held for review once a delivery exists.
Field by field.
Every mapping PartnerMCP proposes, with its transformation and confidence. Rules — keys, reconciliation, duplicate guards — carry no confidence: they’re decided and approved, not inferred.
Order.
name to A_
Sales Order. Purchase Order By Customer Customer reference (#1001), checked before every create
94% confidenceOrder.
customer to A_
Sales Order. Sold To Party One SAP customer per shopper, or your shared web-sales customer
85% confidenceStore /
market rule to Sales
Order Type · Sales Organization · Distribution Channel · Organization Division Fixed per store or market; you approve the rule
RuleThe sales area decides pricing, tax and routing in SAP — never guessed per order.LineItem.
sku to to_
Item. Material Must be set up for the order’s sales area
94% confidenceLine
Item. current Quantity to to_
Item. Requested Quantity Excludes refunded and removed units
93% confidenceLineItem.quantity still counts removed units. Line
Item. discounted Unit Price After All Discounts Set to to_
Pricing Element (manual price condition) Only if your pricing procedure accepts it
70% confidenceOtherwise SAP prices the order and PartnerMCP reconciles it against what Shopify charged.Order.
shipping Address to to_
Partner (ship-to party) Ship-to party with the delivery address
82% confidenceOrder.
shippingLines to to_
Pricing Element (freight) or a freight item Whichever your SAP setup uses
75% confidenceA_
Matl Stk In Acct Mod · plant / storage location to Inventory
Level · available Location by location; inventory
Set Quantities with changeFromQuantity 85% confidenceA_
Outb Delivery Header · goods issue to Fulfillment (fulfillment
Create) On the order’s FulfillmentOrders
90% confidenceRefund
to API_
CREDIT_ MEMO_ REQUEST_ SRV Refunded lines and amounts → credit memo request
85% confidence
Edge cases, handled.
What goes wrong between Shopify and S/4HANA in production, and what PartnerMCP does about it.
- 01
Webhooks are not a ledger
Shopify retries a failed delivery 8 times over 4 hours and then deletes a subscription created through the Admin API; deliveries come in no guaranteed order. PartnerMCP verifies X-Shopify-Hmac-SHA256, de-duplicates on X-Shopify-Webhook-Id and runs the reconciliation job Shopify recommends against the GraphQL Admin API.
- 02
Stock writes must be idempotent
Since API 2026-04, inventory
Set Quantities needs an idempotency key and checks the current quantity with changeFromQuantity before it writes. PartnerMCP sends both, so a retried update never double-counts and a stale one fails safely with CHANGE_ FROM_ QUANTITY_ STALE. - 03
Order-level discounts
discounted
Unit Price Set leaves out order-level and code-based discounts; discounted Unit Price After All Discounts Set includes them. When Shopify’s price stands, PartnerMCP uses discounted Unit Price After All Discounts Set; when SAP prices the order, it reconciles SAP’s result against what the customer paid. - 04
Cancellations meet document flow
SAP’s V4 Sales Order API can’t delete whole orders, and an order with a delivery is already part of SAP’s document flow. A Shopify cancellation becomes the cancellation your SAP process defines — never a delete — and once a delivery exists, it goes to review instead.
- 05
Older orders need permission
Shopify exposes only the last 60 days of orders by default. Bringing older ones into SAP needs the read_all_orders scope, which Shopify approves separately — PartnerMCP checks for it before planning a backfill.
- 06
APIs move on both sides
Shopify ships a new API version every quarter and supports each for at least 12 months; SAP’s Public Edition retires APIs between releases — API_
OUTBOUND_ DELIVERY_ SRV now has a successor, API_ OUTBOUND_ DELIVERY_ SRV_ 0002. PartnerMCP pins the versions it tested and plans upgrades as reviewed changes. - 07
Sale-day traffic
Shopify limits GraphQL by calculated query cost — 100 points per second on Standard plans, up to 2,000 for enterprise — and a single query can’t exceed 1,000 points. PartnerMCP queues orders during a sale, creates them in SAP at a steady pace and runs backfills as bulk operations, which bypass query-cost limits.
Questions about Shopify and S/4HANA.
Which SAP — S/4HANA, Business One or Sales Cloud?
This page covers SAP S/4HANA, in the public cloud, private cloud or on-premise. SAP Business One has a different API — the Service Layer, with webhooks since 10.0 FP 2602 — and SAP Sales Cloud is a CRM. PartnerMCP names the exact SAP product in every plan.
Does SAP’s API Policy affect a storefront integration?
SAP’s 2026 API Policy restricts autonomous AI access to SAP APIs; its FAQ puts deterministic, pre-defined call sequences outside that restriction. PartnerMCP plans and tests with AI, and what runs on every order is a reviewed, versioned integration on SAP’s Published APIs. Your SAP agreement has the final word.
Can stock come from several plants?
Yes. Each SAP plant and storage location you map feeds the Shopify location you choose; stock you don’t map isn’t published to the store.
Can Shopify’s MCP servers do this instead?
No. Shopify’s MCP surfaces are buyer-side — catalog, cart and checkout through the Universal Commerce Protocol — or developer tooling. Back-office orders, stock and fulfillment go through the GraphQL Admin API, which is what PartnerMCP uses.
Do we need Shopify Plus?
No. PartnerMCP works within your plan’s GraphQL limits — 100 cost points per second on Standard, 200 on Advanced, 1,000 on Plus — and queues work when a sale pushes past them.
Vendor documentation.
The public documentation behind the technical details on this page.
- Shopify — Order object (GraphQL Admin API)shopify.dev (opens the vendor’s site in a new tab)
- Shopify — inventorySetQuantitiesshopify.dev (opens the vendor’s site in a new tab)
- Shopify — fulfillmentCreateshopify.dev (opens the vendor’s site in a new tab)
- Shopify — webhooksshopify.dev (opens the vendor’s site in a new tab)
- Shopify — API rate limitsshopify.dev (opens the vendor’s site in a new tab)
- SAP — Sales Order (A2X, OData V2) operationshelp.sap.com (opens the vendor’s site in a new tab)
- SAP — sales document APIs in S/4HANA Cloud Public Editionhelp.sap.com (opens the vendor’s site in a new tab)
- SAP — Material Stock APIhelp.sap.com (opens the vendor’s site in a new tab)
- SAP API Policy — FAQsap.com (opens the vendor’s site in a new tab)
Product names and logos are trademarks of their respective owners. Their use indicates compatibility only and does not imply endorsement or partnership.
§06Build
Build this integration.
Start from this plan, or change it in your own words. PartnerMCP builds it against your Shopify and S/4HANA: sandbox first, production when you approve.