Filodos

Connect SAP S/4HANA Cloud

For administrators: connect SAP S/4HANA Cloud to Filodos through its OData API. The connection reads your business partners, and it can write one note into S/4HANA after each visit. Part of the documentation.

What the connection does

  • Sites into zones. Filodos reads one S/4HANA entity, by default the organizations in A_BusinessPartner. Each record with coordinates becomes a zone on the fleet map. See ERP sites and zones.
  • Notes into S/4HANA. When a vehicle leaves a zone, Filodos can make one 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.

  1. SAP S/4HANA Cloud with the OData API, for example the Business Partner API (API_BUSINESS_PARTNER).
  2. The tenant API root, for example https://my123456-api.s4hana.cloud.sap/sap/opu/odata/sap/API_BUSINESS_PARTNER.
  3. The token address of the communication arrangement, for example https://my123456.authentication.s4hana.cloud.sap/oauth/token.
  4. An OAuth2 client id and client secret with read access to business partners and, for visit notes, write access to notes. Do not use an administrator account.
  5. Coordinates: two customer-specific fields on the business partner, for example YY1_Latitude and YY1_Longitude. S/4HANA has no standard coordinate fields.
  6. For visit notes: one customer-specific text field on the note, for example YY1_FilodosRef. It stops duplicate notes (see Notes in S/4HANA).

Do not use an administrator account. Make a separate integration client with the smallest access that works.

Filodos renews the token before it expires. There is no logout: the token is dropped after each sync and after each set of visit notes.

Add a connection

  1. Sign in as an administrator. Open Organization → ERP.
  2. In New connection, select SAP S/4HANA Cloud.
  3. Type a name, the tenant API root, and the OAuth2 client id. Type the client secret as the password.
  4. Type the Token address.
  5. Click Add connection.
  6. Click Test login. The answer shows the token type and its lifetime in seconds.
  7. Continue with the sites (see Sites from S/4HANA).

Filodos stores the client secret encrypted. The dashboard and the API never show a stored secret again. The client id stays visible.

Sites from S/4HANA

In the Workflow panel, set the entity and the filter. The filter is an OData $filter expression.

SitesEntityFilterRecord keyName
Organizations (default)A_BusinessPartnerBusinessPartnerCategory eq '2'BusinessPartnerBusinessPartnerFullName
PersonsA_BusinessPartnerBusinessPartnerCategory eq '1'BusinessPartnerBusinessPartnerFullName

Set Latitude and Longitude to the customer-specific 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.

Notes in S/4HANA

Turn on Write a note into the ERP after each visit. Filodos fills in one note on the business partner:

FieldValue
BusinessPartner{site_key}
NoteDate{date_iso}
NoteTime{arrived_time}
NoteTitleFilodos {vehicle} {arrived}-{departed}
NoteText{text}

You can change the entity, the key field, and each row. Then click Save workflow.

Type the customer-specific field in Dedupe field, for example YY1_FilodosRef. Filodos writes a reference into this field. Before each new note, Filodos looks for that reference. If the note exists, Filodos does not make a second one. Without a dedupe field, a lost answer from S/4HANA can give a second note on the retry.

Each value is cut to 3000 characters. Keep custom data under 3000 characters.

The note needs a business partner. Use the business-partner key as the record key for notes.

Troubleshooting

MessageCause and fix
S/4HANA token request failed (HTTP 401)S/4HANA refused the client id or the client secret, or the token address is wrong. The text after the colon is the message of S/4HANA.
Property '…' of '…' is invalidA column or a write-back field does not exist on the entity. Check the name with your partner. Customer-specific fields start with YY1_ or ZZ1_.
unreachableFilodos cannot reach the tenant API root or the token address. Check the addresses, the firewall, and the certificate.
HTTP 502 or another 5xxS/4HANA has a problem. The next sync tries again.