Add External Contact - Division aware

Hi @tim.smith,

On February 24th, a new feature " Division-aware permissions and APIs for external contacts" was released. We can see that related permissions are now Division aware (refer to the screenshot).

However, having a problem when trying to add a new contact with a division via API POST /api/v2/externalcontacts/contacts (required permission for this API is externalContacts>contact>add ) , I'm getting the error "The request failed with response code: 400. Message: The request could not be understood by the server due to malformed syntax." Here is the payload I was using when testing API call:

{
"firstName": "John",
"lastName": "March",
"middleName": "",
"title": "",
"workEmail": "john@test.com",
"personalEmail": "",
"otherEmail": "",
"division": "CSAT",
"address": {
"address1": "",
"address2": "",
"city": "",
"postalCode": ""
},
"externalSystemUrl": "",
"workPhone": {
"display": "+1 416 999 9999",
"e164": "+4169999999",
"countryCode": "CA",
"normalizationCountryCode": "CA"
}
}

Note: The "division" in the payload, exists in the Org.

Thanks,

Hello,

Try with id of your division as below:

{
  "firstName": "John",
  "lastName": "March",
  "middleName": "",
  "title": "",
  "workEmail": "[john@test.com](mailto:john@test.com)",
  "personalEmail": "",
  "otherEmail": "",
  "division": {
    "id": "ID_OF_YOUR_CSAT_DIVISION"
  },
  "address": {
    "address1": "",
    "address2": "",
    "city": "",
    "postalCode": ""
  },
  "externalSystemUrl": "",
  "workPhone": {
    "display": "+1 416 999 9999",
    "e164": "+4169999999",
    "countryCode": "CA",
    "normalizationCountryCode": "CA"
  }
}

Regards,

@Jerome.Saint-Marc

Thank you!!! I can see division as a parameter now, in the API definition :slight_smile:

One more question: when the External Contact is added via UI, in the API payload I do see this attribute "originator": "contacts-and-organizations-ui". Do you have more details on this attribute and possible values?

Hello,

No, I don't have details on these attributes. They are not listed in the ExternalContact model/class contract (including internal fields).

Regards,

1 Like