Current and future dated data extraction using CompoundEmployee API

Context

In this blog, I intend to explain the various data extraction mechanism that can be used to retrieve current snapshot and future dated data from SuccessFactors Employee Central using the compound employee API. Though this is a basic functionality of the API, I think it’s important to understand what query should be used and in which business scenarios.

Business Scenarios

In HR transformation projects, it’s not very uncommon to have full load interfaces in the integration landscape. By full load interfaces, I meant interfaces, where a set of employees ( based on country, company etc..) are sent across to downstream systems on a regular interval ( e.g daily once, weekly once etc..) irrespective of there is data change or not compare to the last interface run.Though it is a good practice to use delta/incremental interface wherever possible, that does not work out always, as sometimes it’s the downstream application system, which is not capable enough to absorb the data in delta/incremental manner, sometimes, it’s the project timeline/scope which does not demand a change in the as-is extraction type.

I will try to explain with examples on how to extract the current snapshot of employee data and also extract both current and future dated data.

I’ve used the tool Soap UI to demonstrate the API query.It does matter which middleware ( e.g Dell Boomi, SCI/HCI, SAP PO, Mulesoft etc.) one uses, the query and the underlying logic would remain same.

How to extract a current snapshot of employee data

In this diagram, the employee has 2 home address records, once current ( valid till 5th Sept) and the other one is a future dated record ( valid from 6th Sept). The requirement here is to extract only the current data and NOT the future record.

SAP SuccessFactors Employee Central Payroll, SAP Cloud Platform Integration for process servic

To extract current data one can use the below query in CompoundEmployee API in the full transmission query mode ( which is a default query mode – so no need to explicitly use this parameter in the query). Also note, address information is just an example – the API will fetch current data from all the portlets.

SAP SuccessFactors Employee Central Payroll, SAP Cloud Platform Integration for process servic

SOAP UI query request screenshot

SAP SuccessFactors Employee Central Payroll, SAP Cloud Platform Integration for process servic

SOAP UI query response screenshot, which has returned just one address record which is a current record.

SAP SuccessFactors Employee Central Payroll, SAP Cloud Platform Integration for process servic

how to extract a current snapshot+ future dated record

In this diagram, the employee has 2 home address records, once current ( valid till 5th Sept) and the other one is a future dated record ( valid from 6th Sept). The requirement here is to extract both the records.

SAP SuccessFactors Employee Central Payroll, SAP Cloud Platform Integration for process servic

The query is same as current data query with only difference being there is “>” (greater than) is added along with “=”.

SAP SuccessFactors Employee Central Payroll, SAP Cloud Platform Integration for process servic

API request for current +future record

SAP SuccessFactors Employee Central Payroll, SAP Cloud Platform Integration for process servic

API response with both current and future dated records.

SAP SuccessFactors Employee Central Payroll, SAP Cloud Platform Integration for process servic

For non-effective dated portlets ( e.g email, phone, national id etc), API will always return only one record as these portlets do not store history.