SAP Knowledge Base Article - Public

2178217 - INVALID_HR_ID : Failed to add/update user [userid] "" (N/A;N/A;N/A): Invalid HR Id - "<invalid HR id>"

Symptom

The following error message is received in body of SOAP response when employees data are being updated / upserted via SFAPI User entity.

SFAPI User entity call itself is displayed as successful in the list of logs in SFAPI Audit log, with HTTP 200 OK status in the response.

<result>
  <jobStatus>ERROR</jobStatus>
     <message xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
     <objectEditResult>
         <errorStatus>ERROR</errorStatus>
         <editStatus>NOEDIT</editStatus>
         <index>0</index>
         <message>INVALID_HR_ID : Failed to add/update user [userid] "" (N/A;N/A;N/A): Invalid HR Id - "<invalid HR id>".</message>
    </objectEditResult>
</result> 

Environment

SuccessFactors BizX

Cause

There is a system check in SFAPI User entity which verifies if a valid HR user id is assigned to the employee which is being updated / upserted. If the HR user id is invalid or does not exist, the error message appears.

Resolution

First, check if user id of HR manager assigned to the employee exists and it is valid.

The assignment can be checked via Admin tools -> Manage users -> Employee export

HR user id is maintained in HR column of exported .csv file.

If the maintained HR user id is not valid then one of the following alternatives can be used to avoid the error message via SFAPI:

    a. Include the element <ns2:hrExternalId></ns2:hrExternalId> with a valid value in the body of SOAP request.  Either valid HR id or "NO_HR" (all in caps) will be considered as a valid value for the element. For example: <ns2:hrExternalId>NO_HR</ns2:hrExternalId>.

       This will update / upsert corresponding value in the database.

       <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sfobject.sfapi.successfactors.com">
        <soapenv:Header/>
         <soapenv:Body>
           <urn:update>
             <urn:type>User</urn:type>
               <urn:sfobject>
                 <id xmlns="urn:sfobject.sfapi.successfactors.com">USR-104</id>
                 <type xmlns="urn:sfobject.sfapi.successfactors.com">user</type>
                 <firstName>Carla</firstName>
                 <lastName>Grant</lastName>
                 <hrExternalId>NO_HR</hrExternalId>
               </urn:sfobject>
              </urn:update>
         </soapenv:Body>
       </soapenv:Envelope>

    b. Include validateMgrHr processing parametr with value 'FALSE' in the body of SOAP request. This will bypass the HR id check when a user data is being updated / upserted.

       <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sfobject.sfapi.successfactors.com">
         <soapenv:Header/>
         <soapenv:Body>
           <urn:update>
             <urn:type>User</urn:type>
             <urn:sfobject>
               <id xmlns="urn:sfobject.sfapi.successfactors.com">USR-104</id>
               <type xmlns="urn:sfobject.sfapi.successfactors.com">user</type>
               <firstName>Carla</firstName>
               <lastName>Grant</lastName>
             </urn:sfobject>
             <urn:processingParam>
               <urn:name>validateMgrHr</urn:name>
               <urn:value>FALSE</urn:value>
             </urn:processingParam>
           </urn:update>
         </soapenv:Body>
       </soapenv:Envelope>

Keywords

SFAPI, Integration, User, HR Manager, Id , KBA , LOD-SF-INT-PAY , P2P & Cloud Payroll , Problem

Product

SAP SuccessFactors HCM Suite 1705