The Contact Id column from the import CSV is not found directly in the API call. If you are fortunate, it was also in the "Contact External System URL" column in the original CSV.
When you GET the external contacts using
https://developer.mypurecloud.com/api/rest/v2/externalcontacts/#get-api-v2-externalcontacts-contacts look for the field "externalSystemUrl":
That field might contain the ID from the bulk import CSV.
"modifyDate": "2019-08-27T19:15:46Z",
"createDate": "2018-11-25T22:10:19Z",
"externalOrganization": {
"id": "24278d16-dcd4-4d37-b1ec-50972128bd8a",
"selfUri": "/api/v2/externalcontacts/organizations/24278d16-dcd4-4d37-b1ec-50972128bd8a"
},
"surveyOptOut": false,
"externalSystemUrl": "https://www.example.com/contacts/1234567890",
"selfUri": "/api/v2/externalcontacts/contacts/6dba98ff-7d78-46c0-a96f-234897dfa366"
}
In this example, the Contact Id in the CSV was 1234567890, and was included as part of the URL. If your original CSV was not set up that way I don't have a good suggestion for what you might do. Perhaps someone in the Developer Forum Becky linked will know.
------------------------------
George Ganahl GCP (PureCloud) ICCE CCXP
Principal Technology Consultant
Genesys
------------------------------
Original Message:
Sent: 10-15-2019 05:25
From: Anders Vejen
Subject: Bulk update of External contacts
Hi
Is there any way to get the original (external) ID used in the bulk CSV import using the API?
I've looked through the organization and external contact API's but haven't found it. Seems to be a hidden field.
Or am I just looking in the wrong API?
BR Anders
------------------------------
Anders Vejen
TDC Netdesign
------------------------------
Original Message:
Sent: 08-27-2019 15:18
From: George Ganahl
Subject: Bulk update of External contacts
I can only speak to my own testing, but I find that the history of interactions is kept intact when you update contact info by doing another import, as long as you have the correct ID (it has to match the original used to create the contact at first import or, if the contact was created within PureCloud, has to match the ID in PureCloud which you can get via the API Explorer).
------------------------------
George Ganahl GCP (PureCloud) ICCE CCXP
Principal Technology Consultant
Genesys