SAP Knowledge Base Article - Public

2618180 - Candidate Odata API Error : [COE0019]phoneCountryCode required, optInCellNumber required (use setSmsNotificationPreference)

Symptom

Odata API Error response when performing post / upsert on Candidate API with below fields

  • "phoneCountryCode”
  • “optInCellNumber”

Response Payload

{"error" : {
"code" : "COE_GENERAL_SERVER_FAILURE", "message" : {
"lang" : "en-US", "value" : "[COE0019]phoneCountryCode required, optInCellNumber required,  with the index 0"}

Environment

Successfactors Recruiting

Cause

Inconsistency b/n Candidate OData API metadata and Payload data validation for Candidate API. Candidate Odata API does not support below fields, does not appear in Odata API dictionary

  • "phoneCountryCode”
  • “optInCellNumber”

Resolution

In Odata API we have the "setSmsNotificationPreference" which determines if a candidate receives SMS messages. To populate phoneCountryCode and optInCellNumber use ODATA Function Import setSmsNotificationPreference. In this way, the CPT will have this fields and will have the SMS options filled in via OData.

Recomendation :

1.0 Refer to Points subject setSmsNotificationPreference

Below is the link for the guide with some codes :

Sample payload URI
https://<<Host-Name>>/odata/v2/setSmsNotificationsPreference?optin=false&candidateId='XXXX'

Where : XXXX is the candidate Id

https://help.sap.com/doc/PRODUCTION/74597e67f54d4f448252bad4c2b601c9/1802/en-US/SF_HCM_OData_API_REF_en.pdf

Keywords

"phoneCountryCode”, “optInCellNumber”, setSmsNotificationPreference, Odata API, Candidate Odata API, , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , SF Integrations - EC Payroll, Boomi/ HCI, API , LOD-SF-RCM-API , Webservices & APIs , Problem

Product

SAP SuccessFactors HCM Core all versions ; SAP SuccessFactors Recruiting 1802