Conversation metric events can be used to track reply times and close times.
For example, if you want to measure reply times, you can get the time a conversation was created and the time an agent first replied to it. If you want to measure close times, you can get the time the conversation was created and the time its status was changed to closed.
The times are reported as metric events or events that are related to each of the two metrics: reply_time
and close_time
. You can access the following three types of metric events, with different events for each type depending on the metric:
- activate events, such as when a conversation is created in the case of all two metrics
- fulfill events, such as when an agent first replies to a ticket in the case of the reply time metric, or when a ticket is closed in the case of the close time metric
- pause events, such as when a conversation is snoozed in the case of all two metrics
JSON Format
Conversation Metric Events are represented as JSON objects with the following properties:
Name | Type | Description |
---|---|---|
id | string | Automatically assigned when the record is created. |
instanceId | integer | The instance of the metric associated with the event. |
conversationId | string | Id of the associated conversation. |
metric | string | The metric being tracked. Allowed values are reply_time, close_time |
type | string | The type of the metric event. Allowed values are: activate, pause, fulfill. |
actor | object | If the event triggered is triggered by an agent or a pre-defined rule. |
createdAt | string | The time the event occurred. |
Metric Events
-
Activate Event:
An activate event represents when the clock starts running for that particular metric. In the case of the
reply_time
orclose_time
metric when instance_id is 0, the time usually corresponds to the time the ticket was created. Activate events are also used to indicate that a ticket metric is no longer snoozed. -
Pause Event:
A pause event represents a conversation metric that hasn't been fulfilled yet but was paused according to the metric's conditions. Pause event get triggered when a conversation is snoozed by an agent or a business rule. When the conversation re-opens another activate event is created. Pause events are recorded for
reply_time
andclose_time
metrics. -
Fulfill Event
A fulfill event represents a conversation that was updated in such a way that the end state of that metric has been fulfilled. For example, for the
reply_time
metric, a fulfill event occurs when an agent replies to that conversation or when the conversation status is changed to closed. For theclose_time
metric, a fulfill event occurs when the conversation’s status is changed to closed. It's possible for a conversation metric to be fulfilled and then un-fulfilled. For example, thereply_time
metric is fulfilled when a reply has been sent. If the conversation receives a new message, thereply_time
metric starts again where it left off. Fulfill events are recorded for all metrics.
Instance Id
Use the instance_id
property to track each instance of a metric event that can occur more than once per conversation, such as the reply_time
event. The value increments over the lifetime of the conversation.
Actor
The actor defines who initiated the event it can be an agent, a business rule, or null.
Example
{
"id": "1412c5379085474986a3b8f4cacf45aa",
"instanceId": 2,
"metric": "close_time",
"conversationId": "8632fd061ac74fe7a259ca8aef7709f2",
"type": "fulfill",
"createdAt": "2022-01-09T22:15:33+00:00",
"actor": {
"URN": "urn:sb:user:4359f837896f6b44359929ba95cbf8e7",
"type": "user",
"name": "Tushar Mahajan",
"picture": "<https://www.gravatar.com/avatar/b71693b09b72cde259f87908dfcbb88a?d=blank>"
}
}