You are observing strange behavior of SFAPI query with changedSegmentsOnly and delta parameters in your response results.
This KBA has the objective to share additional technical details about how these parameters works in the backend, using the SFAPI CompoundEmployee snapshot parameter to explain this logic.
SuccessFactors - SFAPI CompoundEmployee
Reproducing the Issue
Run your SFAPI CompoundEmployee query and observe the HTTP Response
Let's check one real example.
In the example above, you can see Last modified date June 21, 2018 9:10:44 AM EDT.
Now let's run one query in the SFAPI CompoundEmployee with the parameters changedSegmentsOnly and delta.
Please notice that this query has the condition "last_modified_on greater than '2018-06-20T15:00:00Z'" ( June 20 ), that means, in the response should show the Base Salary amount 1,000 in the response, right?
Where is the Base Salary amount 1,000 in the payload above? We cannot find...
In the first impression, you can think that this is some bug of the SFAPI CompoundEmployee.
This scenario was generated with the following actions:
- We created the Compensation Information entry on June 20th
- After that, we deleted this Compensation Information entry on June 20th
- After that, we created the Compensation Information entry again on June 21th
The actions above occured in the parent element "compensation_information".
The child element "paycompensation_recurring" which contains the Base Salary amount 1,000 was created on June 20. The user interface screenshot may lead you to think that this Base Salary amount was inserted on June 21.
Let's run now one snapshot query on June 20.
In the response of this snapshot query, we can see the "paycompensation_recurring" and the Base Salary amount 1,000 data created on June 20.
Please observe that:
- In our 1st delta query, we executed with the condition WHERE last_modified_on > to_datetime('2018-06-20T15:00:00Z')
- In our 2nd snapshot query, we executed with the same condition WHERE last_modified_on > to_datetime('2018-06-20T15:00:00Z')
- The paycompensation_recurring segment with paycompvalue equals 1000 was created some minutes before that = '2018-06-20T14:01:11.000Z'
That means, the SFAPI CompoundEmployee will not show in the delta + changedSegmentsOnly query one information/data created before the snapshot.
This is the reason behind this behavior, showing that what we see in the user interface is not always the same that is being transmitted in the SFAPI CompoundEmployee response based on the scenario and parameters.
- More details about the CompoundEmployee snapshot, please refer to the following documentation: https://help.sap.com/viewer/5bb9a5b997a843c88e769a105e4af4d4/latest/en-US/a92f9b6687a54ed68d1f0284e43b64d5.html
- More details about the CompoundEmployee changedSegmentsOnly, please refer to the following documentation: https://help.sap.com/viewer/9b997ab9e29e4ffc9859688b076d91de/latest/en-US/e8d68cf347a44ee6bc136d820b43bf48.html
SFAPI CompoundEmployee query
Parameters changedSegmentsOnly (resultOptions) and delta (queryMode).
- Missing records in the response
- algorithm logic