Connect SAP Business One
For administrators: connect SAP Business One to Filodos through the SAP Service Layer. The connection reads your business partners or warehouses, and it can write one activity into SAP after each visit. Part of the documentation.
What the connection does
- Sites into zones. Filodos reads one SAP entity, by default the customers in
BusinessPartners. Each record with coordinates becomes a zone on the fleet map. See ERP sites and zones. - Activities into SAP. When a vehicle leaves a zone, Filodos can make one activity (a note) on the business partner: which vehicle, the date, and the arrival and departure times. See Visit notes in the ERP.
The roles, the sync schedule, and the pause and delete actions are the same as for the other ERP connections. See Who can do what and Change, pause, or delete.
What you need
Get these values from your SAP partner before you start.
- SAP Business One 9.3 or later, on SAP HANA or Microsoft SQL Server, with the Service Layer.
- The Service Layer address with the port and the version, for example
https://sap.example.gr:50000/b1s/v1. The version can bev1orv2. - The company database name, for example
SBODEMOGR. - An integration user and its password. The user needs a license with Service Layer access, read access to business partners and, for visit notes, write access to activities.
- Coordinates: two user-defined fields on the business partner, for example
U_LatitudeandU_Longitude. SAP Business One has no standard coordinate fields. - For visit notes: one user-defined text field on the activity, for example
U_FilodosRef. It stops duplicate activities (see Activities in SAP).
Do not use the manager account. Make a separate integration user with the smallest access that works.
Use a certificate that a public certificate authority signed. Filodos does not accept a self-signed certificate. Many Service Layer installations use one by default. Your partner can put a reverse proxy with a valid certificate in front of the Service Layer.
Each open Service Layer session uses one license seat. Filodos logs out after each sync and after each set of visit notes, so it does not keep a seat.
Add a connection
- Sign in as an administrator. Open Organization → ERP.
- In New connection, select SAP Business One.
- Type a name, the Service Layer address, the integration user, and the password.
- Type the Company database.
- Click Add connection.
- Click Test login. The answer shows the company name and the Service Layer version.
- Continue with the sites (see Sites from SAP).
Filodos stores the password encrypted. The dashboard and the API never show a stored password again.
Sites from SAP
In the Workflow panel, set the entity and the filter. The filter is an OData $filter expression.
| Sites | Entity | Filter | Record key | Name |
|---|---|---|---|---|
| Customers (default) | BusinessPartners | CardType eq 'cCustomer' | CardCode | CardName |
| Active customers only | BusinessPartners | CardType eq 'cCustomer' and Valid eq 'tYES' | CardCode | CardName |
| Warehouses as depots | Warehouses | empty | WarehouseCode | WarehouseName |
Set Latitude and Longitude to the user-defined coordinate fields. Column names must be plain SAP property names: letters, digits, and _. Filodos reads only the columns that you set.
Click Save workflow, then Sync sites now. The other rules are in ERP sites and zones.
Activities in SAP
Turn on Write a note into the ERP after each visit. Filodos fills in one activity on the business partner:
| Field | Value |
|---|---|
CardCode | {site_key} |
Activity | cn_Note |
ActivityDate | {date_iso} |
ActivityTime | {arrived_time} |
Details | Filodos {vehicle} {arrived}-{departed} |
Notes | {text} |
You can change the entity, the key field, and each row. Then click Save workflow.
Type the user-defined field in Dedupe field, for example U_FilodosRef. Filodos writes a reference into this field. Before each new activity, Filodos looks for that reference. If the activity exists, Filodos does not make a second one. Without a dedupe field, a lost answer from SAP can give a second activity on the retry.
The activity needs a business partner. Do not turn on activities for warehouse sites.
Troubleshooting
| Message | Cause and fix |
|---|---|
SAP login failed (HTTP 401) | SAP refused the company database, the user, or the password, or no license seat is free. The text after the colon is the message of SAP. |
Property '…' of '…' is invalid | A column or a write-back field does not exist on the entity. Check the name with your partner. User-defined fields start with U_. |
Invalid BP code | The record key of the site is not a business partner code. Use CardCode as the record key for activities. |
unreachable | Filodos cannot reach the Service Layer, or the certificate is not valid. Check the address, the port, the firewall, and the certificate. |
HTTP 502 or another 5xx | The Service Layer has a problem. The next sync tries again. |