This article describes how to collect statistical data about a Chat service to measure an engagement's effectiveness. The statistics data is stored in your CRM instance and can be retrieved via a REST query.
This feature is available as of the July'18 release of Live Assist for Microsoft Dynamics 365. Your Live Assist CRM Package must be at least version 3.2.0.3. See: Verify the Live Assist CRM Package version.
Note:
• Metrics about Chat Activities can be retrieved via the Visitor Contextual Information API.
• If you are an Agent or Supervisor and wish to view the statistics for a given Skill Group see: Viewing Chat Queue Statistics.
Enabling Chat Queue Statistics
The Chat Queue Statistics is not enabled by default. You can enable it via the Live Assist Administration Portal. See Configure Features.
Retrieving the Statistics
The Data can be retrieved from the following URL:
https://<CRM URL>/api/data/v9.0/cxlvhlp_chatqueuestatistics
The latest data is collected once an hour and collated and stored in 5-minute time-windows for each Engagement Skill.
Thus, any events will be recorded within 65 minutes of the time-window end time.
Example Output
The Chat Queue Statistics API returns a JSON payload that will appear similar to the following:
cxlvhlp_chatqueuestatistic { "cxlvhlp_chatqueuestatisticid": "47103cd0-c972-e811-a95c-000d3a33e0b1", "cxlvhlp_name": "Chat Queue Statistics for All", "cxlvhlp_skillid" : "123456", "cxlvhlp_skillname" : "Sales", "cxlvhlp_windowid": "1529306100000-1529306400000", "cxlvhlp_windowstarttime" : 1526913152, "cxlvhlp_windowendtime" : 1526913752, "cxlvhlp_averageavailableslots" : 5.2, "cxlvhlp_averagequeuesize" : 5.5, "cxlvhlp_chatsabandoned" : 11, "cxlvhlp_totalwaittimebeforeabandonment" : 112 }
Note: if the engagement routes to all skills because none is defined, the skillid will be -1 and skillName will be "All Skills".
Metric Descriptions
Attribute | Description |
---|---|
cxlvhlp_chatqueuestatisticid | Unique ID for this record |
cxlvhlp_name | Name for this record |
cxlvhlp_skillid | The ID of the skill |
cxlvhlp_skillname | Name of the skill |
cxlvhlp_windowid |
ID for the time window This value will be the same for all records within the same time windows. It can be used as a filter when you want to compare different skill groups over the same time period. |
cxlvhlp_windowstarttime | Timestamp of the start of the window. (Number of milliseconds since 00:00:00 1st Jan 1970) |
cxlvhlp_windowendtime | Timestamp of the end of the window. (Number of milliseconds since 00:00:00 1st Jan 1970) |
cxlvhlp_averageavailableslots | The mean-average number of available agent slots |
cxlvhlp_averagequeuesize | The mean-average number of visitors waiting in the queue |
cxlvhlp_chatsabandoned | The number of chats abandoned. (Abandon: A visitor starts a chat, enters a queue but closes the chat before it is answered) |
cxlvhlp_totalwaittimebeforeabandonment | The total amount of seconds all visitors spent queuing before abandoning |
Note: Care should be taken when combining these attributes with those found in the Visitor Contextual Information API. Chat Activities are not recorded within time windows. You will need to filter the Chat Activities within the Time Window start and end times.
Applying Filters
The REST API supports the Microsoft Dynamics 365 web API filters (See: Filter Results).
Example filter searching on Skill Name 'skillGroupA':
https://<CRM URL>/api/data/v9.0/cxlvhlp_chatqueuestatistics?$filter=cxlvhlp_skillname eq 'skillgroupA'
Example filter for a given Window Id:
https://<CRM URL>/api/data/v9.0/cxlvhlp_chatqueuestatistics$filter=cxlvhlp_windowid eq '1585014600000-1585014900000'