Systems integration

Which SAP Business One interface should your integration use?

Choose Service Layer, DI API, or B1if for a store, portal, or app. Check hosting, licensing, order approvals, and upgrades before you build.

Choose where the integration will run

SAP Business One can exchange data through the Service Layer, the Data Interface API (DI API), and the integration framework (B1if). Some installations also exchange files. Each interface makes different demands on the host, network, and team that maintains the connection. A demo with a few orders tells you little about how the system will handle an upgrade or a burst of 500 orders in an hour.

Start with the store, portal, field app, or warehouse task the integration supports. Ask your SAP partner which feature package, database, licenses, and network access apply. Agree where you will run a test before a change reaches live orders.

Service Layer for web services and apps

The Service Layer exposes Business One records such as business partners, items, orders, invoices, and incoming payments through OData over HTTPS. An integration service can use a stack that supports HTTPS, session cookies, and the operations it needs.

The API reference shows how a session starts with POST /b1s/v2/Login using the company database, username, and password. Send the required B1SESSION cookie on subsequent requests. ROUTEID is optional and helps requests reach the same server node. The API reference specifies POST /b1s/v2/Logout. The exercise on SAP Learning shows a GET request instead. Use the reference for the software you run and verify the login and logout in a test company. SAP Learning also shows why a session opened for /b1s/v2 does not authorize a request to /b1s/v1.

The 10.0 release notes and Service Layer guide document changes that affect integrations.

  • FP 2011 added SQL queries on Microsoft SQL Server and SAP HANA through the Service Layer. Use SQLQueries for reads such as reports and lookups. Use Business One objects for records that need to change.
  • FP 2102 added ETags to supported objects and extended SQL query support to user-defined objects and tables. Where the entity supports it, use If-Match to make the change conditional on the version you read. Handle 412 as a conflict and decide whether to show the changed record or ask the user to review it.
  • FP 2108 recommended OData v4. The current API reference identifies FP 2405 as the deprecation point for OData v3 and describes its continued support for compatibility. Start new integrations on v4 where supported.
  • Where supported, use $expand with $select to read only the fields you need from a record and its related data.

DI API for Windows add-ons

SAP's DI API SDK help describes a COM library for extending Business One and integrating external systems. An application such as a .NET tool uses the SAPbobsCOM library on a Windows machine with access to the company database. SAP lists multithreading as unsupported. Verify the client library version and deployment requirements with the partner.

For an existing Windows add-on that relies on DI API, check whether it still meets the task and can be supported before replacing it. A web application would need a Windows component with access to the database. Revisit the choice when you change hosting, upgrade Business One, or add a web channel.

B1if for scenarios maintained in the SAP environment

B1if provides a place to build, deploy, and run scenarios in the SAP environment. Packages contain steps that define how to receive, process, and send information. SAP refers to the directory for system connection details as the System Landscape Directory (SLD).

In SAP's inbound web service example, the framework handles a synchronous call using SOAP 1.1 and WSDL 1.1. The example generates an interface description and inserts an item into Business One. SAP marks the sample templates as unsupported. Identify who can change scenarios, test upgrades, and diagnose failed orders. Ensure more than one person can maintain the packages.

Compare the three interfaces

Ways to integrate with Business One

Ways to integrate with Business One
ItemService LayerDI APIB1if
InterfaceOData v4 over HTTPS, with legacy v3 where supportedCOM library callsScenario packages, including SOAP web services
Where it runsAn integration service with private access to the SAP endpointWindows machine with the library and database accessIntegration framework server
Where it fitsNew stores, portals, apps, and external integrationsWindows add-ons and existing toolsScenarios maintained in the SAP environment
What to checkSession handling and network accessWindows dependency and runtime connectionsWho can maintain and test the scenarios
Confirm supported versions and database combinations with your SAP partner.

Which interface fits where the code runs?

Who runs the integration and how does it reach the ERP?

  • Store, portal, app, or a separate integration serviceEvaluate Service Layer with OData v4 behind an integration API.
  • Existing tool or add-on on a Windows machine inside the networkKeep DI API if the add-on and runtime are supported.
  • Scenarios run and supported in the SAP environmentEvaluate B1if and assign people to maintain it.
Begin with an order, adjustment, or report you can test on the actual installation.

Where an API route is unavailable, use a managed file exchange for tasks such as sending stock levels to a supplier portal overnight. Agree how the receiver can tell a file is ready and how it acknowledges an import. Check duplicate, late, and partially written files and compare totals after importing.

Keep the ERP on a private network

Business One can run on your server or on a partner's infrastructure. A web app hosted elsewhere or a mobile app on a staff phone should call an integration service. Keep ERP credentials on that service. Authorize its caller for specific actions, such as reading prices or creating an order. Set request limits and log the operation and result without logging secrets. Give the service access to Business One over an approved private network or VPN.

If a partner hosts the ERP, confirm ports, allowed network ranges, private access or gateways, and who approves changes. If the agreement excludes installing software on the host, consider where any Windows runtime needed by the DI API could run.

Obtain written licensing terms

The Business One license guide describes the license system. Ask the SAP partner how your contract applies to the planned integration.

  1. What account and license does the Service Layer or DI API need?
  2. Can one integration account serve the store, portal, and app, or does each require its own?
  3. How is access by customers or distributors through a portal licensed?
  4. Which add-on licenses or other terms apply?

Confirm both direct and indirect access before estimating the portal cost. External users may log into the portal while it connects to Business One, but the account arrangement alone does not determine the license. Our distributor ordering portal guide covers what the portal should do.

Agree which records move and when

RecordDirectionWhenWhat to check
ItemsBusiness One to sales channelOn change or on a scheduleInactive items, units of measure, and item groups
PricesBusiness One to sales channelOn change or on a schedulePrice lists, customer-specific prices, and period discounts
StockBusiness One to sales channelOn change or every few minutesCommitted stock, warehouses, and safety margins
OrdersSales channel to Business OneAs they arrive, through a queueDuplicates, approvals, and payment terms
Invoices and statusBusiness One to sales channelOn changePartial deliveries, credit notes, structured invoice references and responses

Test prices for specific customers. Determine whether the price comes from a price list, special price, discount group, or calculated price the integration should obtain from Business One. The base price list may give the wrong result.

Check documents that require approval. For FP 2105, SAP documents a Location response header when the Enable Approval Process in DI setting is used. Use the returned draft reference when applicable. Give the channel a status for an order waiting for approval and test how it becomes a posted document.

Control load and reconcile orders

Set read and write limits based on representative traffic. Retrieve only necessary fields with $select. Cache reference data such as items, price lists, and warehouses on the integration side and refresh it as needed. Send order lines in one document request where possible.

Queue orders and send them at a rate the ERP can sustain. Record the channel reference and its Business One document or draft identifier. Use the same reference for retries and prevent two workers from creating the same order at once. After a timeout, check whether the ERP already recorded it. See the website and ERP integration guide for retry and reconciliation rules.

How a sales channel order reaches Business One

  1. Queue the orderSave the order and its channel reference.
  2. Check for duplicatesPrevent concurrent creation and check that the order has not been recorded already.
  3. Submit the documentSend the order with all lines through a reused Service Layer session.
  4. Check approvalIf approval creates a draft, use the returned Location value where available.
  5. ReconcileMatch the final document number to the channel reference in daily reporting.
Store what each stage needs to retry safely. Test orders that post directly and orders that become drafts.

Reuse an active session for related requests and log in again after expiry. Close it when the batch ends. The API reference gives 30 minutes as the default inactivity timeout and describes how it can be configured. Confirm the setting in your installation.

Test upgrades and electronic documents

Keep a test company database on the intended Business One version. Check changes to objects, fields, and runtime behavior before every upgrade. Test regular orders, timeouts, approvals, and customer-specific prices. Record when each integration last passed and match installed DI API libraries to the supported server version.

If the business exchanges structured invoices, ask finance to confirm the required format, route, and deadline. SAP documents the Electronic Document Service for handling electronic documents. Ask the SAP partner what your version and configuration cover, whether an add-on is required, and how the connection handles receipts, errors, and inbound documents. Test corrections, too. See our guides to e-invoicing platform readiness and e-invoicing data and integrations.

Our API and system integration service builds the mapping, queues, and reconciliation around Business One. We work with the partner responsible for ERP configuration and licensing. Tell us which Business One version and database you run, where it is hosted, and what you want to connect.

Questions buyers ask

Which interface should we use for a new website or app?

Start by evaluating the Service Layer with OData v4. It can serve a web integration over HTTPS and is available for supported SAP HANA and Microsoft SQL Server installations. Retain the DI API for appropriate Windows-based add-ons. Check your installed version and hosting before choosing.

Do integration users need Business One licenses?

An integration that signs into Business One uses an account. Confirm the license for that account, any indirect access requirements for users of the external application, and any add-on licenses. Ask the SAP partner to confirm the terms for your contract and intended use in writing.

How do we verify that Business One can handle our electronic invoices?

Ask the SAP partner which service or add-on supports your installed version and documents. Check the required format and exchange method. Test submission, status updates, corrections, and incoming documents where required, with your own configuration.

Should a mobile app connect straight to the Service Layer?

Give the app a scoped integration API and keep the Service Layer on a private network. The integration service can hold the ERP credentials, verify the app user's rights, and allow only the required operations.

Sources

  1. SAP Business One Service Layer API reference
  2. SAP Learning, signing in and out of the Service Layer
  3. SAP, working with the Service Layer
  4. SAP Business One 10.0 release notes
  5. SAP SDK, Data Interface API
  6. SAP B1if, inbound web service adapter
  7. SAP Business One 10.0 license guide
  8. SAP Business One, Electronic Document Service

Your next chapter

Let’s build
something useful.

A product to launch. A system to improve.
An idea worth exploring. Start with a conversation.