Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Capture number of agents logged in and OnQueue during interval

    Posted 11 days ago

    I am looking for a way to determine the number of agents that were signed into Genesys and OnQueue for each interval of the day. My WFM solution is external to Genesys and I can get the number of scheduled agents for each interval from there, but am not sure where I can get the actual data.

    Any thoughts?
    Thanks


    #PlatformAPI

    ------------------------------
    Marty Hand
    CTO
    ------------------------------


  • 2.  RE: Capture number of agents logged in and OnQueue during interval

    Posted 11 days ago

    Hi Marty,

    Just to clarify, are you looking for the average number of agents Logged In and On Queue during each interval (e.g. every 15 or 30 minutes), across all agents, so you can compare that against your external WFM scheduled staffing?

    Or are you looking for the exact number of agents at the start of each interval?



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------



  • 3.  RE: Capture number of agents logged in and OnQueue during interval

    Posted 10 days ago

    To be honest, I'll take either.  The intent is to demonstrate number of people who are not on queue during that interval but were scheduled to be.  



    ------------------------------
    Marty Hand
    CTO
    ------------------------------



  • 4.  RE: Capture number of agents logged in and OnQueue during interval

    Posted 9 days ago

    For that one I'd go per user instead of totals… same aggregates query grouped by userId, and for each interval flag the people who were scheduled in your WFM but have 0 (or close to 0) on-queue seconds, that list is your "scheduled but not on queue" and summing them gives you the count per interval

    The only tricky part is the join, you need a common key between both systems (usually email or employee ID), and a threshold, I'd use something like less than 50% of the interval on queue so a 2 minute break doesn't count as missing



    ------------------------------
    Ignacio
    Senior CX Advisory Consultant
    ------------------------------



  • 5.  RE: Capture number of agents logged in and OnQueue during interval

    Posted 11 days ago

    Hi Marty,

    I'd suggest looking at two APIs depending on what you're trying to measure:
     
    POST /api/v2/analytics/users/aggregates/query for average staffing. You can use the presence/routing-status durations returned for each interval to calculate the average number of agents signed in or On Queue.
    POST /api/v2/analytics/users/details/query for point-in-time headcount. The user-level status data can be used to reconstruct how many agents were in a particular state at the start or end of an interval.
     
    For larger historical datasets, the asynchronous User Details Jobs API may also be worth considering.
     
    I'd align both datasets to the same 15- or 30-minute intervals used by the external WFM platform.
     
    One important point: when calculating point-in-time headcount, make sure you account for statuses that started before the interval and continued into it. Otherwise, you could undercount agents who were already in that state.
     
    So, in short: Aggregates for average staffing, Details for point-in-time headcount.


    ------------------------------
    Akhil
    ------------------------------



  • 6.  RE: Capture number of agents logged in and OnQueue during interval

    Posted 10 days ago

    Natively the closest thing is the users aggregates API… POST /api/v2/analytics/users/aggregates/query with granularity PT15M (or PT30M to match your WFM), grouped by userId, asking for tAgentRoutingStatus and tOrganizationPresence

    From there you get two numbers per interval… agents logged in or on queue = users with more than 0 seconds in that status during the interval, and the one that usually matches WFM better, total on-queue seconds divided by the interval length, which gives you average concurrent agents on queue (basically actual FTE), so it's apples to apples with your scheduled numbers



    ------------------------------
    Ignacio
    Senior CX Advisory Consultant
    ------------------------------