Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
102 lines (86 loc) · 3.29 KB

File metadata and controls

102 lines (86 loc) · 3.29 KB

Get Agent Analytics Overview

Get the analytics overview for the agents in your workspace.

{% hint style="info" %} You need the view-livechat-manager permission. {% endhint %}

HTTP MethodURLRequires Auth
GET/api/v1/livechat/analytics/agent-overviewyes

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.392ZThe start date
to*2023-05-22T12:11:45.392ZThe end date
departmentIdjsi9w0oakusssjskThe department ID to return results for.

Example Call

{% code overflow="wrap" %}

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'

{% endcode %}

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.

{% tabs %} {% tab title=" Authorization" %}

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

{% endtab %}

{% tab title="No Permission" %}

{
    "success": false,
    "error": "User does not have the permissions required for this action [error-unauthorized]"
}

{% endtab %} {% endtabs %}

Change Log

Version Description
6.4.0 Added