SAP Knowledge Base Article - Public

2282111 - Parameter value "renderPreviousTags" doesn't return previous tags in Compound Employee API

Symptom

You have changed the data of a field and would like to retrieve the changed data as well as the previous data via Compound Employee API.

However, the API only returned the data and not the previous data even when the parameter value "renderPreviousTags" was passed.

Environment

Successfactors HCM 

Reproducing the Issue

Below is the Compound Employee Query that is used:

<queryString>
SELECT compensation_information,employment_information,job_information,paycompensation_non_recurring,paycompensation_recurring,person,
personal_information FROM CompoundEmployee WHERE last_modified_on > to_datetime('2016-01-12T00:36:33Z')AND person_id_external IN('TestUser')
</queryString>
<param>
<name>maxRows</name>
<value>200</value>
</param>
<param>
<name>queryMode</name>
<value>delta</value>
</param>
<param>
<name>resultOptions</name>
<value>changedSegmentsOnly</value>
</param>
<param>
<name>resultOptions</name>
<value>changedFieldsOnly</value>
</param>
<param>
<name>resultOptions</name>
<value>renderPreviousTags</value>
</param>
</query>
 
 
 
Below is the API response (truncated for conciseness):

<job_information>
....
....
<is_eligible_for_car>false</is_eligible_for_car>
<is_fulltime_employee>true</is_fulltime_employee>
<is_primary>false</is_primary>
<is_shift_employee>false</is_shift_employee>
<standard_hours>35.0</standard_hours>
<start_date>2016-02-18</start_date>
....
....
</job_information>

 

Observation

The older value (previous value) is not rendered along with the changed value. We can only see the curent value of standard_hours which is 35.0
 
 
 
Expectation
 
You expect to see the previous values too for changed data. (example below)
 
<job_information>
....
....
<is_eligible_for_car>false</is_eligible_for_car>
<is_fulltime_employee>true</is_fulltime_employee>
<is_primary>false</is_primary>
<is_shift_employee>false</is_shift_employee>
<standard_hours>35.0</standard_hours>
<standard_hours_previous>30.0</standard_hours_previous>
<start_date>2016-02-18</start_date>
....
....
</job_information>

Cause

This is caused when the parameter "resultOptions" is not correctly passed when it is utilized more than once.

Resolution

Please use the parameter "resultOptions" as shown in the below example when it is utilized more than once.

<param>
        <name>resultOptions</name>
        <value>changedSegmentsonly, changedfieldsonly, renderPreviousTags</value>
 </param>

Complete example of this with the Query would look something like below -

<query xmlns="urn:sfobject.sfapi.successfactors.com">
      <queryString>SELECT compensation_information,employment_information,job_information,paycompensation_non_recurring,paycompensation_recurring,person,
personal_information FROM CompoundEmployee WHERE last_modified_on &gt; to_datetime('2016-02-18T09:36:33Z')AND person_id_external IN('TestUser')</queryString> <param> <name>maxRows</name> <value>200</value> </param> <param> <name>queryMode</name> <value>delta</value> </param> <param> <name>resultOptions</name> <value>changedSegmentsonly, changedfieldsonly, renderPreviousTags</value> </param> </query>

See Also

Please Note

Compound Employee API will not return previous tags for <action>INSERT</action>

Keywords

resultOptions parameter issue
, KBA , LOD-SF-INT , Integrations , Problem

Product

SAP SuccessFactors HCM Core 1511 ; SAP SuccessFactors HCM Suite 1511 ; SAP SuccessFactors HCM Suite 1602 ; SuccessFactors HCM Suite 1508