Genesys Cloud CX

 View Only
Discussion Thread View
Expand all | Collapse all

Auditing External Contacts

Jump to Best Answer
  • 1.  Auditing External Contacts

    Top 25 Contributor
    Posted 28 days ago
    Hi,
    Like a lot of people we are using External Contacts and currently have around 4000 of them. We need to audit / tidy them up.
    Here's the problem...
    In the UI, you can only see the first 1000 contacts unless you filter, but the filter does so on all columns, so I can's (for example) look at all contacts with a Last Name beginning with "A", then "B" and so on.
    Ideally, I'd like to export them all for offline analysis, but the only way (I am aware of) is to use the API, which also limits me to 1000 entries returned, in total.
    So, the question is, how do I get a full list of contacts?
    Ideas?
    #Implementation
    #PlatformAdministration
    #Telephony
    #Unsure/Other

    ------------------------------
    Paul Simpson
    Sr. Cloud Partner
    AAA Club Alliance Inc.
    ------------------------------


  • 2.  RE: Auditing External Contacts
    Best Answer

    GENESYS
    Posted 28 days ago
    Hey Paul!

    I don't have an Org with 4000 External contacts to test if the following would work or not, but I believe it would be worth giving the Scan Endpoint a try - GET https://api.mypurecloud.com/api/v2/externalcontacts/scan/{entity}

    There is more info about this particular Endpoint here.

    Hope that helps.


    Cheers, mate!


    ------------------------------
    Rafael Marciano BELISRCIANO
    Genesys - Employees
    ------------------------------



  • 3.  RE: Auditing External Contacts

    Top 25 Contributor
    Posted 27 days ago
    Thanks!

    ------------------------------
    Paul Simpson
    Sr. Cloud Partner
    AAA Club Alliance Inc.
    ------------------------------



  • 4.  RE: Auditing External Contacts

    Posted 27 days ago
    Hello Paul
    Rather than trying to audit the external contacts you could delete all the current contacts and then reimport a clean csv import. Contacts can be deleted at the Organisation level to avoid having to delete them one contact at a time...

    ------------------------------
    Thanks and regards
    Blair Wilkinson
    CVT Global Enablement
    ------------------------------



  • 5.  RE: Auditing External Contacts

    Top 25 Contributor
    Posted 27 days ago
    An interesting suggestion, unfortunately, I don't have a "master copy" external to Genesys Cloud (hence the need for an export.)

    To cut a (rather long and dull) story short, for a period of time, everyone was given access to add contacts but nobody was shown how to do it. As a result, a whole bunch of "personal" entries were made (I joke that it's the cat's nail salon and so on). Additionally, there was no naming convention (or, in fact any kind of convention!) so they are all over the place..

    My plan is to get a clean export (which, thanks to my Buddy above, it looks like I can now do), clean it up, then write a script to go through and update / delete the contacts as required using the API. (I'd rather not just "blanket delete" as we would also lose the call history, which we are not using at the moment, but may wish to in the future...)

    I hope that makes sense?

    ------------------------------
    Paul Simpson
    Sr. Cloud Partner
    AAA Club Alliance Inc.
    ------------------------------



  • 6.  RE: Auditing External Contacts

    GENESYS
    Posted 26 days ago
    Edited by Andrew Johnson 26 days ago
    Hi Paul,

    To extract your contacts, use the scan APIs.


    Once you have your updated list, I'd suggest writing a script that iterates over the data and uses the External Contacts REST API endpoints to update/delete the contacts as desired.


    Hope that helps!


      ------------------------------
      Andrew Johnson
      Genesys - Employees
      ------------------------------



    • 7.  RE: Auditing External Contacts

      GENESYS
      Posted 26 days ago
      You can also use the Genesys Cloud CLI to perform the scan and extract your data like this:

      $ gc externalcontacts scan contacts list --limit 100 --stream

      ------------------------------
      Andrew Johnson
      Genesys - Employees
      ------------------------------



    • 8.  RE: Auditing External Contacts

      Top 25 Contributor
      Posted 26 days ago
      Thanks, Andrew.

      Yes, I started down this path thanks to Rafael's suggestion.

      What I don't understand is why this limit is necessary? I can export over 1000 users (or just about any other object) in a paginated form, why not external contacts?​​

      ------------------------------
      Paul Simpson
      Sr. Cloud Partner
      AAA Club Alliance Inc.
      ------------------------------



    • 9.  RE: Auditing External Contacts

      GENESYS
      Posted 25 days ago
      Edited by Andrew Johnson 25 days ago
      Do you mean the limit in the gc command?  This command *does* export all external contacts using pagination.

      That --limit argument is simply the page size used when the command auto-pages through all of your contacts.  100 is the maximum page size that can be used for this endpoint.  For some reason, the default of 100 is not being applied by the "gc" command so I had to supply it explicitly.

      The command's help page gives more info on these particular command-line arguments:

      $ gc externalcontacts scan contacts list --help
      Scan for external contacts using paging
      
      Usage:
      gc externalcontacts scan contacts list [flags]
      
      Flags:
      --limit int The number of contacts per page; must be between 10 and 200, default is 100)
      -a, --autopaginate Automatically paginate through the results stripping page information
      -s, --stream Paginate and stream data as it is being processed leaving page information intact​


      ------------------------------
      Andrew Johnson
      Genesys - Employees
      ------------------------------



    • 10.  RE: Auditing External Contacts

      Top 25 Contributor
      Posted 13 days ago
      With the general API call, it only allows the 1st 1000 contacts to be accessed. Same with the UI without a filter, only the first 1000 (reports "too many records" if you don't put a filter in.)

      Trouble is, it isn't possible to get a series of filters that will divide the list into a comprehensive set of non-overlapping blocks, because all search terms are full text across all fields.

      My point is, why (with the standard API / UI) can't I ask to see Page 100 with a Page Size of 25? (If I have that many!) I can with other objects, like Users.

      ------------------------------
      Paul Simpson
      Sr. Cloud Partner
      AAA Club Alliance Inc.
      ------------------------------



    • 11.  RE: Auditing External Contacts

      GENESYS
      Posted 12 days ago
      First let me the address the APIs.

      The reason that the GET /api/v2/externalcontacts/contacts endpoint does not let you page through all of your contacts is that it was really designed to be a search API (via the supplying of the query param "q").  We limit the result size of search results because, from an implementation perspective, it is prohibitively expensive to return all of them, even using paging.  With the benefit of hindsight, we would probably do things differently now and give the search endpoint a different URL path and not allow an empty search query.

      We added the GET /api/v2/externalcontacts/scan/contacts endpoint to allow you to scan through all of your contacts, no matter how many you have.

      As for the Contacts UI in Genesys Cloud, it really comes down to the UX it was intended to provide.  We provided a search-based user experience.  We thought that most folks would not scroll through all of their contacts but would search for specific contacts instead.  What I am hearing from you is that you have a use-case for scrolling through all of your contacts in the UI.  That is great feedback!  Please raise an idea in the ideas portal so that we can consider how we might improve our UI.

      I hope that helps!


      ------------------------------
      Andrew Johnson
      Genesys - Employees
      ------------------------------



    • 12.  RE: Auditing External Contacts

      Top 25 Contributor
      Posted 7 days ago

      Not necessarily scroll through all of the contacts, as such, but be able to perform searches (filters) that are mutually exclusive.

      Currently, if I do a search for, say, "Sam", I would get any contact with a first or middle name Sam, but also anyone with a last name of "Samuels" or who is connected with an Organization named "Samson & Sons" and so on.

      If I were able to search / filter based on a specific column (say, Last Name) and was able to say "Starting with", then I would be able to work my way through the list and know I had reviewed everyone and done so only once.

      Due to the interface sorting by perceived "relevance", if I were to be able to scroll through all the contacts, but not complete it in a short period, I would have to start again, since the sort order may have changed!

      In out case, we are trying to implement a naming convention, which requires us to go through the list and identify those that don't currently follow it - no search / filter will help there! :-o



      ------------------------------
      Paul Simpson
      Sr. Cloud Partner
      AAA Club Alliance Inc.
      ------------------------------