Skip to main content
Technical Preview

Overview

A client-mode connector for SAP SuccessFactors HXM: the OData v2 API (User Management, Employee Central employment and personal information, Foundation Objects, Time Off) and the Time Tracking Clock In Clock Out APIs. Use it to connect the shop floor to HR:
  • Badge readers and gate terminals publish clock-in / clock-out punches on MQTT, and the connector sends them to Clock In Clock Out.
  • A kiosk or HMI books or cancels an absence, or shows the remaining vacation balance.
  • Line planning and andon boards read who is assigned to a plant and department, with standard hours (EmpJob with asOfDate).
The connector SapSuccessFactorsRestApi in SapSuccessfactorsRestApi.lot has 28 events (23 GET, 5 POST). 3 are writes: EmployeeTimeCreate, Upsert, TimeEventsCreate. There are no DELETE, PUT or PATCH events. Set BASE_ADDRESS to the API server of your data center, with no trailing slash and no /odata/v2, for example https://api55.sapsf.eu or https://api4.successfactors.com (SAP KBA 2215682 lists all API servers). Topics use finance/sap-successfactors/<object>/<verb>; replies land on <topic>/response. See the base guide: REST API Connectors.

Setup

  1. Create or choose an API user with role-based permissions for the entities the broker uses (for example User, Employee Central job information, Time Off) and Employee Central API / SFAPI access. Every call runs with this user’s permissions.
  2. In Admin Center > Manage OAuth2 Client Applications, register a client: application name and URL, Bind to Users with the API user, and Generate X.509 Certificate. Download the certificate (it holds the private key) and save the API Key (the client_id).
  3. For Clock In Clock Out punches, register a second client bound to the technical user TECHNICAL_USER_CICOTERMINAL_9D3F8AC1. SuccessFactors accepts punches only with that user’s token (SAP KBA 3206348).
  4. Note your company ID. Keep SF_COMPANY_ID, SF_CLIENT_ID, the private key or assertions, and the current token in broker secrets and inject them with GET SECRET.

Authentication

SuccessFactors uses the OAuth 2.0 SAML 2.0 bearer assertion grant:
  1. Get a SAML assertion for the API user, signed with the client’s private key. Generate it outside the broker (for example with SAP’s assertion generator or an integration platform), or use SamlAssertion (POST /oauth/idp with client_id, user_id, token_url, private_key). SAP has deprecated /oauth/idp because the private key travels in the call (KBA 3239495); it still answers today, but prefer generating the assertion yourself.
  2. Get a token with OAuthToken: POST /oauth/token with company_id, client_id and assertion (the grant type urn:ietf:params:oauth:grant-type:saml2-bearer is fixed in the template). The reply has access_token, token_type Bearer and expires_in.
  3. Every other event sends Authorization: Bearer <access_token> from the payload. TokenValidate checks a token.
The token events send a form body, so every value must be URL-encoded. Assertions and private keys are Base64 and contain +, / and =: send them as %2B, %2F and %3D, or the server rejects the assertion.
HTTP Basic authentication (user@companyId:password) for SuccessFactors APIs reached end of maintenance on 2 June 2025 and is deleted on 13 November 2026 (SAP KBA 3472405), so this template does not use it. If you already use OpenID Connect through SAP Cloud Identity Services, get the token from your Identity Services tenant and send it as access_token the same way. Never retain topics that carry an assertion, private key or token, and restrict finance/sap-successfactors/auth/# with ACLs.

Events

Payloads

OData v2 query options: $filter, $select, $expand, $orderby, $top, $skip, $format, $inlinecount, and the SuccessFactors effective-dating options asOfDate, fromDate and toDate (YYYY-MM-DD). Dates in OData v2 JSON bodies use /Date(<epoch milliseconds>)/.

Basic Syntax

An excerpt of the template (the full file has all 28 events and comments):

Examples

Keep a token for the other actions

Publish a fresh, URL-encoded assertion from your signer to state/sf/assertion (assertions are short-lived). A COLLAPSED model builds the token request, because PUBLISH TOPIC does not take inline JSON:

Who works where today

Every hour, read the job information valid today for one plant, with department, manager and standard hours. The reply is OData v2 JSON: rows in d.results; follow d.__next (a $skiptoken link) for the next page.
Without asOfDate SuccessFactors returns the record valid today; add asOfDate=2026-10-05 (or fromDate / toDate) for another day.

Send badge punches to Clock In Clock Out

The badge gateway publishes the punch payload on finance/sap-successfactors/clock/events/create (a LoT model cannot build the JSON array that the API expects). access_token must come from the client bound to TECHNICAL_USER_CICOTERMINAL_9D3F8AC1. P10 / P20 stand for the clock-in and clock-out time event types of your Clock In Clock Out group; ClockGroupsList lists them.
SuccessFactors answers 201 with succeededTimeEvents (one UUID per punch) and failedTimeEvents (for example A time event for this employee and timestamp already exists.). Up to 1000 punches can go in one call; id only has to be unique within the call. Read them back with TimeEventsExport:

Book and cancel an absence

Publish to finance/sap-successfactors/employee-time/create (the time type must exist and be allowed for the employee; check with TimeTypeList / AvailableTimeTypeList):
Cancel it later with an upsert on finance/sap-successfactors/odata/upsert. The reply has one row per record with status OK or ERROR and a message:

Notes

  • Effective-dated entities (EmpJob, EmpEmployment, Foundation Objects) return the record valid today unless you pass asOfDate, or fromDate / toDate for history.
  • EmpJob cannot be created with POST; it is upsert only (the metadata marks it upsertable, not creatable). Upsert works for any upsertable entity, but HR master data changes usually belong in SuccessFactors itself; the template only shows time records.
  • TimeEventsExport needs the export permission; without it SuccessFactors returns an empty list with 200.
  • Use Metadata (/odata/v2/<entity>/$metadata) to see the custom fields of your instance, and EntityQuery to read entity sets that have no dedicated event.
  • Errors: OData v2 returns 401 with [LGN0007]Invalid OAuth token for a bad token; the Clock In Clock Out APIs answer 401 AuthenticationRequired without a token and 400 AuthenticationFailed for a malformed one; /oauth/token answers 400 with errorHttpCode / errorMessage.
  • Not packaged on purpose: every DELETE, the Clock In Clock Out mass delete (PATCH with deleted: true), PUT / MERGE updates (use Upsert), $batch, SFAPI and Compound Employee, the OData v4 Employee Central APIs, and HTTP Basic authentication.

Status

Technical preview, blocked on a live test. Static, spec, example and mock checks pass, and keyless calls to real SuccessFactors API servers return the documented 400 / 401 answers. A live run needs a SuccessFactors test instance (company ID and API server), an OAuth2 client with its X.509 key bound to an API user, and a second client bound to the Clock In Clock Out technical user for punches.
Last modified on October 21, 2026