Symptom
You are receiving the below error in SFAPI Audit logs (SOAP Response) on upsert operation for EmpJob entity.
Reports To is invalid., failed record info: {user_id=12345, start_date=Tue Aug 04 00:00:00 EDT 2015, eventReasonCode=HIRNEW,
legalEntityCode=1000, position=ABCD123, seq_number=1}
Environment
Successfactors System
Reproducing the Issue
You are trying to perform an upsert operation with a SOAP request xml as shown below.
The corresponding SOAP Response is:
Cause
This is caused because the "Manager id" is not maintained in the SOAP request XML.
Resolution
You may have set the field "Manager-id" with the required attribute = "False" in the data model.
However, For an upsert, It is mandatory to have the "Manager-id" to be present in the SOAP request xml for a successful response.
Incase, You do not wish to mention the "Manager-id", You may use "NO_MANAGER" in the xml as shown below:
We can see its SOAP response xml in the below screenshot:
We can see that the data is successfully upserted.
See Also
The reason for this behaviour is due to the product design where a valid employee's employment expects manager's information in order to populate job information of the employee.
In other words, An employee record expects manager information when you try to upsert information related to eventReasonCode/position/legal entity.
However, As per the data model configuration in this example, for subsequent upserts, Manager id may not be included in the subsequent upsert requests since the manager-id field is set to not mandatory/False.
Keywords
Reports To is invalid EmpJob Upsert fails EmpJob API fails , KBA , LOD-SF-INT-API , API & Adhoc API Framework , Problem