Integration Library
SAP Business One and B2B Dealer Portals: Service Layer and Data Flow
Architecture, data access and security decisions when planning a dealer portal through SAP Business One Service Layer.
- SAP Business OneMaster records and commercial rules
- Authorised integration serviceMapping, queuing and result checks
- Dealer portalPermitted views and transaction requests
For a business using SAP Business One, a dealer portal's value lies in reliably presenting the right ERP information to customers. However, establishing connectivity and running the business process correctly are different things. Order approval, pricing and data permissions must be designed from the outset.
What does Service Layer provide?
SAP Business One's Service Layer API Reference describes the service layer as a data API accessible through OData. SAP's current documentation states that OData v3 is deprecated as of FP 2405, with OData v4 as the primary protocol. Do not guarantee one integration method without verifying the installation and feature package.
Recommended architecture
A dealer's browser should not connect directly to the ERP. Use a separate backend that handles authentication, role checks, field-level access and rate limiting. It sends requests to the ERP with suitable permissions and returns only the data required.
- Map dealer accounts to SAP business partner records.
- Define which products and prices appear in the catalogue.
- Define warehouse and reservation rules for stock quantities.
- Split order creation into “request → validation → ERP acceptance”.
- Test errors, timeouts and duplicate-record scenarios.
- Define how the portal behaves during ERP maintenance.
Architecture decision table
| Question | Why does it matter? |
|---|---|
| Are the ERP version and Service Layer access available? | Determines which protocols and endpoints can be used |
| Are there multiple warehouses? | Changes the available-stock calculation |
| How does dealer-specific pricing work? | Prevents unauthorised price visibility |
| When is an order finalised? | Prevents misleading success messages |
| How are order changes reported? | Maintains consistency between portal and ERP |
A critical real-world test
Measure a scenario where two dealers order the same product simultaneously. The system must respect the business's stock and approval rules, not merely appear fast on screen.
Does HTTP success mean the order is approved?
Not always. In the order creation flow documented for SAP Service Layer, an active approval procedure may create a draft rather than an order. Checking only the response code is therefore insufficient; verify the resulting object, reference and business status. SAP Service Layer API Reference.
Example scenario: A dealer's order requires approval because of its amount. The portal displays “Awaiting approval”, not “Order completed”. Once an authorised person approves it, the link to the final ERP record is updated. If the outcome is uncertain, search for the external reference before creating it again.
| Data | Decision owner | Portal responsibility |
|---|---|---|
| Business partner/account code | ERP owner | Map it to the signed-in dealer on the server |
| Price, tax and sales unit | Approved commercial rules | Distinguish displayed prices from final amounts |
| Draft/order status | ERP approval workflow | Show the verified status |
| Service access | IT owner | Keep ERP credentials out of the browser |
General scoping decisions are covered in the ERP integration planning guide.
What must be ready on the SAP side before a pilot?
This guide covers the SAP Business One 10.0 Service Layer approach, not SAP S/4HANA integration. Record the feature package/patch, database type, Service Layer installation, company database and OData version. Verify service access, required user permissions and licence eligibility with the client's SAP owner; the existence of an API endpoint does not grant a licence right.
A pilot needs a test company, dealer-to-business-partner mapping, warehouse and price list, an order approval procedure and least-privilege access. If a session starts but the next read is rejected, use the Service Layer 401 session guide. Credentials and session cookies must not be exposed in browsers or support screenshots.
Example scope: Products, stock, prices and account balances are read from the ERP; the portal's order request is validated there. Changing account records or prices in both directions requires separate permission and conflict decisions. If an existing portal supports this flow and its approval statuses, custom development is not essential; additional dealer hierarchies or approval flows should be assessed as scope gaps.
If a Service Layer session opens but the next request returns 401
This check applies to Service Layer clients that authenticate with Login. First verify requests use the same server, company and API version, and session information is carried into subsequent calls. The session may also have expired or been closed. SAP's session lifecycle example demonstrates switching API versions and denied access after Logout.
Perform a read that changes no data using a controlled new session. If reads work but writes are rejected, investigate operation permissions separately; do not grant administrator access to every user. If the same session is lost behind a proxy, ask the system administrator to check cookie and header forwarding. Do not log session values. If a write's outcome is uncertain, signing in again does not make recreating the order safe; search for the record by reference first.
Sources and verification
Example flows are architectural recommendations, not claims of completed client projects or vendor partnerships. Technical sources checked: 17 October 2026. Installation version, licence and permissions must be verified separately.
Adapt it to your business workflow
ERP integration planning guide. Explore the B2B portal development scope for further reading; we can assess your current process together.
Let's discuss your needs →