Genesys Cloud - Main

 View Only

Sign Up

Expand all | Collapse all

How to export user data to Excel

  Thread closed by the administrator, not accepting new replies.
  • 1.  How to export user data to Excel

    Posted 04-28-2022 11:52
    No replies, thread closed.
    Hi, i would like to export the User / People data to Excel so that i can sort by last logged on date. Has anyone found a way to do this? I tried copying and the developer tools but cannot get it in to a format that i can import into Excel.

    Tried /API/v2/ but there does not seem to be an export option.

    Thanks in advance
    #SystemAdministration

    ------------------------------
    Andrew Lewis
    Health Management Ltd
    ------------------------------


  • 2.  RE: How to export user data to Excel

    Posted 04-28-2022 15:24
    No replies, thread closed.
    Hi Andrew,

    In Noralogix Repo361 you can use RawData very easy way to get Genesys Cloud data as CSV files

    Best regards, Taras

    ------------------------------
    Taras Buha
    taras@noralogix.com
    www.noralogix.com
    ------------------------------



  • 3.  RE: How to export user data to Excel

    Posted 04-28-2022 15:24
    No replies, thread closed.
    Hey Andrew!
    I do this pretty often. I save the JSON payload to a text file, then load it into Excel using Data>GetData>From File>From JSON, and then i use the import wizard in Excel to get the data plotted at the right level. 

    Let me know if this helps!
    Thanks,

    ------------------------------
    Cory King
    IT Lead
    IGS Energy
    ------------------------------



  • 4.  RE: How to export user data to Excel

    Posted 04-29-2022 02:42
    No replies, thread closed.

    Hi Andrew,

    I've created an Excel with a macro to export all kinds of config data, including user data. Data kan be retrieved with a single click, very useful when you need this often.

    The macro uses the VBA-JSON Tools (https://github.com/VBA-tools/VBA-JSON) to retrieve the data via the Genesys Platform API. I also added the possibly to update the user data in the Excel and push it back the Genesys.  



    ------------------------------
    Edward de Wit
    Cloudoe BV
    ------------------------------



  • 5.  RE: How to export user data to Excel

    Posted 04-30-2022 05:07
    No replies, thread closed.
    Hi Andrew, 
    You will definitely have page limit issues with the different solutions on this page. 
    Kind Regards

    ------------------------------
    Warren Beddie
    Noralogix PTY (Ltd)
    warren@noralogix.com
    ------------------------------



  • 6.  RE: How to export user data to Excel

    Posted 04-29-2022 09:26
    No replies, thread closed.
    Hi, thanks i got it working ok, however i do not get the all the data returned on one page and i have to change the page to page 2 in the query to get the rest. I have the page size set to 188 as this bring back the most data. Is there a way to get the query to return the data in one go? I am expanding on lasttokenissued.

    Thanks in advance

    ------------------------------
    Andrew Lewis
    Health Management Ltd
    ------------------------------



  • 7.  RE: How to export user data to Excel

    Posted 04-29-2022 09:35
    No replies, thread closed.
    Hi Andrew,

    No, the page size is limited to 500 user per request. In each request there is a "nestUri" specified that you can use to get the next batch. When the "nextUri" doesn't exist, you have the last set of users. So to get all users you have to create a loop.

    ------------------------------
    Edward de Wit
    Cloudoe BV
    ------------------------------



  • 8.  RE: How to export user data to Excel

    Posted 04-29-2022 09:35
    No replies, thread closed.
    I haven't found a way to get past the paging limit restrictions on the API. I usually save them into multiple files and then import into Excel for my work. I'd be interested to know if anyone else has also found a way to work around this. 

    Thanks,

    ------------------------------
    Cory King
    IT Lead
    IGS Energy
    ------------------------------



  • 9.  RE: How to export user data to Excel

    Posted 05-03-2022 04:04
    No replies, thread closed.
    I did this with the .NET SDK. It will retry automatically if you stop querying it so I just sleep the application for the duration of the Retry-After header (a few seconds).

    ------------------------------
    James Dunn
    Pitney Bowes Inc.
    ------------------------------



  • 10.  RE: How to export user data to Excel

    Posted 05-04-2022 12:17
    No replies, thread closed.
    Do you know what the api call would be to get the last logged in date for a specific user?

    ------------------------------
    Brenda Wynne
    Alcon Vision LLC
    ------------------------------



  • 11.  RE: How to export user data to Excel

    Posted 05-04-2022 12:23
    No replies, thread closed.
    Hi Brenda - 
    This is working on my end: 


    Thanks!

    ------------------------------
    Cory King
    IT Lead
    IGS Energy
    ------------------------------



  • 12.  RE: How to export user data to Excel

    Posted 05-04-2022 12:28
    No replies, thread closed.
    Hi all, i got this reply when i logged a call with support.

    Our Dev team has advised that a more reliable approach to gathering this information would involve expanding on lasttokenissued, instead of dateLastLogin.

    The dateLastLogin field is only updated opportunistically, so it's possible in the event of this field not being updated to come across the date '0000-12-30T00:00:00Z'

    ------------------------------
    Andrew Lewis
    Health Management Ltd
    ------------------------------



  • 13.  RE: How to export user data to Excel

    Posted 05-05-2022 08:29
    No replies, thread closed.
    stupid question alert!  - did you have to run that API using Postman - I'm not finding a place where I can run a custom API in the API explorer

    ------------------------------
    Brenda Wynne
    Alcon Vision LLC
    ------------------------------



  • 14.  RE: How to export user data to Excel

    Posted 05-05-2022 16:30
    No replies, thread closed.

    Hi Brenda - 
    I'm running these from the API Explorer in Genesys. 



    However, as a few other users pointed out, this expanding on lasttokenissued might be more reliable



    ------------------------------
    Cory King
    IT Lead
    IGS Energy
    ------------------------------



  • 15.  RE: How to export user data to Excel

    Posted 04-30-2022 17:27
    No replies, thread closed.
    Hi Andrew

    Take a look at the CLI for doing this.  It gives auto-paginate and stream options that get around some of the limitations people have mentioned here and can output to CSV.

    ------------------------------
    Vaun McCarthy
    ------------------------------



  • 16.  RE: How to export user data to Excel

    Posted 05-04-2022 03:47
    No replies, thread closed.

    Yes CLI might be the best option. In another project I already collected some information about this.

    In short the following steps are needed to export users:

    1. Download gc.exe
    2. gc profiles new
    3. Use credentials from OAuth Application that you created
    4. Execute: gc.exe users list --autopaginate

    Everything about CLI: https://developer.genesys.cloud/blog/2021-02-11-Introducing-the-CLI/

    A good intro video can be found here: https://www.youtube.com/watch?v=OnYDs5NsLpU&list=PL01cVFOkuN70Rk8xgI8pk_tKMcTW4FesF

    On GIT Hub is a great collection of use cases: https://github.com/MyPureCloud/quick-hits-cli

    As for an example there is a small Python script that demonstrates export and import of objects: https://github.com/MyPureCloud/quick-hits-cli/blob/main/general/migrateorgobjects.py

     There are several different examples in PowerShell, Linux Shell or Python examples as a great resource to learn how this works. But even without examples the usage is quite simple. You can install it in windows (or any other OS) following the instructions found here: https://developer.genesys.cloud/api/rest/command-line-interface/

    Hope this helps!



    ------------------------------
    Peter Faust
    Genesys - Employees
    ------------------------------