Kumaresan | 2019-07-25 14:20:11 UTC | #1
tWait always comes “0” through /api/v2/analytics/conversations/details/query API. How do we get real value of tWait for all conversations ?
tim.smith | 2019-07-25 14:39:05 UTC | #2
Detail queries don't return metrics. To retrieve metrics, such as tWait, use the conversations aggregate query.
wu_edward | 2019-08-08 18:21:50 UTC | #3
Hi Tim, aggregate query is sourced from a time interval but I would like to pull wait time of live interactions in queue. What do you advise?
Thanks, Ed
tim.smith | 2019-08-09 14:28:41 UTC | #4
If you're wanting to get the wait time of all conversations waiting in the queue, use the queue observation query (POST /api/v2/analytics/queues/observations/query.
If you want to get the wait time of each conversation, use a detail query and calculate the time in queue based on the ACD participant. For the detail query, you'll want to use a segment filter for segmentEnd not exists, purpose is acd, and the queue id.
wu_edward | 2019-08-09 23:04:15 UTC | #5
Hi Tim,
I tried to follow your instructions to construct the request body but got bad request. Can you please help?
Thanks, Ed
{
"segmentFilters": { "type": "and", "clauses": [ { "type": "or", "predicates": [ { "dimension": "queueId", "value": "24c3c97d-xxxx-xxxx-xxxx-f633bb9d37c8" } ] }, { "type": "or", "predicates": [ { "dimension": "purpose", "value": "acd" } ] } ] } }
tim.smith | 2019-08-12 14:51:59 UTC | #6
tim.smith, post:4, topic:5635
If you want to get the wait time of each conversation, use a detail query and calculate the time in queue based on the ACD participant. For the detail query, you'll want to use a segment filter for segmentEnd not exists, purpose is acd, and the queue id.
Which are you trying to do?
wu_edward | 2019-08-12 18:21:55 UTC | #7
I would like to pull wait time of live interactions in queue.
tim.smith | 2019-08-13 16:09:54 UTC | #8
{
"interval": "2019-08-13T06:00:00.000Z/2019-08-14T06:00:00.000Z",
"order": "asc",
"orderBy": "conversationStart",
"paging": {
"pageSize": 25,
"pageNumber": 1
},
"segmentFilters": [
{
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "segmentEnd",
"operator": "notExists",
"value": null
},
{
"type": "dimension",
"dimension": "purpose",
"operator": "matches",
"value": "acd"
},
{
"type": "dimension",
"dimension": "queueId",
"operator": "matches",
"value": "7a00f147-0a7e-47ee-b972-9559faba30ce"
}
]
}
]
}
wu_edward | 2019-08-14 19:46:32 UTC | #9
Hi Tim,
I got 400 Bad Request. I tried twisting the request body you provided and had no luck.
Thanks, Ed
{ "status": 400, "code": "bad.request", "message": "The request could not be understood by the server due to malformed syntax.", "contextId": "fe616d39-428a-4e13-aa4a-81c617ab62ef", "details": [], "errors": [] }
wu_edward | 2019-08-14 20:31:55 UTC | #10
BTW where do you find all available values of a dimension?
tim.smith | 2019-08-16 15:08:29 UTC | #11
I'm surprised there wasn't more information that came back with that error. The internal error is A filter is required for observation queries.
Note that the request body I posted above is for a conversation detail query, but the error you posted was the response to a queue observation query. You stated you wanted to pull the wait time per interaction, so you need to use the conversation detail query.
wu_edward, post:10, topic:5635, full:true
BTW where do you find all available values of a dimension?
Very few dimensions are enums so they do not have a fixed list of values, but documentation for dimensions is here: https://developer.mypurecloud.com/api/rest/v2/analytics/dimensions.html
system | 2019-09-15 15:08:32 UTC | #12
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 5635