Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Historical Agent Activity API

    Posted 8 days ago

    Hi, I'm trying to figure out which API(s) would provide the information seen on the Performance | Agent Performance | Select Specific Agent | Schedules. By week this view shows an agent's activities for each day including how much time is attributed to each activity. 


    #PlatformAPI

    ------------------------------
    Xavier Davis
    ------------------------------


  • 2.  RE: Historical Agent Activity API

    Posted 8 days ago
    Edited by Luiz Rosa 8 days ago

    Hi Xavier Davis,

    You can access the platform's default views directly through the console. To retrieve the underlying endpoints used by these screens, you can use:

    Examples:

    Reporting Exports – Built-in Views

    POST /api/v2/analytics/reporting/exports

    Just provide the corresponding viewType, for example:

    • AGENT_PERFORMANCE_DETAIL_VIEW
    • QUEUE_PERFORMANCE_SUMMARY_VIEW
    • AGENT_SCHEDULE_DETAIL_VIEW

    Example Body:

    { "name": "Queue Performance Summary", "viewType": "QUEUE_PERFORMANCE_SUMMARY_VIEW", "timeZone": "America/Sao_Paulo", "exportFormat": "CSV", "interval": "2025-11-01T06:00:00.000Z/2025-11-25T06:00:00.000Z", "locale": "pt-br", "filter": { "mediaTypes": ["voice"] } }

    Then call:

    GET /api/v2/analytics/reporting/exports

    When the status becomes COMPLETED, just extract the downloadUrl.

    Other useful APIs

    Agent Performance

    POST /api/v2/analytics/conversations/aggregates/query

    Example Body:

    { "filter": { "type": "and", "clauses": [ { "type": "or", "predicates": [ { "dimension": "userId", "value": "544b0ab3-2298-454a-87da-e7d1e269d9ec" } ] }, { "type": "or", "predicates": [ { "type": "dimension", "dimension": "mediaType", "value": "voice" } ] } ] }, "metrics": [ "tAnswered","tHandle","tTalkComplete","tHeldComplete","tAcw","tDialing", "tContacting","nTransferred","nOutbound","tNotResponding","tAlert", "tMonitoring","nBlindTransferred","nConsultTransferred","nError", "tParkComplete","tActiveCallback","oAudioMessageCount" ], "groupBy": ["userId"], "interval":"2025-11-12T03:00:00.000Z/2025-11-13T00:30:00.000Z" }

    Conversation Details

    POST /api/v2/analytics/conversations/details/query

    Example Body:

    { "order": "desc", "orderBy": "conversationStart", "paging": { "pageSize": 50, "pageNumber": 1 }, "segmentFilters": [ { "type": "and", "predicates": [ { "dimension": "userId", "value": "544b0ab3-2298-454a-87da-e7d1e269d9ec" } ] }, { "type": "or", "predicates": [ { "dimension": "mediaType", "value": "voice" } ] }, { "type": "or", "predicates": [ { "dimension": "direction", "value": "inbound" }, { "dimension": "direction", "value": "outbound" } ] } ], "interval": "2025-11-12T03:00:00.000Z/2025-11-13T03:00:00.000Z", "conversationFilters": [], "evaluationFilters": [], "surveyFilters": [] }

    Agent Schedule

    Get the userId

    GET /api/v2/users

    or

    POST /api/v2/users/search

    Get the agent's Management Unit

    GET /api/v2/workforcemanagement/agents/{userId}/managementunit

    Retrieve the schedules

    POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/agentschedules/search

    Example Body:

    { "startDate": "2025-11-10T00:00:00.000-03:00", "endDate": "2025-11-17T00:00:00.000-03:00", "userIds": ["544b0ab3-2298-454a-87da-e7d1e269d9ec"] }

    Reference documentation

    Hope it helps. Good studies and great API exploration.



    ------------------------------
    Luiz Rosa
    Full stack developer
    ------------------------------



  • 3.  RE: Historical Agent Activity API

    Posted 7 days ago

    Hi Luiz, thank you for the thorough reply. I'm going to walk through your response today!



    ------------------------------
    Xavier Davis
    ------------------------------



  • 4.  RE: Historical Agent Activity API

    Posted 7 days ago

    Very good.. thanks



    ------------------------------
    Kaio Oliveira
    Interaxa
    ------------------------------