Update External Contacts API

Hello Team,

We are using externalcontacts API to add/delete/update the contacts. To update the contacts, We are downloading the existing contacts(/api/v2/externalcontacts/scan/contacts) that's already present in GC and doing the comparison with the file received to update it. To update a specific contact, Is there a efficient way without downloading from GC? when the data grows, the processing time will be huge. Could you please let me know if you have any different approach?

Thank you in advance!

Regards,
Punitha

Hi,

Sounds like PUT /api/v2/externalcontacts/contacts/{contactId} fits your use case.

Best

Helllo Ebenezer_Osei,

Thank you for your quick reply.

At present, we are using the same API you mentioned above( [PUT /api/v2/externalcontacts/contacts/{contactId}). In order to get the contactId, we are scanning the contacts from Genesys using (/api/v2/externalcontacts/scan/contacts) this. when the scanned data is huge, the processing will be slow. This is where we are looking for a different approach. Please let us know if you know any. Thank you.

Regards,
Punitha.

Hello,

We found (GET /api/v2/externalcontacts/contacts) this API to search for external contacts with keywords. We have created the contacts with the contact type(schema) which will have the custom fields where we defined a identifier filed which is a searchable column. We are able to search with a identifier column but unable to do for multiple.

Example entities inserted in genesys

{
"id": "e838047e----8eaa7ee96337",
"firstName": "Punitha",
"lastName": "G",
.
.
"externalOrganization": {
"id": "9e231983-
---837753281620",
"selfUri": "/api/v2/externalcontacts/organizations/9e231983----837753281620"
},
"surveyOptOut": true,
"schema": {
"id": "4c3fee07-
---dd8d07971e47",
"version": 3,
"selfUri": "/api/v2/externalcontacts/contacts/schemas/4c3fee07----dd8d07971e47/versions/3"
},
"customFields": {
"cod_cli_sap_unique_identifier": "10001",
"type_client_text": "",
"cod_ecommerce_checkbox": true,
"ferm_cli_text": "No"
},
"type": "Curated",
"selfUri": "/api/v2/externalcontacts/contacts/e838047e-
---8eaa7ee96337"
}
{
"id": "e938047e---****-8eaa7ee96337",
"firstName": "ABCDC",
"lastName": "SADG",

"externalOrganization": {
"id": "9e231983----837753281620",
"selfUri": "/api/v2/externalcontacts/organizations/9e231983-
---837753281620"
},
"surveyOptOut": true,
"schema": {
"id": "4c3fee07----dd8d07971e47",
"version": 3,
"selfUri": "/api/v2/externalcontacts/contacts/schemas/4c3fee07-
---dd8d07971e47/versions/3"
},
"customFields": {
"cod_cli_sap_unique_identifier": "10002",
"type_client_text": "",
"cod_ecommerce_checkbox": false,
"ferm_cli_text": "No"
},
"type": "Curated",
"selfUri": "/api/v2/externalcontacts/contacts/e938047e---****-8eaa7ee96337"
}

To search using this API(/api/v2/externalcontacts/contacts), The properties for this api is something like the below one,
{
'pageSize': 20,
'pageNumber': 1,
'q': "10001", // String | User supplied search keywords (no special syntax is currently supported)
'sortOrder': "", // String | Sort order
'expand': []
}

We are able to search with 10001 In order to search multiple identifiers to get multiple contactIds, we have tried 10001,10002 or even 10001;10002. This doesn't seems to work. Is it possible to get multiple contactIds with this API? Could you please help me here? Thank you!

Regards,
Punitha

Hi @Punitha,

Currently, the only way you can use the APIs to retrieve all of your stored external contact is via the scan APIs. If your data set is very large, it may take some time to scan through it all.

We are considering adding an export API that would let you request a dump of all of your External Contacts data in a single request. If that feature interests, you please request it / vote for it on the Ideas Portal and provide as much information about your use-case as possible.

Thank you,
Andrew

In general, you can take a few different approaches:

  • loop over all of your External Contacts data in Genesys Cloud and compare it to some other source
  • loop over all of your data in some other source and compare it to the data in Genesys Cloud

You may need to do a combination of the two if your agents are creating new Contact records in External Contacts on the Genesys Cloud side.

Hope that helps!
Andrew

Regarding your search for custom fields: the APIs do not allow you to search by multiple identifier values at the same time.

Could you search for one at a time instead?

What is your goal in doing this search by the way?

Hello Andrew,

Thank you for your response.

The goal of using the search API(GET /api/v2/externalcontacts/contacts) is to update the external contacts with a single request.

Like in the example ,
{"id": "123"
"customFields": {
"cod_cli_sap_unique_identifier": "10001",
"type_client_text": "",
"cod_ecommerce_checkbox": true,
"ferm_cli_text": "No"},}

{"id": "234"
"customFields": {
"cod_cli_sap_unique_identifier": "10002",
"type_client_text": "",
"cod_ecommerce_checkbox": true,
"ferm_cli_text": "No"},}

If there is a possibility to get these two contacts in a single request, we are planning to use bulkUpdate to update the contacts in batches. Is there any other way to update the contacts in batches by providing the unique identifier?

We are trying to identify the possibility of updating the contacts more efficiently.

Best Regards,
Punitha

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.