Symptom
When trying to create an Account via API, an error is thrown for field Website field, even though it is not mandatory in UI.
Environment
- SAP Sales Cloud Version 2
- SAP Sales Cloud and SAP Service Cloud Version 2
Reproducing the Issue
- Execute API Request with method POST to create a new Account.
- In body, the website field is sent as shown below (empty string).
- Execute the request.
- Error "Data should be of minimum 1 characters. Correct it and try again." is thrown in the response.
},
"defaultCommunication": {
"web": ""
Cause
There is minimum length check that is utilized for both fields defaultCommunication/phoneFormattedNumber and defaultCommunication/web in order to make sure that these fields are no empty strings.
In addition, since defaultCommunication/web is of dataFormat "URI", a second check is called, making sure no white space " " is contained in the value of defaultCommunication/web.
Hence, a space (" ") would be allowed for Phone field in the body, but not for Website field.
Resolution
The solution for this issue is to not send defaultCommunication/web with an empty string.
Keywords
API , Request , POST , Account , Create , Error , Web , Website , KBA , CEC-CRM-ACC , Account for SAP Sales/Service Cloud , Problem