SAP Knowledge Base Article - Public

3145938 - Error when trying to UPSERT the email in SF Employee Central API

Symptom

You are running Odata API upserts into EC entity passing inside the payload one existing option ID according the picklist center, but the system is returning one error like sample below:

<?xml version='1.0' encoding='utf-8'?><UpsertResponses><PerEmailUpsertResponse><key>PerEmail/emailType=333,PerEmail/personIdExternal=111</key><status>ERROR</status><editStatus null="true"/><message>The given value 333 for option emailType is invalid. null Failed record info: {PerEmail/emailAddress=test@test.com, PerEmail/emailType=333, PerEmail/isPrimary=true, PerEmail/personIdExternal=111}.   for Key PerEmail/emailType=333,PerEmail/personIdExternal=111 with the index 0</message><index type="Edm.Int32">0</index><httpCode type="Edm.Int32">500</httpCode><inlineResults type="Bag(SFOData.UpsertResult)"/></PerEmailUpsertResponse></UpsertResponses>

Environment

SAP SuccessFactors HXM Suite

SAP SuccessFactors Employee Central

OData API

Cause

Your API user might have different language configured (not US english - standard language used from import engine).

Resolution

You can try to change the language of your API user to english or you can add the "fileLocale=en_US" parameter in the Upsert call.

Sample of POST call using the parameter:

POST https://api.successfactors.com/odata/v2/upsert?fileLocale=en_US

You can see more details abou this parameter looking into SAP SuccessFactors Employee Central OData API: Reference Guide

Keywords

Odata API Upsert SAP successsfactors HXM suite Employee Central EC , KBA , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , LOD-SF-INT , Integrations , How To

Product

SAP SuccessFactors HCM suite all versions