This method returns core messaging metrics at agent level for up to the last 14 days within a 24 hours window.

Request

Method URL
POST https://{domain}/manager_workspace/api/account/{accountId}/agent_view?offset=0&limit=50&sort=agentLoad:asc

URL Parameters

Name Description Type/Value Required Notes
sort Sort the results based on a given metric in a predefined order. string Optional Default value: agentId:asc
Valid sort values:
agentLoad
closedConversations
avgTimeToResponse
avgTimeToFirstResponseFirstAssignment
avgTimeToFirstResponseAllAssignments
totalTimeToFirstResponseAllAssignments
avgWaitTime
avgWaitTimeFirstResponse
totalWaitTimeFirstResponse
assignedConversations
activeConversations
concludedConversations
closedRate
transferRate
intentMatchedRate
pendingAgentResponseRate
agentName
agentStatus
agentCurrentStatusReasonStartTime
csat
fcr
nps
maxSlots
fcrWithoutSkip
agentChannelType
Valid order values:
asc/desc
offset The offset specifies from which record to retrieve the data. numeric Optional Default is 0.
limit Max amount of agents to be received in the response. numeric Optional Default is 50.

Note: Total supported results is 1000, meaning offset+limit can't exceed 1000.

BODY Parameters

Name Description Type/Value Required Notes
filters Contains parameters to filter by. Container Required  
includeAgentMetadata Indicates whether the response should include agent's metadata. Boolean Optional Default value: true.
metricsToRetrieveByTime List of metrics that are calculated for the given time range Array <String> Optional Valid values:
closed_conversations
avg_wait_time
avg_wait_time_first_response
total_wait_time_first_response
avg_time_to_response
avg_time_to_first_response_first_assignment
avg_time_to_first_response_all_assignments
total_time_to_first_response_all_assignments
transfer_rate
closed_rate
fcr_without_skip
concluded_conversations
transfers
back_to_queue
agent_status_duration
agent_status_with_reason_duration
agent_login_duration
agent_online_duration
closed_by_agent
closed_by_consumer
auto_closed
intent_matched_rate
fcr
nps
csat
avg_conversations_duration
agent_responses_outside_sl
total_num_of_agent_responses
agent_responses_outside_sl_rate
metricsToRetrieveCurrentValue List of metrics retrieving the current value, not influenced by time Array <String> Optional Valid values:
active_conversations
assigned_conversations
agent_load
agent_channel_type
agent_current_status
agent_current_status_start_time
agent_current_status_reason
agent_current_status_reason_start_time
pending_agent_response
pending_agent_response_rate
available_slots
max_slots
agent_busy_slots
agent_ringing_slots

filters info

Name Description Type/Value Required Notes
time {from, to} Represents events time. long — epoch time in milliseconds. Required Including bounds. From/to value is rounded to the last/next 1 minutes, respectively. Time range is limited up to the last 24 hours.
agentIds An array of agent IDs. Array <String> Optional Numeric String
agentGroupIds An array of agent group IDs. Array <String> Optional Numeric String
agentSkillIds An array of skill IDs. Array <String> Optional The agent's configured skills. This filter impacts the returned agents' population so that only agents which are assigned to the given skills will be returned. These are numeric Strings
userTypes Type of the user conducting of the conversation. alphanumeric Optional Valid values: SYSTEM, HUMAN, BOT.
effectiveAgentStatus Current agent availablity. Array <String> Optional Valid values: ONLINE, OFFLINE, AWAY, BACK_SOON.
OFFLINE agents population will include agents which were logged in within the selected time frame and are currently logged out.
Default value: ["ONLINE","BACK_SOON","AWAY"]

Request body — JSON example:

{
    "filters": {
        "time": {
            "from": 1573378572695,
            "to": 1573464967376
        },
        "agentIds": [
            "2434634412"
        ],
        "agentGroupIds": [
            "-1"
        ],
        "agentSkillIds": [
            "2434921912"
        ],
        "userTypes": [
            "HUMAN"
        ],
        "effectiveAgentStatus": [
            "ONLINE",
            "BACK_SOON",
            "AWAY"
        ]
    },
    "includeAgentMetadata": "true",
    "metricsToRetrieveCurrentValue": [
    	"agent_load",
        "active_conversations",
        "assigned_conversations",
        "agent_current_status",
        "agent_current_status_start_time",
        "agent_current_status_reason",
        "agent_current_status_reason_start_time"
    ],
    "metricsToRetrieveByTime": [
        "closed_conversations",
        "avg_wait_time",
        "avg_wait_time_first_response",
        "avg_time_to_response",
        "avg_time_to_first_response_first_assignment",
        "agent_status_duration"
    ]
}

Response

Name Description Type/Value
metadata All response-related Metadata. container
agentViewRecords List of agents' records. container

metadata info:

Name Description Type/Value
count Number of agents returned based on the given filtering params long

agentViewRecords info

Name Description Type/ Value Notes
agentMetadata Agent's configuration data. container  
agentId The id of the agent. String  
agentGroupId The group the agent is assigned to. long  
agentCurrentStatus The current status of the agent. String  
agentCurrentStatusStartTime The start time of the current status as timestamp. Can be used for duration calculation. Long  
agentCurrentStatusStartTimeHumanReadable The start time of the current status in human-readable format. String  
agentCurrentStatusReason The current status reason in case of AWAY status    
agentCurrentStatusReasonStartTime The start time of the current status reason as timestamp. Can be used for duration calculation. Long  
agentCurrentStatusReasonStartTimeHumanReadable The start time of the current status reason in human-readable format. String  
activeConversations The current active conversations of the agent. Long  
assignedConversations The current open conversations that are assigned to the agent Long  
agentLoad The current load of the agent, including bot agents. Double  
agentChannelType An indication of whether the agent is classified as a voice bot agent or a different type of agent: 1) If the agent is a voice bot agent, the value will appear as ‘VOICE’. 2) Any other type of agent will appear as ‘MESSAGING’. String  
avgWaitTime The average time difference in millis between each human agent response and consumer message (first message in a seq) during the conversation, including transfers within the selected timeframe. Double  
avgWaitTimeFirstResponse The average time difference in millis between the first human agent response and the first consumer message in the conversation (does not include transfers) within the selected timeframe. Double  
totalWaitTimeFirstResponse The total time in millis consumers wait for the first human response in a conversation. Attributed to the skill and group at the time of response. Long  
avgTimeToResponse The average time difference in millis between each human agent response and consumer message (first message in a seq) during the conversation, including transfers within the selected timeframe. This value doesn't include the queue time before the agent assignment. Double  
avgTimeToFirstResponseFirstAssignment The average time difference in millis between the first human agent response and the first human agent assignment within the selected timeframe. Double  
avgTimeToFirstResponseAllAssignments The average time difference in millis between the first human agent response and the human agent assignment after every human agent assignment during the conversation within the selected timeframe. Double  
totalTimeToFirstResponseAllAssignments The total time difference in millis between the first human agent response and the human agent assignment after every human agent assignment during the conversation within the selected timeframe. Long  
closedConversations The number of conversations that were closed within the selected timeframe. Long  
agentStatusDurationList Agent status duration grouped by login status (Online / BackSoon / Away) within the selected timeframe. Array <StatusDuration> Freshness: 1 minute, does not include offline status and bots
agentStatusWithReasonDurationList Agent status duration grouped by login status (Online / BackSoon / Away), and by away reason, within the selected timeframe. Array <StatusDuration> Freshness: 1 minute, does not include offline status and bots
loginDuration Agent login duration (Online / BackSoon / Away) within the selected timeframe. Long Freshness: 1 minute, does not include bots
transfers The number of escalated conversation with Skill or Agent reason, within the selected timeframe. Long  
backToQueue The number conversations that were transferred back to queue within the selected timeframe. Long  
csat The ratio bwtween the number of questions which were answered with 4 or 5 (top two boxes) to the total responses submitted by consumers to a CSAT question within the selected timeframe. Double  
avgConversationsDuration The average handling time of closed conversations within the selected timeframe. Long  
onlineDuration Agent online duration within the selected timeframe. Long Freshness: 1 minute, does not include bots
transferRate transfers / concludedConversations within the selected timeframe. Double  
closeRate closedConversations / concludedConversations within the selected timeframe. Double  
concludedConversations The total number of conversations that were transferred or closed by the agent within the selected timeframe. Long  
pendingAgentResponse The total number of conversations that are pending for agent response. Long  
pendingAgentResponseRate pendingAgentResponse / assignedConversations Double  
closedByAgent The number of conversations closed by the agent within the selected timeframe. Long  
closedByConsumer The number of conversations closed by the consumer within the selected timeframe. Long  
autoClosed The number of conversations automatically closed within the selected timeframe. Long  
intentMatchedRate The number of matched intents out of the total messages in the conversation within the selected timeframe. Long  
maxSlots Agent's configured max slots. Long  
busySlots The agents’ number of busy slots out of the total slots the agent has configured. Double  
ringingSlots Number of ringing slots.The number of conversations that are waiting in the agents’ queue(Not the skill queue) Long  
availableSlots The number of currently available slots. Long  
agentResponsesOutsideSl The number of agents' responses that were sent after the consumer sent a message in the entire conversations outside configured SL within the selected timeframe. Long  
totalNumberOfAgentResponses Total number of agents' responses that were sent after the consumer sent a message in the entire conversations outside and within configured SL within the selected timeframe. Long  
agentResponsesOutsideSlRate agentResponsesOutsideSl / totalNumberOfAgentResponses within the selected timeframe. Double  
fcr first contact resolution Double total responses that are yes/ all total responses(Yes, No, Skip)
fcrWithoutSkip first contact resolution without skip Double total responses that are 'Yes'/ all yes and no responses excluding skip

agentMetadata info

Name Description Type/Value
agentName Agent's name String
agentNickname Agent's nickname String
agentLoginName Agnet's login name String
agentGroupName The name of the group the agent is assigned to String
agentPictureUrl Agent's picture url String
configuredMaxSlots Agent's configured max slot Long
agentSkills Agent's configured skills Array <Skill>
employeeId Agents’ employee ID String

skill info

Name Description Type/Value
skillId Skill Id Long
skillName Skill name Stirng

statusDuration info

Name Description Type/Value
agentStatus (ONLINE / BACK_SOON / AWAY) String
agentStatusDuration status duration in ms Long
agentStatusReasonId (NA / away reason id) String

Response DTO — JSON example:


{
    "metadata": {
        "count": 2,
        "self": {
            "rel": "self",
            "href": "https://lp-agentmngworkspace-qa.dev.lprnd.net/manager_workspace/api/account/le79144597/agent_view?offset=0&limit=1&sort=agentLoad:desc"
        },
        "next": {
            "rel": "next",
            "href": "https://lp-agentmngworkspace-qa.dev.lprnd.net/manager_workspace/api/account/le79144597/agent_view?offset=1&limit=1&sort=agentLoad:desc"
        },
        "last": {
            "rel": "last",
            "href": "https://lp-agentmngworkspace-qa.dev.lprnd.net/manager_workspace/api/account/le79144597/agent_view?offset=1&limit=1&sort=agentLoad:desc"
        }
    },
    "agentViewRecords": [
        {
            "agentId": "2434634412",
            "agentGroupId": -1,
            "agentCurrentStatus": "ONLINE",
            "agentCurrentStatusStartTime": 1597063917599,
            "agentCurrentStatusReasonId": "NA",
            "agentCurrentStatusReasonStartTime": 1597063919759,
            "activeConversations": 4,
            "assignedConversations": 4,
            "agentLoad": 0.133,
            "onlineDuration": 6555810,
            "loginDuration": 6555810,
            "avgWaitTime": 71470.5,
            "avgWaitTimeFirstResponse": 136519.0,
            "avgTimeToResponse": 68209.5,
            "agentStatusDurationList": [
                {
                    "agentStatus": "AWAY",
                    "agentStatusDuration": 2000
                },
                {
                    "agentStatus": "ONLINE",
                    "agentStatusDuration": 6555810
                }
            ],
            "agentMetadata": {
                "agentName": "test@liveperson.com",
                "agentNickname": "test@liveperson.com",
                "agentLoginName": "test@liveperson.com",
                "agentGroupName": "Main Group",
                "configuredMaxSlots": 30,
                "agentSkills": [
                    {
                        "skillId": 2434921912,
                        "skillName": "skill1"
                    },
                    {
                        "skillId": 3662292910,
                        "skillName": "Skill2"
                    }
                ]
            }
        }
    ]
}