Connect SAP Business One: pull orders and customers in, check inventory
Fill in the Service Layer URL without the /b1s/v2 suffix, the CompanyDB, and a B1 username and password, then test, map, and activate — orders and customers flow in and inventory can be checked.
The SAP Business One connector signs in to your B1 Service Layer with a session login and pulls orders and customers into the system, and it can check inventory in SAP Business One. Inventory cannot be pushed back into SAP Business One from here yet, so use this connection to bring orders and customers in and to look up stock. One connection points at one CompanyDB.
Prerequisites#
- An SAP Business One system where the Service Layer is available, and you know its address, for example https://b1server:50000.
- The exact name of the company database you want to connect to, the CompanyDB, for example SBODemoUS.
- A B1 user in that CompanyDB, with API access permission, and its password.
- There is no separate developer key to apply for: the credentials are this B1 user account itself.
Get your credentials#
- Ask your SAP Business One administrator for the Service Layer address. It looks like https://b1server:50000, host and port only. Do not add the /b1s/v2 suffix: the system adds that part itself when it calls the Service Layer.
- Confirm the CompanyDB with the same administrator: it is the company database name used in the Service Layer Login, for example SBODemoUS.
- Get a B1 username and password for that CompanyDB, for example the user manager. The user must have API access permission, otherwise the login and the later reads will not go through.
Fill it into Integration#
- Open Integration → Connector Marketplace → SAP Business One → New connection.
- base_url — required, Service Layer URL: paste the Service Layer address, for example https://b1server:50000. Fill it in the base_url field, only up to the host and port, with no /b1s/v2 suffix.
- company_db — required, CompanyDB: fill in the company database name, for example SBODemoUS. Fill it in the company_db field, exactly as the administrator gave it to you.
- username — required, Username: fill in the B1 username for that CompanyDB, for example manager. Fill it in the username field.
- password — required, Password: fill in the password of that B1 user. Fill it in the password field; it is a password field, so what you type is masked and it is not shown back in the form afterwards.
Test the connection#
Click Test connection. The test first checks the four fields on this side: an empty company_db returns MISSING_CONFIG, and an empty username or password returns MISSING_CREDENTIALS. It then signs in for real: it sends CompanyDB, UserName, and Password to the Login of the Service Layer and takes the SessionId from the reply, and after that it reads one order with that session, Orders with $top=1 and $select=DocEntry, to prove that documents can be read, not only that the login works.
This is a session login, so there is no token to renew by hand. If a later read is answered with 401, the system signs in once more on its own and tries again. The test gives up after 12 seconds, so a timeout usually means the Service Layer address cannot be reached or does not answer in time — check the address first, then test again.
Mapping / pick a template#
Pick the SAP Business One template for pulled orders, so each B1 order lands as a standard order. Before activating, open the preview with one real order and check that the document, its lines, and its quantities match what is in SAP Business One. Customer records pulled from B1 and inventory lookups use the values as they come from SAP Business One, so keep the names and codes in B1 consistent with the products you use here.
Activate#
After activation, Integration pulls new orders and customers from SAP Business One on the schedule you set, and inventory in SAP Business One can be checked from here. Inventory cannot be pushed back into SAP Business One from here yet, so plan any stock write-back as a separate step in SAP Business One itself. Watch the first few pulled orders in Runs / Logs before trusting it unattended.
FAQ#
Test fails with 401 (INVALID_CREDENTIALS)
The Service Layer answered the Login with 401, which means the CompanyDB, the username, or the password is not valid: at least one of the three does not match what SAP Business One has for that database.
Check the three values one by one: confirm company_db is the exact CompanyDB the administrator gave you, and that username and password belong to that same CompanyDB, then retype the password and test again.
Test returns MISSING_CONFIG or MISSING_CREDENTIALS
A required field is empty, and the test stops before it even tries to sign in. MISSING_CONFIG means company_db is empty, and MISSING_CREDENTIALS means username or password is empty.
Fill in all four required fields — base_url, company_db, username, and password — save the connection, and test again.
Login fails when the URL ends with /b1s/v2
The base_url you pasted is the full Service Layer address including the /b1s/v2 part. The system adds that part itself, so with it in the field the address gets it twice and the Login call goes to the wrong path.
Shorten base_url to the host and port only, for example https://b1server:50000, save, and test again.
Test fails and no session is returned (AUTH_FAILED)
The Login call came back without a SessionId, so no B1SESSION session was created and the order read that follows the login cannot run. The login step itself did not complete.
First check that base_url is the Service Layer root address, up to the host and port with no extra path. Then ask your SAP Business One administrator to confirm that the Service Layer answers a Login for that CompanyDB and that user, and test again once they confirm.