Symptom
This KBA outlines the process taken to insert employee information into Variable Pay employee history.
It is possible to import and update values in the system via another source, as it is the SFAPI (SuccessFactors Application Programming Interface).
This integration is designed to handle exports of SAP On-Premise Payroll data to SuccessFactors for input to the Variable Pay process, and extract of SuccessFactors Variable Pay planning results for import back to the SAP On-Premise Payroll system.
This integration utilizes SuccessFactors web services for both import of bonus data, and web services for extract of Variable Pay results.
- Please note you will need to have your middleware/API setup before attempting to insert/upsert data into SuccessFactors.
- Any queries on this please contact the Integration team.
**Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental**
Environment
- SAP SuccessFactors Variable Pay
Cause
- You may find through processing an insert of employee data for employee history that nothing populates within the plan.
- When checking the SFAPI Audit Log we can see from the payload response a record was created, however when checking the Variable Pay plan there is no history.
Resolution
To correctly insert employee data into a Variable Pay plan you need to have the soap query defined with the following data.
Background element name & template ID
- This can be obtained from the UI under Plan Setup> Settings> Settings> Plan Information.
User (USR-) ID
- The USR ID for the employees you wish to insert need to be obtained by running the following query via the API.
Select username, firstName, lastName, externalid from user
- This will give you a list of employee ID's.
- For the insert you will need to use the USR ID from this query.
Fields from the background element
- These will be the fields/columns which you would like to populate within employee history.
- The fields/columns will need to match what you have within the background element.
- This can be obtained by checking your data-model.
Example
- Using the above example, the insert to be done would look as follows.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header/><soapenv:Body><ns2:insert xmlns:ns2="urn:sfobject.sfapi.successfactors.com">
<ns2:type>Background_varPayEmpHistDataProTech</ns2:type>
<ns2:sfobject>
<ns2:type>Background_varPayEmpHistDataProTech</ns2:type>
<ns2:userId>USR-17</ns2:userId>
<ns2:startDate>2018-01-01</ns2:startDate>
<ns2:endDate>2018-12-31</ns2:endDate>
<ns2:varPayProgramName>1241</ns2:varPayProgramName>
<ns2:division>Sales</ns2:division>
<ns2:salary>600000</ns2:salary>
<ns2:basis>210000.00</ns2:basis>
</ns2:sfobject>
</ns2:insert></soapenv:Body></soapenv:Envelope>
- Within the instance check the SFAPI Audit log for the successful insert.
- Navigate to the Variable Pay plan to Plan Setup> Manage Users> Edit Employee History and select "Search".
- You should now find the record you sent to be inserted populates.
Keywords
upsert employee history, middleware, api, vrp int, employee history, upsert, insert employee data, middleware, variable pay sfapi , KBA , LOD-SF-VRP , Variable Pay Programs , LOD-SF-VRP-INT , Integrations with CMP, PM, EC, etc. , LOD-SF-VRP-API , Webservices, APIs , How To