Web/Guru

Shopify SAP integration: Business One and S/4HANA via connector, middleware or custom app

Connect Shopify to SAP Business One or S/4HANA: what syncs, connector vs iPaaS vs custom app, SAP APIs, sync timing, rate limits and B2B price lists.

Published
Updated
December 1, 2026
Read time
12 min read
Written by
Webguru
Shopify SAP integration: Business One and S/4HANA via connector, middleware or custom app
/On this page01 / 12

There are three ways to integrate Shopify with SAP: a ready-made connector, an integration platform (iPaaS or middleware) that maps data between the two systems, or a custom app built on Shopify's GraphQL Admin API and webhooks that calls SAP's own APIs. Which one fits depends first on which SAP you run. SAP Business One exposes the Service Layer, a REST API based on OData. SAP S/4HANA exposes standard OData APIs such as Sales Order (A2X). They're different products with different integration options.

Whichever route you pick, the flows are the same: orders and customers go from Shopify to SAP, and stock, prices and fulfilments come back. This guide covers Business One versus S/4HANA, what a Shopify SAP integration syncs, the three routes, sync timing and rate limits, B2B price lists, a decision table and a go-live checklist. For the general picture across ERPs, see our Shopify ERP integration guide.

The short answer

  • SAP Business One, standard order-to-cash: start with a connector or an integration platform template, and check exactly which flows it covers. Coverage varies a lot between products.
  • SAP Business One with custom pricing, B2B or several stores: a custom app on the Service Layer, or a connector plus custom pieces for the gaps.
  • SAP S/4HANA: usually an integration platform your company already runs, or a custom service calling S/4HANA's OData APIs. Expect more setup on the SAP side (communication arrangements, users and authorisations).
  • Any route: decide which system owns each piece of data before anyone configures a mapping.

SAP Business One vs SAP S/4HANA: why it changes the integration

SAP Business OneSAP S/4HANA
Main API for integrationsService Layer: HTTP and OData (versions 3 and 4), JSON payloadsStandard OData APIs, for example Sales Order (A2X) and Business Partner (A2X)
Base path/b1s/v1 for OData v3, /b1s/v2 for OData v4Per API, for example /sap/opu/odata4/sap/api_salesorder/srvd_a2x/sap/salesorder/0001/ for Sales Order (A2X, OData V4)
AuthenticationLog in to get a B1SESSION cookie; sessions time out after 30 idle minutes by defaultIn S/4HANA Cloud Public Edition, a communication system, communication user and communication arrangement based on a communication scenario
Business objects you'll useOrders, Items, BusinessPartners, DeliveryNotes, Invoices, CreditNotes, ReturnsOne API per object, for example Sales Order (A2X) and Business Partner (A2X)
Push eventsWebhooks, as of SAP Business One 10.0 FP 2602, disabled by default and delivered by the Webhook Messenger serviceDepends on your landscape; plan for scheduled polling unless you already run eventing
Typical Shopify routeConnector, iPaaS template or custom appiPaaS or custom service

SAP Business One and the Service Layer

SAP describes the Service Layer as an extension API built on HTTP and OData that runs on SUSE Linux Enterprise or Microsoft Windows (as of SAP Business One 10.0 PL01). A client logs in with the company database, user name and password, and gets a B1SESSION cookie that it sends with every request. The default idle timeout is 30 minutes, so a long-running integration needs to log in again when a session expires.

Two details matter for Shopify integrations:

  • Paging. Collections come back in pages of 20 by default, with a next link in the response. You can change the page size with the Prefer: odata.maxpagesize header. A stock sync that forgets to follow the next link will silently update only the first 20 items.
  • Webhooks. SAP Business One 10.0 FP 2602 added webhooks to the Service Layer, so SAP can notify your integration when, for example, an order is created or a business partner is updated. They're off by default for each company and need the Webhook Messenger service running. On older releases, poll on a schedule instead.

SAP S/4HANA and its OData APIs

S/4HANA publishes standard APIs per business object. SAP's documentation for Sales Order (A2X, OData V4) shows what that looks like in practice: you create a sales order with a deep insert (header plus items in one request), read with OData query options such as $expand and $filter, and update with PATCH. Updates must send an If-Match header with the entity's ETag. That API can't delete a whole sales order; SAP points to the OData V2 version of the API for that.

In S/4HANA Cloud Public Edition, an external system gets access through a communication system (the external partner), a communication user (the technical user for inbound calls) and a communication arrangement based on a communication scenario. For example, SAP's tutorial uses the scenario SAP_COM_0008, which includes the Business Partner (A2X) API. Budget time for this setup with your SAP team or partner. It usually takes longer than the Shopify side.

What a Shopify SAP integration syncs

DataSystem of recordDirectionShopify sideSAP side (Business One)
OrdersShopifyShopify → SAPorders/create webhook, GraphQL order queriesOrders (sales orders)
Customers and B2B companiesShopify for DTC; SAP for credit termsMostly Shopify → SAPCustomers, companies, company locationsBusinessPartners
StockSAPSAP → ShopifyinventorySetQuantities mutationItem stock per warehouse
Prices and B2B price listsSAPSAP → ShopifyCatalogs, price lists, fixed pricesYour SAP pricing setup
Fulfilments and trackingWhoever shipsUsually SAP → ShopifyFulfillment orders and fulfillmentsDeliveryNotes
Refunds and returnsPick one origin per caseOne direction per caseRefunds and returnsCreditNotes, Returns
ProductsSAP for item data; Shopify for contentSAP → ShopifyProducts and variantsItems

For S/4HANA the Shopify side is the same, and the SAP side uses the matching S/4HANA API for each object. Check SAP's API documentation for your release. Get sign-off on this table from finance and operations. It becomes your test plan. Our NetSuite integration guide has a longer version of the data-ownership table with the failure points to watch.

Route 1: a ready-made connector

Search the Shopify App Store for SAP and you'll find connectors from different vendors, and they cover very different scopes. For example, one App Store listing for SAP Business One syncs items as products and item groups as categories, in one direction, from SAP to Shopify. It says nothing about orders, customers or stock. Read each listing for:

  • Which flows it covers, in which direction.
  • Which SAP product and release it supports (Business One on SAP HANA or Microsoft SQL Server, or S/4HANA).
  • Whether it needs the Service Layer, and who sets that up.
  • How it handles several Shopify stores, warehouses, currencies and B2B pricing.

Good at: standard flows with little setup. Weak at: anything outside its settings, and you depend on the vendor's roadmap.

Route 2: an integration platform (iPaaS)

An integration platform sits between Shopify and SAP and runs flows you configure. Some vendors sell prebuilt templates. Celigo's Shopify to SAP Business One template, for example, lists flows for orders and customers in both directions and items from SAP to Shopify. Its page doesn't mention inventory, fulfilments or refunds, so check those flows in a demo. If your company already runs an integration platform for S/4HANA, adding Shopify to it is often the shortest path.

Good at: configurable flows, error dashboards and room to connect other systems later. Weak at: a second vendor to pay and manage, and deep changes still need someone who knows the platform.

Route 3: a custom app

A custom integration is a small service between the two systems. On the Shopify side, build it on the GraphQL Admin API. Shopify has treated the REST Admin API as legacy since October 1, 2024, and requires new public apps to use GraphQL only since April 1, 2025. On the SAP side, call the Service Layer for Business One or the OData APIs for S/4HANA. Our Shopify ERP integration service builds this kind of service, including the reconciliation jobs around it.

Here's the core of an order flow from Shopify to SAP Business One in Node.js (version 20 or later, no packages). It verifies Shopify's signature, ignores duplicate deliveries, answers Shopify fast and then creates the sales order through the Service Layer:

```js
// shopify-to-b1.mjs: Shopify orders/create webhook -> SAP Business One sales order

import { createServer } from "node:http";

import { createHmac, timingSafeEqual } from "node:crypto";

const { SHOPIFY_SECRET, B1_URL, B1_COMPANY, B1_USER, B1_PASSWORD } = process.env; // B1_URL like https://sap-host:50000/b1s/v2
const seen = new Set(); // use a database table in production

let session = null;

async function b1(path, init = {}, retry = true) {
if (!session) {

const res = await fetch(${B1_URL}/Login, {

method: "POST",

headers: { "Content-Type": "application/json" },

body: JSON.stringify({ CompanyDB: B1_COMPANY, UserName: B1_USER, Password: B1_PASSWORD }),

});

if (!res.ok) throw new Error(Service Layer login failed: ${res.status});

session = res.headers.getSetCookie().map((c) => c.split(";")[0]).join("; ");

}

const res = await fetch(${B1_URL}${path}, { ...init, headers: { "Content-Type": "application/json", Cookie: session, ...init.headers } });

if (res.status === 401 && retry) { session = null; return b1(path, init, false); } // session timed out

if (!res.ok) throw new Error(${path}: ${res.status} ${await res.text()});

return res.status === 204 ? null : res.json();

}

async function createSalesOrder(order) {
// U_ShopifyOrderId is a user-defined field you add to sales orders in SAP Business One

const existing = await b1(/Orders?$select=DocEntry&$filter=U_ShopifyOrderId eq '${order.id}');

if (existing.value.length) return; // already posted

await b1("/Orders", {

method: "POST",

body: JSON.stringify({

CardCode: await cardCodeFor(order), // look up or create the business partner

DocDueDate: order.created_at.slice(0, 10),

U_ShopifyOrderId: String(order.id),

DocumentLines: order.line_items.map((l) => ({ ItemCode: l.sku, Quantity: l.quantity, UnitPrice: Number(l.price) })),

}),

});

}

async function cardCodeFor(order) {
return "WEB-CUSTOMERS"; // replace with your customer mapping

}

createServer((req, res) => {
const chunks = [];

req.on("data", (c) => chunks.push(c));

req.on("end", () => {

const raw = Buffer.concat(chunks);

const expected = createHmac("sha256", SHOPIFY_SECRET).update(raw).digest();

const given = Buffer.from(req.headers["x-shopify-hmac-sha256"] ?? "", "base64");

if (given.length !== expected.length || !timingSafeEqual(given, expected)) { res.writeHead(401).end(); return; }

res.writeHead(200).end(); // answer within Shopify's timeout, then do the work

const id = req.headers["x-shopify-webhook-id"];

if (seen.has(id)) return;

seen.add(id);

createSalesOrder(JSON.parse(raw)).catch((err) => console.error("order sync failed", err)); // send to a retry queue

});

}).listen(3000);

```

In production, put the work on a durable queue, store processed webhook IDs in a database, map tax codes, discounts and shipping lines explicitly, and alert a named person when an order fails. Shopify says webhook delivery isn't always guaranteed and doesn't guarantee ordering, so also run a reconciliation job that compares recent Shopify orders with SAP. Our webhook reliability guide has the full pattern.

For stock going the other way, use the inventorySetQuantities mutation. From API version 2026-04 it requires an idempotency key through the @idempotent directive and a changeFromQuantity for each quantity (or an explicit null to skip the check), and it returns a CHANGE_FROM_QUANTITY_STALE error if the quantity changed since you read it. That protects you from overwriting a sale that happened mid-sync.

Good at: exactly your process. Weak at: you own every bug, every Shopify API version upgrade and every SAP release change.

Sync frequency and rate limits

Decide timing per flow, based on what goes wrong if it's late.

FlowTriggerWhy
Orders to SAPShopify webhook, plus a scheduled reconciliationWarehouses need orders quickly; webhooks can be missed
Stock to ShopifySAP webhook where available (Business One 10.0 FP 2602 or later), otherwise scheduled polling of changed itemsOverselling is the main risk; sync changes, not the full catalogue
Prices and price listsScheduled, plus on demand after a price changePrices change less often; bulk updates are cheaper
Fulfilments and trackingOn delivery creation in SAP, or scheduledCustomers expect tracking emails the same day
Full catalogue and stock checkNightly or weekly bulk jobCatches drift that event-based syncs miss

On the Shopify side, GraphQL Admin API limits are calculated by query cost per app and store: 100 points per second on standard plans, 200 on Advanced, 1,000 on Plus and 2,000 on Shopify for enterprise (Commerce Components). A single query can't cost more than 1,000 points, and Shopify recommends backing off for a second when throttled. Bulk operations don't have those per-query limits, so use them for initial loads and nightly reconciliation. On the SAP Business One side, remember the 20-item default page size, and size the Service Layer for your peak order volume. SAP recommends several Service Layer instances behind a load balancer for higher availability.

B2B price lists

If you sell wholesale, prices usually live in SAP and need to reach Shopify B2B. In Shopify, a catalog decides which products a B2B company location sees, a price list sets the prices for that catalog, and a publication decides which products are visible. A price list can apply a percentage adjustment to all products and fixed prices to specific variants. The priceListFixedPricesAdd mutation accepts up to 250 prices per request, so a large SAP price list is sent in batches. When a company location has several catalogs, the customer gets the lowest applicable price.

Your Shopify plan sets limits here. Basic, Grow and Advanced allow 3 active catalog assignments to active B2B markets, and Plus has no limit. Direct company catalogs, deposits and partial payments are Plus-only. Check which B2B features your plan includes before you design the price list sync. If your SAP pricing uses many customer-specific prices, you may need Plus or a different design.

Decision table

Your situationRoute
Business One, one store, standard retail orders, stock and itemsA connector or iPaaS template that covers all the flows you need
Business One, B2B price lists, payment terms or customer-specific pricesCustom app on the Service Layer, or a connector plus custom pieces
Business One on an older release without webhooksAny route, with scheduled polling for stock and fulfilments
S/4HANA with an integration platform already in placeAdd Shopify flows to that platform
S/4HANA without oneCustom service on S/4HANA's OData APIs, or a new iPaaS if more systems will follow
Several Shopify stores or markets feeding one SAP companyCustom app or iPaaS; check connector licensing per store
Nobody will own code after launchA connector or iPaaS, even if it covers less

Go-live checklist

  1. Sign off the data-ownership table with finance, operations and ecommerce.
  2. Clean SKUs so every Shopify variant matches an SAP item code exactly.
  3. Map warehouses to Shopify locations, and tax codes, payment methods and shipping methods to SAP.
  4. Decide how web customers map to business partners: one per customer, or a shared account for retail orders.
  5. Set up access on the SAP side: Service Layer users for Business One, or communication arrangements for S/4HANA.
  6. Store the Shopify order ID on every SAP document so retries can't create duplicates.
  7. Test orders with discounts, free shipping, several tax rates, foreign currency and B2B terms.
  8. Test partial fulfilment, split shipments, cancellations, partial refunds and returns with restock.
  9. Run a full stock sync and compare quantities per location.
  10. Send alerts to a named person, and schedule a daily reconciliation for the first weeks.
  11. Put the next Shopify API version upgrade and your SAP release plan on someone's calendar.

Want help connecting Shopify to SAP?

We build and fix Shopify ERP integrations: connector reviews, custom apps on the GraphQL Admin API, and the reconciliation and alerting that keep them honest. Tell us which SAP product and release you run, your stores and the flows that hurt today on our Shopify ERP integration service page, and we'll tell you whether a connector will do or a custom build is worth it.

Sources

/Tags#Shopify#SAP#ERP#Integrations

Written by

Webguru

Shopify Development Team

Webguru.pk is a Shopify development team in Lahore, Pakistan, building stores, custom apps and integrations for brands worldwide.

/Share

Need a hand with this?

We design, build and fix this kind of work for Shopify, SaaS and AI products.

/faqs

Shopify SAP Integration: Frequently Asked Questions

Yes. You can connect Shopify to SAP Business One or SAP S/4HANA with a connector, an integration platform, or a custom app built on Shopify's GraphQL Admin API and webhooks that calls SAP's APIs. Orders and customers usually flow to SAP, and stock, prices and fulfilments flow back to Shopify.

The Service Layer, an HTTP and OData API that returns JSON. It supports OData versions 3 and 4, under /b1s/v1 and /b1s/v2. Clients log in to get a session cookie, and sessions time out after 30 idle minutes by default. As of SAP Business One 10.0 FP 2602, it also supports webhooks.

S/4HANA publishes separate OData APIs per business object, such as Sales Order (A2X) and Business Partner (A2X). In S/4HANA Cloud Public Edition, an external system needs a communication system, a communication user and a communication arrangement. The SAP-side setup and authorisations usually take longer than with Business One.

There are App Store listings for SAP Business One, but their scope varies a lot. One listing syncs only items and item groups from SAP to Shopify, with no orders, customers or stock. Check each connector's flows, sync directions and supported SAP release before you commit.

Send orders to SAP as they arrive, using Shopify webhooks plus a scheduled reconciliation. Sync stock changes as soon as practical to avoid overselling, through SAP Business One webhooks where your release has them, or scheduled polling. Prices can sync on a schedule, and a nightly bulk job catches drift.

The GraphQL Admin API allows 100 points per second on standard plans, 200 on Advanced, 1,000 on Plus and 2,000 on Commerce Components, per app and store. A single query can't exceed 1,000 points. Use bulk operations for initial loads and nightly reconciliation, because they don't have per-query limits.

Yes. Map them to Shopify B2B catalogs with price lists, using percentage adjustments and fixed prices per variant. The priceListFixedPricesAdd mutation accepts up to 250 prices per request. Basic, Grow and Advanced allow 3 active catalog assignments to active B2B markets, while Plus has no limit.

Connecting Shopify to SAP?

Tell us which SAP product and release you run and the flows that hurt today. We'll tell you whether a connector will do or a custom build is worth it.

or write to+44 7882 755642