Connecting SAP Business One (SAP B1) to Dokka involves configuring the necessary settings and permissions. Below is a step-by-step guide to help you establish the connection:


Before starting, make sure you have the following:

1. Login credentials (username and password) for a SAP B1 user account with Administrative privileges (manager role).

2. Database names for all the companies you want to connect to Dokka.

3. Access to the SAP Control Center.

4. A server URL (IP address or a publicly available domain name, but not hostname) where SAP B1 is hosted.

5. Access to Dokka (Dokka user) with Administrator privileges


Step 1: SAP B1 Configuration

- Log in to SAP B1 using the manager user credentials 

*Please save the  SAP B1 username and password




Step 2: Identify the Company Database

- Navigate to Administration > Choose Company\Log In screen > Change Company.

- Find and make note of the company's (or companies') Database Name(s). Each company has its own database.

- If you want to connect more than one company to Dokka, go to the 'Optional Step - Connect Multiple Companies' section of this article to create an Excel file with company and database names, and return to Step 3.




Step 3: Obtain the Server URL

- Access the SAP Control Center either as an administrator or system manager.

- Navigate to Services > Service Layer.

- Copy the server URL, which is usually the IP address of the server.

- If the IP address is not visible, you can find it by visiting a website like whatismyipaddress.com.


The server address has to be accessible from the World Wide Web - either a public IP address or a publicly registered domain/sub-domain name.


Step 4: Configure Dokka

Open Dokka and create a new company (as described in this article), or go into an existing company that isn't connected to SAP yet.


Once you've got into the company, go to Settings (profile picture > Settings), and then go to Integrations > SAP Business One > Connect:


Enter the login parameters as follows:

1. SAP username - user name for a SAP user with Administrator privileges, like the one you used to connect in Step 1

2. SAP password - password for a SAP user with Administrator privileges, like the one you used to connect in Step 1

3. Company DB name - database name for the company you want to connect, as identified in Step 2

4. SAP server url - start with the address you obtained in Step 3, and append '/b1s/v2/Login' to it. For example, if the server address you obtained is 'https://sap-server:50000', you'll have to type in 'https://sap-server:50000/b1s/v2/Login' in this field.


* If you want to connect more than one company, click 'Connect other companies' and upload the Excel file you created in the '' section:


Once all parameters are set, click 'Sign In'. If you see any errors after login, go to the 'Resolve Common Errors' section of this article.



Optional Step - Connect Multiple Companies

SAP does not share the database names for companies, and hence they have to be collected manually and uploaded to Dokka during the connection process.


Create an Excel file with the columns: DB Name, Company Name. Add the database name and company name for each company (from the Change Company screen, as shown in step 2), and save the file once you're done.

 


Use this file during the Dokka configuration step (Step 4)


Resolve Common Errors


** Check API Availability


This means that the initial connection to the SAP server wasn't successful.

If you encounter any errors during the setup, consider the following:


1. Remove the 'Verify SSL Certification' checkbox and try to connect again.

2. Make sure that your server address is typed in correctly (e.g. 'https://sapserver:port/b1s/v2/Login', as described in Step 4.

3. Make sure that your server address is available from the World Wide Web: If you used an IP address, make sure it's not an internal IP address (not in these ranges: 10.0.0.0 – 10.255.255.255, 172.16.0.0 – 172.31.255.255, 192.168.0.0 – 192.168.255.255). If you used a domain/sub-domain name, make sure it's publicly registered using a service like dnschecker.org.

4. Make sure that access to the server is not blocked from Dokka's IP addresses (20.71.186.136, 212.59.64.178).



** Your email, password or CompanyDB is incorrect

This means that the connection to the server itself was successful, but SAP couldn't log you in to the company using the username and password you provided.

Make sure that SAP username, SAP password and Company DB name were written correctly in the login screen. If that's true, try logging in to SAP with the same username, password and Company DB name.


Additional Notes:

- In special cases where you need to create a new user with specific permissions, follow your SAP B1 documentation or consult with support to grant the necessary permissions manually.


* Remember to contact your SAP B1 and Dokka support teams for further assistance if you encounter any issues or errors that cannot be resolved with the steps outlined in this guide.