ml-connector
SAP Business OneOrderful

SAP Business One and Orderful integration

SAP Business One runs purchasing, inventory, and finance for mid-market manufacturers and distributors. Orderful routes EDI documents to trading partners. Connecting the two automates your purchase order transmission to suppliers and brings EDI invoices and ship notices from Orderful back into SAP Business One without re-keying. ml-connector handles the SAP Business One on-premise deployment model, session token management, and Orderful EDI routing so your procurement stays in sync with your suppliers.

How SAP Business One works

SAP Business One is deployed on-premise at a customer-specific Service Layer URL (https://<customer-server>:<port>/b1s/v2/) and exposes PurchaseOrders, Invoices, BusinessPartners, Items, and ChartOfAccounts through OData v4 REST. Authentication is via a session token (POST /Login returning a B1SESSION cookie that expires after 30 minutes of inactivity) or OAuth 2.0 if the customer instance is v10.0 FP 2305 or later and has IAM configured. Webhooks are supported in v10.0 FP 2602 and later, but polling via GET with an UpdateDate filter is the recommended default approach because webhook setup requires SAP admin configuration. Session tokens are reused rather than obtained per request to avoid cold-start delays.

How Orderful works

Orderful is a cloud-based EDI platform accessed via REST API at https://api.orderful.com (US) or https://api-eu.orderful.com (EU), with versioned endpoints (/v4 for create and inbox operations, /v3 for list and retrieve). Authentication is via a static API Key passed in the orderful-api-key header with no token refresh required. Orderful accepts EDI documents (X12 and EDIFACT) through /v4/transactions/create and routes them to trading partners via AS2, SFTP, VAN, or HTTP. Inbound EDI documents arrive at your registered webhook endpoint or can be pulled via GET /v3/polling-buckets. Transactions are routed by ISA identifiers (sender.isaId and receiver.isaId) and flagged as test or live via the stream field.

What moves between them

Purchase orders and invoices originating in SAP Business One are translated to X12 850 (Purchase Order) and 810 (Invoice) EDI transactions and sent to Orderful for routing to suppliers. Inbound EDI ship notices (856) and supplier invoices (810) received through Orderful webhooks or polling are translated back into SAP Business One as inbound documents linked to the original purchase order. The sync runs on a schedule aligned with your procurement calendar rather than continuously, allowing batch processing of supplier responses.

How ml-connector handles it

ml-connector stores the SAP Business One Service Layer URL and credentials (session token obtained via POST /Login) and the Orderful API Key, each encrypted and separate from the other system's secrets. SAP Business One session tokens expire after 30 minutes of inactivity and are refreshed on demand before each API call, and sessions are reused across requests to avoid the ~5 second cold-start penalty. On the Orderful side, every transaction includes the correct ISA identifiers for each supplier, sourced from the SAP Business One BusinessPartner record. Outbound documents from SAP Business One are transformed to EDI format and submitted to Orderful with stream set to test during development and live in production. Inbound EDI from Orderful is received either via webhook (if your Orderful account is configured with a public endpoint) or by polling /v3/polling-buckets every 5 to 10 minutes, parsed, and matched to the original SAP Business One purchase order before posting as an inbound transaction. Because SAP Business One has no published idempotency scheme, duplicate detection uses the document number (DocNum) before retry. Every record carries an audit trail of its translation and routing state.

A real-world example

A mid-market plastics distributor runs SAP Business One for purchasing and inventory, and ships to 40 regional distributors across North America who all require EDI. Before the integration, the procurement team exported purchase orders from SAP Business One to a spreadsheet, manually mapped them to X12 850 format, and sent them via Orderful to each distributor. When a distributor replied with an invoice (810) or ship notice (856) via Orderful, the team downloaded the EDI file, translated it by hand, and entered it back into SAP Business One. With SAP Business One and Orderful connected, each purchase order exports automatically as an X12 850 and Orderful routes it to the correct distributor. Inbound EDI ship notices and invoices flow back into SAP Business One automatically, linked to the original order, eliminating the manual translation step and reducing data-entry errors.

What you can do

  • Export SAP Business One purchase orders and invoices to Orderful as X12 EDI transactions routed to each supplier.
  • Receive inbound EDI documents from Orderful (ship notices, invoices) and post them into SAP Business One linked to the original purchase order.
  • Manage SAP Business One session token authentication with automatic refresh and reuse to avoid cold-start delays.
  • Route each EDI transaction through Orderful with the correct ISA identifiers sourced from SAP Business One business partners.
  • Run on a schedule aligned with your procurement calendar with full audit trail and error replay for every document.

Questions

How does ml-connector handle SAP Business One session token expiry?
SAP Business One session tokens expire after 30 minutes of inactivity and return error code -5002 when expired. ml-connector checks the token age before each API call and refreshes it by re-running POST /Login if needed. Tokens are reused across multiple requests to avoid the ~5 second cold-start penalty of each login.
What data moves between SAP Business One and Orderful?
Outbound: purchase orders and invoices from SAP Business One are translated to X12 850 and 810 EDI format and sent to Orderful for routing to suppliers. Inbound: EDI ship notices (856) and supplier invoices (810) received through Orderful are translated back into SAP Business One as inbound documents. The original purchase order links in SAP Business One are preserved so you can trace each shipment and invoice back to the order.
Does ml-connector support SAP Business One webhooks or polling?
SAP Business One webhooks are supported only in v10.0 FP 2602 and later and require server-side Webhook Messenger Service activation, which is an SAP admin task. ml-connector defaults to polling using OData v4 GET with an UpdateDate filter on a schedule aligned with your procurement calendar. If your SAP Business One instance has webhooks enabled, ml-connector can be configured to receive them instead.

Related integrations

Connect SAP Business One and Orderful

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

Get started