ml-connector
SAP Business OneAdobe Commerce

SAP Business One and Adobe Commerce integration

SAP Business One runs your financials, inventory, and customer master. Adobe Commerce runs your online store. Connecting the two keeps the storefront catalog and your back-office books in agreement without re-keying. Paid orders and their invoices flow from Adobe Commerce into SAP Business One as A/R invoices and incoming payments, while item, price, and stock data flows from SAP Business One out to the Adobe Commerce catalog. ml-connector handles the very different APIs on each side and moves the data on the schedule you set.

How SAP Business One works

SAP Business One exposes business partners, items, A/R invoices, incoming payments, journal entries, and the chart of accounts through the OData v4 Service Layer REST API. Each customer runs their own Service Layer, so the base URL is customer-specific and supplied as a credential rather than derived. Authentication is a session login that returns a B1SESSION cookie, reused across requests and renewed after the 30 minute idle timeout returns error code -5002. Webhooks exist only on version 10.0 FP 2602 and later and require server-side admin setup, so most integrations read records by polling with OData $filter and $top queries.

How Adobe Commerce works

Adobe Commerce exposes orders, invoices, customers, products, and credit memos through versioned REST Web APIs under a /V1/ path, with list endpoints paginated by searchCriteria parameters. PaaS stores authenticate with OAuth 1.0a integration credentials signed with HMAC-SHA256; the SaaS Cloud Service authenticates with IMS OAuth 2.0 client credentials whose tokens expire in about 24 hours. Adobe Commerce supports synchronous outbound webhooks signed with an HMAC SHA256 header, and Adobe I/O Events for async push. It has no GL account resource, so all general ledger posting is done on the SAP Business One side.

What moves between them

Two flows run in opposite directions. From Adobe Commerce into SAP Business One, ml-connector reads completed orders and their invoices and books them as A/R invoices and incoming payments, each tied to the matching business partner and item lines. From SAP Business One into Adobe Commerce, item, price, and stock changes are pushed to the product catalog so the storefront sells from current data. Customer records are aligned so each store shopper maps to a business partner. Reads from Adobe Commerce run on a schedule, or trigger from a webhook where one is configured; catalog pushes run when SAP Business One items change. Refunds captured as Adobe Commerce credit memos can post back into SAP Business One as offsetting documents.

How ml-connector handles it

ml-connector stores both credential sets encrypted. On the SAP Business One side it accepts the full Service Layer base URL per customer, logs in once to obtain the B1SESSION cookie, reuses that cookie across calls, and re-authenticates when a request returns error code -5002 rather than logging in per request. On the Adobe Commerce side it signs OAuth 1.0a requests for PaaS or refreshes the IMS OAuth 2.0 bearer token before its 24 hour expiry for SaaS. Because SAP Business One webhooks need admin setup that is often absent, order and invoice reads default to scheduled OData polling with an UpdateDate filter, and an Adobe Commerce webhook can trigger the same flow where enabled. SKUs map between the Adobe Commerce sku field and the SAP Business One ItemCode, and shoppers map to a CardCode, so every booked invoice references an item and partner that already exist. Neither side publishes idempotency keys, so before posting an A/R invoice ml-connector checks DocNum to avoid duplicating an order already booked.

A real-world example

A mid-sized specialty goods seller, roughly 60 staff, runs SAP Business One for inventory, purchasing, and finance, and sells direct to consumers on Adobe Commerce. Before the integration, a clerk exported the daily order report from Adobe Commerce and keyed each sale into SAP Business One as an A/R invoice, while product and price edits made in SAP Business One were retyped into the store by hand, so the catalog and the ledger drifted apart and oversold items slipped through. With SAP Business One and Adobe Commerce connected, paid orders post as invoices and payments automatically against the right customer, and item and stock changes reach the storefront on their own. The finance team stops re-keying sales and the catalog stays current.

What you can do

  • Book completed Adobe Commerce orders and invoices into SAP Business One as A/R invoices and incoming payments.
  • Push SAP Business One item, price, and stock changes out to the Adobe Commerce product catalog.
  • Match Adobe Commerce SKUs and shoppers to SAP Business One ItemCode and business partner records.
  • Bridge the SAP Business One session cookie and base URL with Adobe Commerce OAuth 1.0a or IMS OAuth 2.0.
  • Read on a schedule or by webhook, with duplicate checks on DocNum so an order is never booked twice.

Questions

Which direction does data move between SAP Business One and Adobe Commerce?
Both directions. Completed orders and invoices move from Adobe Commerce into SAP Business One as A/R invoices and incoming payments, while item, price, and stock data moves from SAP Business One out to the Adobe Commerce catalog. Customer and SKU records are aligned so each order lands on a valid business partner and item.
Does the integration rely on webhooks or polling?
It uses both, with polling as the reliable default. SAP Business One webhooks exist only on version 10.0 FP 2602 and later and need server-side admin setup, so order and invoice reads default to scheduled OData polling with an UpdateDate filter. An Adobe Commerce webhook can trigger the same flow as soon as an order completes where one is configured.
How does ml-connector handle the SAP Business One session and the Adobe Commerce token?
ml-connector logs in once to SAP Business One, reuses the B1SESSION cookie across requests, and re-authenticates only when a call returns the -5002 session expiry code. On the Adobe Commerce side it signs each OAuth 1.0a request on PaaS, or refreshes the IMS OAuth 2.0 bearer token before its roughly 24 hour expiry on the Cloud Service, with both credential sets stored encrypted.

Related integrations

Connect SAP Business One and Adobe Commerce

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started