2443073 - Unable to insert/upsert new inactive users in Bizx via SFAPI User entity

SAP Knowledge Base Article - Public

2443073 - Unable to insert/upsert new inactive users in Bizx via SFAPI User entity

Symptom

You are trying to insert new users in Bizx with "inactive" status via SFAPI User entity.

Below error is returned:

<message>INTERNAL_ERROR : INVALID_FIELD_VALUE Field name:status Field value:inactive. Cannot insert an inactive user.&#xd;</message>

You have included the processing parameter but the insert fails.

<processingParam>
<name>processInactiveEmployees</name>
<value>true</value>
</processingParam>

Environment

Successfactors SFAPI

Reproducing the Issue

SFAPI User upsert Request xml

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<upsert xmlns="urn:sfobject.sfapi.successfactors.com">
<type>User</type>
<sfobject>
<type>User</type>
<externalId>dduck</externalId>
<status>inactive</status>
<lastName>Duck</lastName>
<jobCode>Unknown</jobCode>
<username>dduck</username>
<firstName>Donald</firstName>
<department>test</department>
<city>Bangalore</city>
<country></country>
<defaultLocale></defaultLocale>
<division></division>
<email>noemail@xyz.com</email>
<empId></empId>
<gender>M</gender>
<hireDate>2017-03-15</hireDate>
<hrExternalId>NO_HR</hrExternalId>
<location>ABCD</location>
<managerExternalId>NO_MANAGER</managerExternalId>
</sfobject>
<processingParam>
<name>processInactiveEmployees</name>
<value>true</value>
</processingParam>
</upsert>
</Body>
</Envelope>

SFAPI User upsert Response xml

<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<upsertResponse xmlns="urn:sfobject.sfapi.successfactors.com" xmlns:ns2="urn:fault.sfapi.successfactors.com">
<result>
<jobStatus>ERROR</jobStatus>
<message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<objectEditResult>
<errorStatus>ERROR</errorStatus>
<editStatus>NOEDIT</editStatus>
<index>0</index>
<message>INTERNAL_ERROR : INVALID_FIELD_VALUE Field name:status Field value:inactive. Cannot insert an inactive user.&#xd;</message>
</objectEditResult>
</result>
</upsertResponse>
</S:Body>
</S:Envelope>

Cause

This may not be a valid business scenario and the error message is expected as per the design behavior of API.

Resolution

A new user/first replication of a user cannot happen with "inactive" status. This doesn't meet any business use case.

ie, we cannot hire an employee with termination/Retirement status. They need to have an active record in Bizx prior to their inactive record.

This explains the error message "Cannot insert an inactive user".

The below processing parameter is valid only for inactive users that already exist in Bizx system.

See Also

An example use case for the below parameter - To correct/edit location details of an inactive user in successfactors.  

<processingParam>
<name>processInactiveEmployees</name>
<value>true</value>
</processingParam>

Please check the KBA 2276787 - This KBA explains how to update data of inactive employees via SFAPI User entity.

Keywords

Cannot insert an inactive user. , KBA , cannot insert an inactive user , LOD-SF-INT-API , SF API & Adhoc API Framework , Problem

Product

SAP SuccessFactors HCM Core all versions