2495560 - "Field required for external candidate for templateId, with the index 0" when Upserting via ODATA API - Multi Stage Application Enabled

SAP Knowledge Base Article - Public

2495560 - "Field required for external candidate for templateId, with the index 0" when Upserting via ODATA API - Multi Stage Application Enabled

Symptom

Error "customFIeld required for external candidate for templateId 1762, with the index 0" when trying to update one field value at Job Application via ODATA API with an Upsert call.

Environment

SuccessFactors Recruiting Management - All Versions with Multi Stage Application Enabled

Reproducing the Issue

Pre-requisites:

A. Ensure that multistage application is enabled (Further details in article 2081453)
B. Application field is configured as Required in the Application Template

<field-definition id="customField" type="text" required="true" custom="true" public="true" readOnly="false" anonymize="false" forward-intact="true">
<field-label><![CDATA[Custom Field]]></field-label>
<field-label lang="en_US"><![CDATA[Custom Field]]></field-label>
<field-description><![CDATA[]]></field-description>
</field-definition>

C. Field permissions are configured in the Job Requisition Template for a specific status:

<field-permission type="write">
<role-name><![CDATA[C]]></role-name>
<status><![CDATA[Offer]]></status>
<field application-field-id="customField" />
</field-permission>

This means that field "Custom Field" is required for the candidate to fill once he reaches the "Offer" Status only. In previous status, field is not even available for candidate nor recruiter to fill.

Replication Steps:

1. Have the candidate in the "default" status;
2. Create an Upsert request using ODATA API per example below to update another field in Candidate's Application:


<feed xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="https://api4.successfactors.com:443/odata/v2/">
<entry>
<id>https://api4.successfactors.com:443/odata/v2/JobApplication(CANDIDATEID)</id>
<content type="application/xml">
<m:properties>
<d:UserIdCreation>test</d:UserIdCreation>
</m:properties>
</content>
</entry>
</feed>


3. ODATA API Response with error:

<d:status>ERROR</d:status>
<d:message>customField required for external candidatefor templateId 1762 , with the index 0</d:message>

Cause

Odata does not support multistage application process.
API being the single one time entry point for applications expects all required fields when the application is inserted, regardless of the status candidate is currently in.

Resolution

There is currently an enhancement request under analysis by Product Management team.
However, this has not been included in the roadmap for the upcoming releases for the time being.

Workaround Available:

a. Update the Application Template and set all fields which is being validated while upserting via API to Not required.
b. Include a code to the Job Requisition Template which makes the field required in a specific status (customField, per example).


Application Template:

<field-definition id="customField" type="text" required="false" custom="true" public="true" readOnly="false" anonymize="false" forward-intact="true">
<field-label><![CDATA[Custom Field]]></field-label>
<field-label lang="en_US"><![CDATA[Custom Field]]></field-label>
<field-description><![CDATA[]]></field-description>
</field-definition>


Job Requisition Template:

<field-permission type="write">
<role-name><![CDATA[C]]></role-name>
<status><![CDATA[Offer]]></status>
<field application-field-id="customField" required="true" />/>
</field-permission>

Keywords

KBA , LOD-SF-RCM , Recruiting Management , LOD-SF-RCM-INT , Integrations & Intelligent Services , Problem

Product

SAP SuccessFactors Recruiting all versions