SAP Knowledge Base Article - Public

2172271 - UPSERT request to SFAPI Entity USER is failing with an error: Invalid foreign surrogate key 'NO_MANAGER' of field managerid

Symptom

Following error message can be seen in SOAP Response (Under Admin Tool_> Integration Tool->SFAPI Audit Logs):

<faultstring>SFAPI Domain Error!</faultstring>
<ns2:errorCode>INVALID_REQUEST_MESSAGE</ns2:errorCode>
<ns2:errorMessage>Invalid request message! Error: Invalid SFObject! Error: Invalid foreign
surrogate key 'NO_MANAGER' of field managerid at [SFObject #1,field #8]!</ns2:errorMessage>

Environment

Successfactors BizX System

Cause

  • Logon to Successfactors sytem.
  • Go to Admin Tool_> Integration Tool->SFAPI Audit Logs
  • Check the SOAP Request:

SOAP&#x20;request.JPG

  • Here, you can see that highlighted xml tag is "ManagerId" which is not correct because value being passed for this tag is "NO_MANAGER" which means user is at the top of the hirarchy and does not have manager.
  • So, "NO_MANAGER" value can not be sent via "managerId" tag.

Resolution

  • The managerExternalId field maps to the externalId of the User record for the employee’s manager, and the managerId field which maps to the id field of the manager, which is an internal Id value.

  • We suggest to use "managerExternalId" to send User's Manager information as it covers the users which does not have manager (Eg. CEO of an organization).

  • Do not supply managerExternalId and managerId  both.

Correction.JPG

Keywords

KBA , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , Problem

Product

SAP SuccessFactors HCM Core all versions