Symptom
Trying to query the Contingent Workers using Compound Employee API with filters in the WHERE clause as below:
- person_id_external='XXXXXX' (where 'XXXXXX' is the employee id external for the contingent worker)
- employee_class='C' (where employee class for contingent workers is defined as 'C')
But the response always comes as follows:
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 HXM Suite
- Compound Employee API
Cause
The mandatory selection parameter to fetch the Contingent Worker data is missing in the query.
Resolution
To define whether contingent workforce employments or regular employments are filtered, use the isContingentWorker select parameter. If there are employees in Employee Central that only have one type of employment, the selection of the whole person depends on the select parameter.
It’s possible that one employee has both types of employment. In this case, the selection parameter isContingentWorker filters out the employment type that wasn’t requested.
We need to add the below filter criteria in the Compound Employee API query and then all the Contingent Workers' data will be returned by the API:
- isContingentWorker='true' to pick data only from Contingent Workers
- or isContingentWorker IN ('true','false') to pick up both Contingent Workers and Regular Employees data
By default, Compound Employee will set isContingentWorker='false' in the query, so if you don't specify this filter in the request, Contingent Worker data won't be returned.
See Also
Compound Employee API Guide (topic "Contingent Worker Employment Filter")
Keywords
Contingent worker, Temporary Employees, Compound Employee, contingent, ce, compound employee, api, no data, 0 records, record, return, response, successfactors, success factors, sf, contingent worker query, contingent worker filter, isContingentWorker, select parameter , KBA , LOD-SF-INT-CE , Compound Employee API , LOD-SF-INT , Integrations , Problem
SAP Knowledge Base Article - Public