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
SAP 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/setSmsNotificationPreference?optIn=true&candidateId=****L&cellPhone='123445345'&isoCountryCode=**
Where: **** is the candidate Id
Where: ** is the iso code of the country.
Keywords
"phoneCountryCode”, “optInCellNumber”, setSmsNotificationPreference, Odata API, Candidate Odata API, , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , LOD-SF-RCM-API , Webservices & APIs , Problem