Connect SAP Business One
A SAP Business One that runs on your own servers, behind a firewall, can be connected to Peaky through a Peaky Connector. The connector reaches your Service Layer from inside your network and lets Peaky sign in and read, and nothing else. A Service Layer reachable from the internet needs no connector — see Accounting & ERP.
Before You Start
A connector installed and Connected — see Peaky Connector (On-premise Systems), and Run on Docker, Run on Linux, Run on Windows or Run on Kubernetes. The connector's machine must be able to reach your Service Layer (port 50000 unless you changed it).
A SAP Business One user Peaky signs in with, and the name of the company database to sync. Through a connector, Peaky signs in with a username and password. Signing in with OAuth is not available this way: it goes to your identity provider, which the connector does not reach.
Add SAP Business One to the Connector
Add a target for the Service Layer to the connector's configuration file, /etc/peaky-connector/connector.toml, with the address the connector's machine reaches it at — the Service Layer's address only, without /b1s/v2:
[[target]]
name = "sap-b1"
url = "https://b1.mycompany.internal:50000"
profile = "sap-b1-readonly"Certificates
A Service Layer usually comes with a self-signed certificate, which the connector does not trust on its own. Export that certificate (or the certificate of the authority that issued it) as a PEM file, put it on the connector's machine, and point the target at it with ca_file:
[[target]]
name = "sap-b1"
url = "https://b1.mycompany.internal:50000"
profile = "sap-b1-readonly"
ca_file = "/etc/peaky-connector/b1-service-layer.pem"With Docker, mount the file into the container next to the configuration, as above (see Run on Docker). As a Linux service, keep it next to the configuration, in /etc/peaky-connector/certs; as a Windows service, in C:\ProgramData\Peaky Connector, with the path in single quotes (ca_file = 'C:\ProgramData\Peaky Connector\b1-service-layer.pem'). On Kubernetes, certificates are mounted in /etc/peaky-connector/certs: put the file in a Secret under the key b1-service-layer.pem, set ca_file = "/etc/peaky-connector/certs/b1-service-layer.pem", and give the Secret's name in certificates.secretName with Helm (see Chart settings), or in the manifest's commented-out certs volume. The connector never skips the certificate check; the address in url must match a name on the certificate. See The configuration file.
Restart the connector to load the new target, and check that it reaches the Service Layer:
Docker:
docker restart peaky-connector, thendocker exec peaky-connector peaky-connector check. See Run on Docker.Linux service:
sudo systemctl restart peaky-connector, thensudo systemd-run --wait --pipe --quiet --collect -p EnvironmentFile=-/etc/peaky-connector/connector.env /usr/local/bin/peaky-connector check. See Run on Linux.Windows service:
Restart-Service PeakyConnector, then& 'C:\Program Files\Peaky Connector\peaky-connector.exe' check, in PowerShell as administrator. See Run on Windows.Kubernetes: see Run on Kubernetes, then
kubectl -n peaky-connector exec peaky-connector-0 -- peaky-connector check.
Within a minute, the Connectors tab lists sap-b1 under the connector's Targets.
The sap-b1-readonly profile
With profile = "sap-b1-readonly", the connector lets through only:
signing in to the Service Layer and signing out again,
reading records, and
reading the posting periods, which Peaky uses to know how far your books are closed.
Everything else is refused at the connector, whatever rights the SAP Business One user has: creating, changing, closing or cancelling documents, any other action, and batches of requests. Peaky's sync only ever reads, so it needs nothing more.
The profile decides what kind of request is allowed, not which records can be read: that is still up to the user's authorizations in SAP Business One.
Connect SAP Business One Through It
Find SAP Business One under the Accounting & ERP tab on the Integrations page and click Connect.
Under Where does your SAP Business One run?, choose On your own network, through a Peaky Connector.
Choose the Connector. The Target is filled in from what the connector reported —
sap-b1unless you named it differently. Only targets with the sap-b1-readonly profile are offered, and the connector has to have connected once since you added it.Fill in the Company database, Username and Password, and click Connect.
Peaky signs in through the connector to check the details before saving them, and queues the first sync. From here, SAP Business One works as it does without a connector. The password is stored in Peaky like any other integration's credentials, not on the connector.
Troubleshooting
Connecting SAP Business One says | Likely cause | What to do |
|---|---|---|
The connector is not connected to Peaky | The connector is stopped, or its machine or network is down | Start it again (see Run on Docker, Run on Linux, Run on Windows or Run on Kubernetes), wait until it shows Connected, then try again |
The connector refused the request | The configuration has no target of that name, or it lacks | Check the target's |
The connector has not reported a target of this name with the sap-b1-readonly profile | The target is missing, has another profile, or was added after the connector last connected | Add |
Could not reach the Service Layer at this address | The connector cannot reach the Service Layer, or does not trust its certificate | Run |
The Service Layer refused these details | The company database, username or password is wrong | Check them by signing in to SAP Business One with the same user |
Signed in, but this user cannot read the chart of accounts | The user lacks authorizations for the financials | Give the user read access to the chart of accounts and journal entries |
For problems with the connector itself, see Troubleshooting on the connector's page.