You're running a Compound Employee API query in delta mode, and one or a few records which were not modified after the given 'last_modified_on' timestamp parameter are returned with action code CHANGE instead of NO_CHANGE.
NOTE: Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
SAP SuccessFactors HXM Suite
- Employee Central
- Compound Employee API
Reproducing the Issue
- An employee had a 'Supervisor Change' job information record inserted on September 30, 2021
- The only other job information record which exists besides the new 'Supervisor change' record is the 'New position' record (hire), and it hasn't been modified since a year:
- We run a Compound Employee query with queryMode delta to fetch this employee:
SELECT person, address_information, email_information, emergency_contact_primary, employment_information, compensation_information, paycompensation_recurring, job_information, national_id_card, personal_information, phone_information
WHERE last_modified_on > to_datetime('2021-09-01T01:00:00Z') and person_id_external = <sample_employee_id>
- Given that we're running the query with last_modified_on > September 2021 and the only change that happened since that date is the insertion of the 'Supervisor change' job information record, that job information record is the only one that should be returned with action code 'CHANGE' (as per Insertion of a Time Slice - SAP Help Portal). The first record with event reason 'New Position' should be retrieved with action code 'NO_CHANGE'.
- But this is not what we see in the response. Not only 'Supervisor change' record is returned with action code 'CHANGE', but also the old 'New Position' record which was last modified around 1 year in the past, on 2020:
First, please cross-check if your scenario is documented in the following pages, and confirm that Compound Employee is not behaving as documented:
- If you're running your query with queryMode 'delta': Time Slice Handling for Effective-Dated Entities Without Semantic Key - SAP Help Portal
- If you're running your query with queryMode 'periodDelta': Use Cases for Period-Based Delta Transmission - SAP Help Portal
If you've confirmed that the record's action code is not being returned as documented:
Going back to the sample scenario above for reference, we can see that despite the 'last_modified_on' field value of the record falsely returned with action code 'CHANGE' being 2020-09-23 (1 year in the past), the record also contains field(s) with the '_previous' suffix, which indicates that the value of those fields was in fact changed recently.
Therefore, Compound Employee API is behaving as expected and is not where the root cause of this issue lies. Since it detects a change to some field values, the record is returned with action code 'CHANGE'.
Still, the changes were not done by any user or regular business process, because the 'last_modified_on' timestamp of the record was not updated. The root cause for this undesired apparent change lies on Employee Central's Centralized Services framework:
- When some Employee Central records are processed across the system, Centralized Services updates the values of fields which are not enabled in the Data Model to default values (such as '0' or 'false'). Compound Employee API will detect those occurrences as changes and attribute the action code 'CHANGE' to the affected records.
The fix to the behavior of the Centralized Services framework does not have a concrete ETA yet, since it requires extensive planning and testing.
However, as a workaround to prevent the incorrect 'CHANGE' action codes in Compound Employee:
- Add the 'configuredFieldOnly' value to the 'resultOptions' parameter of your Compound Employee request. You may refer to Overview of Query Parameters - SAP Help Portal. With this parameter, Compound Employee will ignore fields which are not configured in the data model and as a result, the action codes will not be affected anymore by the undesired changes produced by the Centralized Services framework.
ce, api, time-slice, time, slice, change, no, false, wrong, wrongly, returned, returning, response, payload, result, results, record, ec, job_information, compensation_information, effective, dated, last_modified_on, last, modified, timestamp, time, changed, modified, ECT-176985, ECT-176804, delta, since , KBA , LOD-SF-INT-CE , Compound Employee API , LOD-SF-INT , Integrations , Problem