For sure.
First of all you should create a custom field.
In my environment I used "identifier" because is also searchable. You can find list here: https://help.mypurecloud.com/articles/custom-field-types/
You can create in: Admin -> Directory -> External Contacts in "Custom Contact Types" choosing as "field Type" the field identifier
I create field with name "identifier" and field label "id"
Than import the following Data Action to create External Contact. You shoud use in XXXXXXXXXXXXXXX the id of the custom field that you create.
{
"name": "Create External Contact - Exported 2023-03-03 @ 17:14",
"integrationType": "purecloud-data-actions",
"actionType": "custom",
"config": {
"request": {
"requestUrlTemplate": "/api/v2/externalcontacts/contacts",
"requestType": "POST",
"headers": {
"Content-Type": "application/json",
"UserAgent": "PureCloudIntegrations/1.0"
},
"requestTemplate": "{\n \"firstName\": \"${input.firstName}\",\n \"lastName\": \"${input.lastName}\",\n \"schema\": {\n \"id\": \"XXXXXXXXXXXXXXX\",\n \"version\": 7,\n \"selfUri\": \"/api/v2/externalcontacts/contacts/schemas/XXXXXXXXXXXXXXX/versions/7\"\n },\n \"customFields\": {\n \"id_identifier\": \"${input.id_identifier}\"\n }\n}"
},
"response": {
"translationMap": {
"externalContactId": "$.id"
},
"translationMapDefaults": {},
"successTemplate": "{\n \"externalContactId\": ${externalContactId}\n}"
}
},
"contract": {
"input": {
"inputSchema": {
"title": "Ext Contact creation Request",
"type": "object",
"properties": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"id_identifier": {
"type": "string"
}
},
"additionalProperties": true
}
},
"output": {
"successSchema": {
"title": "externalContactId",
"type": "object",
"properties": {
"externalContactId": {
"type": "string"
}
},
"additionalProperties": true
}
}
},
"secure": false
}
------------------------------
Enrico Preite
Vodafone Procurement Company S.a.r.l.
------------------------------