Short answer
Custom Shopify–SAP Business One integrations usually talk to the SAP Business One Service Layer, an OData-based REST API built on the same object layer as the DI API. Sessions start with a login and are kept with the B1SESSION cookie; the idle session timeout defaults to 30 minutes and is configurable, so the integration must reuse sessions and log in again cleanly on expiry. Because Business One doesn't push changes to Shopify on its own, plan scheduled change detection (or your partner's event tooling) for stock and shipments, use the Shopify order ID as a searchable reference to prevent duplicates, and keep partner-built add-ons in mind — most Business One customers work through an SAP partner.
SAP Business One integration surface at a glance (documented by the vendor; see sources)
- API
- SAP Business One Service Layer: an OData-based web API whose core is the same object interface used by the DI API.
- Sessions
- A session starts with a login request and ends with logout; the B1SESSION cookie is sent with later requests.
- Session timeout
- Idle timeout per session defaults to 30 minutes and is set in the Service Layer configuration (b1s.conf).
- Change events
- No built-in push to Shopify: plan scheduled change detection or partner event tooling.
- Shopify Orders
- Integration service Queue
- SAP Business One Sales orders
SAP Business One is a common ERP for small and mid-size distributors and manufacturers that add a Shopify store — often alongside wholesale and EDI. It has no Shopify connector of its own, so integrations come from SAP partners, integration platforms, or custom builds. This page covers what any of those must handle on the Business One side. As on every page, documented marks statements from SAP or Shopify documentation, and recommendation marks our guidance.
The Service Layer
Documented: the SAP Business One Service Layer is an OData-based web API. SAP describes its core as the same interface used by the SAP Business One DI API, with identical object definitions. A session starts with a login request and ends with a logout request; after login, the B1SESSION cookie must be sent with subsequent requests (a ROUTEID cookie supports session stickiness in load-balanced setups).
Documented: the Service Layer’s session timeout is an idle timeout per session, 30 minutes by default, configured by the administrator in the Service Layer configuration file; configuration changes take effect after a Service Layer restart.
Recommendation:
- Use a dedicated Business One user for the integration with only the permissions it needs.
- Keep one session per worker and reuse it; logging in for every request is slow and can hit license limits.
- On a
401with an invalid-session error, log in again once and retry; if that fails, stop and alert. - Always log out when a batch ends, so sessions don’t accumulate.
POST https://{server}:50000/b1s/v1/Login
Content-Type: application/json
{ "CompanyDB": "{company}", "UserName": "{integration_user}", "Password": "{secret}" }
POST https://{server}:50000/b1s/v1/Orders
Cookie: B1SESSION={session}; ROUTEID={route}
Content-Type: application/json
{
"CardCode": "WEBUS",
"NumAtCard": "SHOP-US-5551234",
"DocDueDate": "2026-10-30",
"DocumentLines": [{ "ItemCode": "TSHIRT-BLK-M", "Quantity": 2 }]
}
Illustrative only. Ports, version paths, required fields, user-defined fields, and numbering series depend on your installation — confirm with your SAP partner and the Service Layer metadata.
Orders without duplicates
Documented (Shopify): Shopify webhooks can be delivered more than once.
Recommendation: put the Shopify order ID (with a per-store prefix) in a searchable reference such as the customer reference number on the sales order, keep your own processed-events table, and query Business One for that reference before retrying an uncertain create. See preventing duplicate orders.
Getting changes out of Business One
Recommendation: stock, shipments, and price changes need to flow from Business One to Shopify, and a standard setup won’t push them for you. Common patterns:
- Scheduled change detection: every few minutes, query items, stock, and delivery documents updated since your last checkpoint (scheduled synchronization).
- Partner or platform event tooling: some partners and integration platforms provide event mechanisms for Business One; evaluate them for latency and reliability.
- Daily full reconciliation of stock per warehouse, whichever pattern you choose.
Respect Shopify’s rate limits when pushing large stock updates — batch them and send only changed quantities.
Inventory, fulfillment, and accounting
Recommendation:
- Warehouses: map each Shopify location to one Business One warehouse; publish available quantities (on hand minus committed) with safety buffers.
- Fulfillment: when the delivery is posted in Business One, create the Shopify fulfillment with carrier and tracking.
- Tax: post the sales tax Shopify or your tax engine calculated at checkout; don’t recalculate it (sales tax guide).
- Payouts: reconcile Shopify Payments payouts as net deposits with fees booked separately (reconciling payouts).
- Add-ons and UDFs: list the user-defined fields and add-ons that touch sales documents before mapping — they are where most surprises come from.
Common pitfalls
- Logging in on every request and running out of sessions or time.
- Expired sessions handled as permanent failures instead of a clean re-login.
- No change detection for stock and shipments, so Shopify drifts.
- Duplicate orders after timeouts without a reference lookup.
- Ignoring partner customizations (UDFs, numbering series, approval procedures) that reject API documents.
Frequently asked questions
Which API should a Shopify integration use with SAP Business One?
For new web-based integrations, the Service Layer — SAP Business One's OData-based web API — is the usual choice. SAP documents that its core is the same object interface the DI API uses, so business objects behave consistently. The DI API remains relevant for some on-premise and add-on scenarios.
Why does my integration get "Invalid session" errors from the Service Layer?
Service Layer sessions expire after an idle period (30 minutes by default, configurable by the administrator), and requests must carry the B1SESSION cookie from the login. Reuse one session per worker, refresh it before it expires or log in again on a 401, and always log out when a job ends.
Can SAP Business One send stock changes to Shopify in real time?
Not by itself in a standard setup. Integrations typically detect changes on a schedule — for example querying items or documents updated since the last run — or use event tooling provided by an SAP partner or integration platform. Plan for a few minutes of lag and use safety buffers on fast sellers.
Do I need an SAP partner?
Most SAP Business One customers buy and run it through a partner, who also knows the customer's add-ons, user-defined fields, and numbering series that the integration must respect. Involve them early, even if the integration itself is built in-house.
Sources and further reading
Platform-specific statements on this page were checked against these sources on . Vendor APIs change; confirm details in the current documentation before you build.
- [1] Working with SAP Business One Service Layer — SAP
- [2] Managing Service Layer Settings — SAP Help Portal
- [3] Shopify webhooks — Shopify
- [4] Shopify API rate limits — Shopify
Related reading
- Platforms Shopify ERP Integration How Shopify connects to an ERP — the GraphQL Admin API, webhooks, inventory states, fulfillment orders, rate limits — plus the sync patterns and pitfalls that matter.
- Comparisons Custom ERP Integration vs. Off-the-Shelf Connectors Compare building a custom ecommerce-ERP integration with buying a prebuilt connector — fit, cost over time, flexibility, support, and the questions to ask vendors.
- Concepts What Is Scheduled Synchronization? How scheduled, batch-based synchronization works in integrations, how to design checkpoints and windows, and where it fits alongside event-driven updates.
- Guides How to Prevent Duplicate Orders in an ERP Integration Why ecommerce integrations create duplicate ERP orders — duplicate webhooks, retries after timeouts, races — and the layered defenses that stop them.
- ERP integrations Shopify Business Central Integration: Connector, APIs, and Limits How Shopify integrates with Dynamics 365 Business Central — the built-in Shopify Connector, API v2.0, Entra ID auth, expiring webhooks, and per-user API limits.
- Templates Ecommerce ERP Integration Launch Checklist What to verify before the first real order flows into your ERP — and who signs it off.