Get Agent Analytics Overview

Get the analytics overview for the agents in your workspace.

You need the view-livechat-manager permission.

HTTP MethodURLRequires Auth

GET

/api/v1/livechat/analytics/agent-overview

Query Parameters

KeyExample ValueDescription

name*

Total_conversations

The data that you want to get. The available options are:

  • Total_conversations

  • Avg_chat_duration

  • Total_messages

  • Avg_first_response_time

  • Best_first_response_time

  • Avg_response_time

  • Avg_reaction_time

from*

2019-05-22T12:11:45.392Z

The start date

to*

2023-05-22T12:11:45.392Z

The end date

departmentId

jsi9w0oakusssjsk

The department ID to return results for.

Example Call

curl -L -X GET 'http://localhost:3000/api/v1/livechat/analytics/agent-overview?name=Total_messages&from=2019-05-22T12%3A11%3A45.392Z&to=2023-05-22T12%3A11%3A45.392Z' \
-H 'x-auth-token: 6gwMfYPDoQzMCAnwjP5iILveZINplU7V-1DYzkhhxsc' \
-H 'x-user-id: rmbMnnpqkuxEbrajt'

Example Response

{
    "head": [
        {
            "name": "Agent"
        },
        {
            "name": "Total_messages"
        }
    ],
    "data": [
        {
            "name": "kim",
            "value": "25"
        },
        {
            "name": "jane",
            "value": "50"
        },
        {
            "name": "baek",
            "value": "44"
        },
        {
            "name": "sam",
            "value": "111"
        },
        {
            "name": "john",
            "value": "67"
        },
        {
            "name": "aline",
            "value": "90"
        },
        {
            "name": "addie",
            "value": "49"
        }
    ],
    "success": true
}

Errors

Any of the following errors can occur on the endpoint.

  • Authorization: Requires an authentication token for the request to be made.

  • No Permission: This occurs when the authenticated user doesn't have the view-livechat-manager permission.

{
    "status": "error",
    "message": "You must be logged in to do this."
}

Change Log

VersionDescription

6.4.0

Added

Last updated

Rocket.Chat versions receive support for six months after release.