PureConnect

Discussion Thread View
Expand all | Collapse all

user name list based on "Role"

  • 1.  user name list based on "Role"

    Posted 03-25-2020 17:20
    Hello
    I am looking to get a dump of all users based on their "Role"
    In our organization we have various roles for agent based on the line of business they they belong to ex.  "Agent_Department_Name"
    each of these department could have anywhere from 50 to 10 agents.

    I am wondering what table name that I can look up the role<>agent co-relation.

    Now I am thinking of looking this up in the database, if there is other ways please also let me know.

    Thank you
    #ArchitectureandDesign
    #AskMeAnything(AMA)
    #PlatformAdministration

    ------------------------------
    Vathsan Sarma
    Shoppers Drug Mart Corporation
    ------------------------------


  • 2.  RE: user name list based on "Role"

    GCAP Member
    Posted 03-25-2020 22:59
    Edited by AARON LAEL 03-25-2020 22:59
    This information isn't stored in the database, it is stored in the registry/Directory Services.  The two ways I can think of to programmatically extract this data would be to either:

    • Write a custom handler to retrieve the names of all of your roles from directory services, then use the telephony toolstep "Select users with role" to pull back a list of users with that role, then you could potentially write this data to a file on your ic server using file i/o tools or even potentially write this data back to a different database.
    • Assuming you have an ICWS SDK license, you could write a fairly straight forward ICWS script to pull back the roles associated with your users and output it in whatever desired format you like.
    Since I'm on lockdown and am struggling to occupy my free time in the evenings while my wife is watching terrible crime shows, I went ahead and made a simple python script leveraging ICWS that can output a .csv containing all of your users and what roles are associated with them (either actual or effective/inherited).  It can be found here:

    https://github.com/aaronlael/PyUserRole

    Please read the readme before attempting to execute the file, always test things in dev first, and I offer no warranty or claims of security for the script (but it has been tested successfuly).

    ------------------------------
    AARON LAEL
    State of Utah
    ------------------------------



  • 3.  RE: user name list based on "Role"

    Posted 04-01-2020 14:02
    Thank you so much for taking the time to write the scrip!!!

    ------------------------------
    Vathsan Sarma
    Shoppers Drug Mart Corporation
    ------------------------------



  • 4.  RE: user name list based on "Role"

    Posted 03-26-2020 08:04
    Vathsan -

    What Release are you running?

    This information is stored in the DB.  But you have to have the Enhanced IA Change Log Report enabled.  This is something that needs to be enabled after hours, as it takes a snapshot of where commonly used nodes are "right now" in IA.  Afterwards, it will track changes to those nodes and the node settings as well.

    The first release of this feature was in 2016 R1, and included enhanced logging for the Users, Workgroups, Skills, and License nodes.
    It was enhanced in 2017 R2, to also include the Default User and Roles nodes.

    More information can be found in the Release Notes.  But if you enable this feature, it will allow the DB to not only hold the information you are looking for, but also track any changes to Roles and Role Membership, who changed them, what the change was, etc.  We have actually utilized this information to create license reports, skills audits, and tied information contained in this feature with data contained in the Login Logout Report Log to ensure that users are actually "using" their licenses when they have them applied.

    I hope this helps!


    ------------------------------
    Trent Vance
    Avtex Solutions, LLC
    ------------------------------



  • 5.  RE: user name list based on "Role"

    GCAP Member
    Posted 03-26-2020 12:19
    I always seem to forget about this change.  Thank you, Trent!

    ------------------------------
    AARON LAEL
    State of Utah
    ------------------------------



  • 6.  RE: user name list based on "Role"

    Posted 03-26-2020 13:18
    No problem at all.  This is always top of mind given the reports we've been able to create for client needs.

    Besides, while Indiana Jones found what he was looking for by way of the Holy Grail or the Lost Ark of the Covenant, PureConnect shops can answer their greatest mysteries with the Enhanced IA Change Log Report Log!

    ------------------------------
    Trent Vance
    Avtex Solutions, LLC
    ------------------------------



  • 7.  RE: user name list based on "Role"

    Posted 04-01-2020 14:03
    We are using 2018 R1.  Thank you for the info.   I will look at the table.

    ------------------------------
    Vathsan Sarma
    Shoppers Drug Mart Corporation
    ------------------------------



  • 8.  RE: user name list based on "Role"

    GCAP Member
    Posted 03-26-2020 09:09
    +1 on the [dbo].[EnhancedIAChangeLog] this helps significantly in reporting roles and licenses (as well as other things).

    As an alternative, if your agent's accounts are linked to the domain; and the AD account has Company, Department, and Job Title are setup correctly - use the Individual table.

    Tim

    ------------------------------
    Tim Cannon
    ------------------------------