Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Pull Agent Performance Statistics using API Integration

    Posted 05-22-2025 01:32

    Hi,

    I am trying to retrieve below Agent Performance statistics using API connection. Can someone please help me with the API link I must be using to pull this information.

    We are already using below API connections but it does provide different details :

    api/v2/quality/agents/activity  :    Agent evaluation summary

    api/v2/analytics/conversations/aggregates/query   : conversation types and Aggregates

    I am after below statistics :


    #PlatformAPI

    ------------------------------
    Baljinder Singh
    ------------------------------


  • 2.  RE: Pull Agent Performance Statistics using API Integration

    Posted 06-06-2025 15:22

    Hi Baljinder,
    I see the following API routes being used by the agent performance view.  Keep in mind there may be additional processing done on the UI side, but these are the API routes being used:

    - GET api/v2/authorization/divisions
    - POST /api/v2/users/search w/ the following request body:

    {
      "enforcePermissions": true,
      "pageSize": 25,
      "pageNumber": 1,
      "sortOrder": "asc",
      "sortBy": "name",
      "expand": [
        "authorization",
        "skills",
        "languages",
        "routingStatus",
        "primaryPresence",
        "conversationSummary",
        "outOfOffice",
        "geolocation",
        "presence",
        "locations",
        "station",
        "groups",
        "locations"
      ],
      "query": [
        {
          "fields": [
            "state"
          ],
          "values": [
            "active"
          ],
          "type": "EXACT",
          "operator": "OR"
        },
        {
          "type": "EXACT",
          "fields": [
            "divisionId"
          ],
          "values": [
            "<your-division-id-here>"
          ]
        }
      ],
      "types": [
        "users"
      ]
    }

    - GET /api/v2/workforcemanagement/adherence w/ a "userId" query param for each user returned from the user search
    - POST api/v2/analytics/conversations/aggregates/query w/ the request body:

    {
        "filter": {
            "type": "and",
            "clauses": [
                {
                    "type": "or",
                    "predicates": [
                        {
                            "dimension": "userId",
                            "value": "<your-user-id-here>"
                        },
                        #...repeat for each user id...
                    ]
                },
                {
                    "type": "or",
                    "predicates": [
                        {
                            "dimension": "mediaType",
                            "value": "voice"
                        }
                    ]
                }
            ]
        },
        "metrics": [
            "tAnswered",
            "tHandle",
            "tTalkComplete",
            "tHeldComplete",
            "tAcw",
            "tDialing",
            "tContacting",
            "nTransferred",
            "nOutbound",
            "tNotResponding",
            "tAlert",
            "tMonitoring",
            "nBlindTransferred",
            "nConsultTransferred",
            "nError",
            "tParkComplete",
            "tActiveCallback"
        ],
        "groupBy": [
            "userId"
        ],
        "interval": "<your-iso-8601-datetime-interval-here>"
    }

     



    ------------------------------
    Jacob Shaw
    Sr. Software Engineer
    ------------------------------