How to connect on-prem SAP Business One without opening a port
Install the On-site connector on a Windows machine that can reach SAP Business One and pair it with a one-time code. It only makes outbound HTTPS connections, so SAP Business One stays behind your firewall with no port to open.
About SAP Business One.
SAP Business One is SAP's ERP for small and midsize companies, covering financials, sales, purchasing, inventory, production and CRM in one application. It runs on Microsoft SQL Server or SAP HANA, either on your own servers or hosted by an SAP partner, for example as SAP Business One Cloud.
Users are licensed by type, such as Professional, Limited (in a CRM, Financial or Logistic role), Starter Package, Mobile Application and Indirect Access users, each with different rights. Each company is its own database, and integrations reach it through the DI API, a COM interface for Windows, or the Service Layer, an OData web service built on the same DI core.
Portal by Webisoft is a B2B portal for SAP Business One: customer self-service and team apps on live SAP Business One data.
Why connecting to SAP Business One is hard.
Business One installed on your own server keeps its Service Layer on port 50000 inside your network, and publishing it for each cloud tool is what IT pushes back on.
Sessions instead of tokens
The Service Layer works with sessions: a login to one company database returns a B1SESSION cookie that every request must carry, plus a ROUTEID cookie that keeps requests on the same node behind its load balancer. An idle session times out after 30 minutes by default, and SAP calls login a heavy job in Business One, so an integration has to keep and renew its session rather than sign in per call.
Less than the DI API can do
Compared with the DI API, the Service Layer cannot run direct SQL record sets, has no transactions that span several requests, and does not see a new user-defined field, table or object until it is restarted. Queries return 20 records per page unless the client asks for a larger page.
API access is its own license type
SAP's terms for SAP Business One Cloud define an Indirect Access User as a user authorized to access Business One through its application programming interfaces only, and build those rights into Professional, Limited and Starter Package users. A separate indirect access instance covers connections used by non-employees, so the right license depends on who the integration serves.
Two databases, two dialects
Business One runs on SAP HANA or Microsoft SQL Server, and the Service Layer does not behave identically on both: SQL view exposure applies only to release 10.0 on SQL Server, and SQL written for one database does not necessarily run on the other, so custom queries often come in two versions.
Your options.
| Option | Fits when | Watch out for |
|---|---|---|
| Native SAP Business One add-ons | You need one narrow function and an add-on covers it. | Each add-on is its own product to license, learn and upgrade. |
| Generic integration platform | You have someone in-house to build and maintain the flows. | You still build the screens, the AI layer and the SAP Business One write rules yourself. |
| Custom code | The need is unique and you have developers who know SAP Business One. | Upgrades and staff changes put the integration at risk. |
| Portal by Webisoft | You want customers, your team and AI agents working on live SAP Business One data. | It works on top of SAP Business One; it does not replace it. |
How Portal reaches SAP Business One.
Portal connects to SAP Business One through the Service Layer, SAP's OData API, on SAP HANA or Microsoft SQL Server. Your administrator enters the Service Layer address, the company database and a Business One user for Portal; Portal logs in, keeps the session and its cookies, and logs in again once when the Service Layer drops an idle session. For a server inside your network, the On-site connector relay calls the Service Layer from inside and only makes outbound connections, so nothing is published to the internet.
Every document Portal creates carries a portal marker in its remarks, searched before each create, so a retry finds the first document instead of adding another. An accepted quote becomes a sales order whose lines are copied from the quotation, which closes the quotation in Business One. Portal payments are posted as incoming payments applied to the paid A/R invoices, and a frozen business partner is treated as on credit hold, or as inactive if you choose.
What you need.
- SAP Business One with the Service Layer running, on SAP HANA or Microsoft SQL Server
- A Windows Server 2016 or later, or Windows 10 or later, machine on the same network
- Outbound HTTPS from that machine to Portal
Step by step.
Your Portal team sets up the SAP Business One connection with you during onboarding, so the first step is done together. The rest is yours to change any time.
Generate a pairing code
In Portal, ERP, On-site connector, an admin chooses Generate pairing code. It works once and expires after 15 minutes.
Install and pair the agent
Install the On-site connector on the Windows machine, then in an admin command prompt run portal-on-site pair with the code.
Reach the Service Layer through the relay
Run portal-on-site configure relay, choose the SAP Business One connector and enter the Service Layer address as the agent sees it on your network, for example https://b1server:50000/b1s/v1. In Portal, set the SAP Business One connection to go through the agent. The company database, user and password stay the same.
Test, start and watch
Run portal-on-site test, start the Portal On-site Connector service, then check ERP, Sync health in Portal for the connector status and the data received.
What syncs with SAP Business One.
| Record | Read | Write back | Note |
|---|---|---|---|
| Business partners (customers) | Yes | Yes | Frozen partners are on credit hold, or inactive if you choose |
| Contact persons and addresses | Yes | No | Bill-to and ship-to addresses |
| Items | Yes | Yes | |
| Price lists and special prices | Yes | No | Period and volume discounts are not read |
| Stock by warehouse | Yes | No | In stock, committed and ordered |
| Sales quotations | Yes | Yes | Accepted quotes become an order copied from the quotation lines |
| Sales orders | Yes | Yes | |
| A/R invoices | Yes | Yes | Created from their base order or delivery lines |
| Incoming payments | Yes | Yes | Applied to the paid invoices; a surcharge stays on account |
| Deliveries | Yes | Yes | With shipping type and tracking number |
| Returns | Yes | Yes | |
| Purchase orders | Yes | Yes | New orders, plus delivery dates and quantities |
| Attachments | No | Yes |
What you can do next.
- IT approves the setup because SAP Business One gets no inbound rule and no VPN.
- When the server moves, revoke the old agent and pair a new one with a fresh code.
SAP Business One questions, answered.
Does SAP Business One need to be on the internet?
No. The agent calls out to Portal over HTTPS; nothing calls in.
What does the agent log?
For relayed requests, only the method, path, status and duration, kept on the machine for 14 days. Its secrets are encrypted on that machine.
How do we know it is working?
ERP, Sync health shows the connector online or offline, what it sent in the last 24 hours and any failed batches you can try again.
Keep going.
- Connect an on-prem ERP safely: overview
- B2B portal for SAP Business One
- Connect an AI agent to your ERP, SAP Business One
- Automate order entry from email, SAP Business One
- Take invoice payments online, SAP Business One
- Give customers order status, SAP Business One
- Build a B2B ordering portal, SAP Business One
- Quotes customers accept online, SAP Business One
- Triage a shared inbox, SAP Business One
- Add approval workflows, SAP Business One
- One REST API for your ERP, SAP Business One
- Connect an on-prem ERP safely, SAP S/4HANA