dkprado | 2018-03-05 19:04:26 UTC | #1
Hi there. Today I'm dealing with an Aggregate query that is resulting less counts than I see in the interactions report. I'm trying to understand what could be wrong with my query that would lead me to the wrong count.
The following query is supposed to count the number of 'Mute calls' wrapup, from interactions that have a 'voice' line.
{ "interval": "2018-03-05T03:00:00.000Z/2018-03-06T03:00:00.000Z", "groupBy": [ "mediaType", "outboundCampaignId", "userId", "wrapUpCode" ], "filter": { "type": "and", "clauses": [{ "type": "or", "predicates": [ { "type": "dimension", "dimension": "outboundCampaignId", "operator": "matches", "value": "1550f71d-bb61-4160-b319-2be7513d8c00" },{ "type": "dimension", "dimension": "outboundCampaignId", "operator": "matches", "value": "a53933fb-c5f8-4b53-b414-00818b7f4dac" },{ "type": "dimension", "dimension": "outboundCampaignId", "operator": "matches", "value": "ab950088-f76b-40bf-817c-26093279a96d" } ] }], "predicates": [{ "type": "dimension", "dimension": "mediaType", "operator": "matches", "value": "voice" }] }, "metrics": [ "tHandle" ] }
However, it is not counting this particular conversation / interaction, which ended with the expected wrapup:
{ "conversations": [ { "conversationId": "76fd7e8b-e2a5-4132-b420-31d03dcff62e", "conversationStart": "2018-03-05T12:23:17.060Z", "conversationEnd": "2018-03-05T12:25:27.849Z", "participants": [ { "participantId": "0903c290-6641-48b1-8a29-1fa5b6dded9e", "participantName": "Customer", "purpose": "customer", "sessions": [ { "mediaType": "callback", "sessionId": "e983ee64-1f5b-4e3b-b67f-bd9ccc7930fe", "direction": "inbound", "outboundCampaignId": "1550f71d-bb61-4160-b319-2be7513d8c00", "outboundContactId": "6ef0588886ecb1a7db1ee2fa8771ccfc", "outboundContactListId": "a23d0255-ff28-4802-953e-92e619143adf", "callbackUserName": "Customer", "callbackNumbers": [ "+5519974158985", "+551932768133" ], "scriptId": "218e4780-e173-11e6-9d36-2b4bc388235b", "skipEnabled": true, "timeoutSeconds": 0, "segments": [ { "segmentStart": "2018-03-05T12:23:17.060Z", "segmentEnd": "2018-03-05T12:25:27.849Z", "queueId": "e2aa83f8-5923-4918-beac-9b433eca5872", "disconnectType": "peer", "segmentType": "interact", "conference": false } ] }, { "mediaType": "voice", "sessionId": "b5231d1f-6cf9-45a9-aea6-2b6d33bdda3c", "ani": "sip:+551935147800@10.201.36.27;user=phone", "direction": "outbound", "dnis": "tel:+5519974158985", "outboundCampaignId": "1550f71d-bb61-4160-b319-2be7513d8c00", "outboundContactId": "6ef0588886ecb1a7db1ee2fa8771ccfc", "outboundContactListId": "a23d0255-ff28-4802-953e-92e619143adf", "edgeId": "24ca2c3f-5a8e-4d6c-b953-9d275b21637c", "remoteNameDisplayable": "Brazil", "segments": [ { "segmentStart": "2018-03-05T12:23:21.762Z", "segmentEnd": "2018-03-05T12:25:21.548Z", "queueId": "e2aa83f8-5923-4918-beac-9b433eca5872", "disconnectType": "peer", "segmentType": "dialing", "conference": false } ] } ] }, { "participantId": "290a86a7-6f45-46b9-a784-075e51089752", "purpose": "acd", "sessions": [ { "mediaType": "callback", "sessionId": "7868fd60-3e93-45b5-a22e-c9916438db6b", "direction": "inbound", "outboundCampaignId": "1550f71d-bb61-4160-b319-2be7513d8c00", "outboundContactId": "6ef0588886ecb1a7db1ee2fa8771ccfc", "outboundContactListId": "a23d0255-ff28-4802-953e-92e619143adf", "callbackUserName": "Customer", "callbackNumbers": [ "+5519974158985", "+551932768133" ], "scriptId": "218e4780-e173-11e6-9d36-2b4bc388235b", "peerId": "e983ee64-1f5b-4e3b-b67f-bd9ccc7930fe", "skipEnabled": true, "timeoutSeconds": 0, "segments": [ { "segmentStart": "2018-03-05T12:23:17.061Z", "segmentEnd": "2018-03-05T12:23:18.744Z", "queueId": "e2aa83f8-5923-4918-beac-9b433eca5872", "disconnectType": "transfer", "segmentType": "interact", "conference": false } ] } ] }, { "participantId": "545a3b08-7562-4bee-a41d-922295a0325a", "userId": "55fc8318-14d8-461f-8915-fde3a68b4e94", "purpose": "agent", "sessions": [ { "mediaType": "callback", "sessionId": "043c75ea-bd48-4a78-b3bc-8272f0b4a66e", "direction": "inbound", "outboundCampaignId": "1550f71d-bb61-4160-b319-2be7513d8c00", "outboundContactId": "6ef0588886ecb1a7db1ee2fa8771ccfc", "outboundContactListId": "a23d0255-ff28-4802-953e-92e619143adf", "callbackUserName": "Customer", "callbackNumbers": [ "+5519974158985", "+551932768133" ], "scriptId": "218e4780-e173-11e6-9d36-2b4bc388235b", "peerId": "e983ee64-1f5b-4e3b-b67f-bd9ccc7930fe", "skipEnabled": true, "timeoutSeconds": 0, "segments": [ { "segmentStart": "2018-03-05T12:23:17.176Z", "segmentEnd": "2018-03-05T12:23:18.747Z", "queueId": "e2aa83f8-5923-4918-beac-9b433eca5872", "segmentType": "alert", "conference": false }, { "segmentStart": "2018-03-05T12:23:18.747Z", "segmentEnd": "2018-03-05T12:25:27.830Z", "queueId": "e2aa83f8-5923-4918-beac-9b433eca5872", "wrapUpCode": "3585a751-b830-491c-90e2-ed467eae345e", "wrapUpNote": "", "disconnectType": "client", "segmentType": "interact", "conference": false }, { "segmentStart": "2018-03-05T12:25:26.906Z", "segmentEnd": "2018-03-05T12:25:26.906Z", "queueId": "e2aa83f8-5923-4918-beac-9b433eca5872", "wrapUpCode": "3585a751-b830-491c-90e2-ed467eae345e", "wrapUpNote": "", "disconnectType": "client", "segmentType": "wrapup", "conference": false } ] }, { "mediaType": "voice", "sessionId": "7613f58a-544e-403c-a2e2-cb69f6f3833f", "ani": "sip:CPSTREETA-25@10.201.36.27", "direction": "outbound", "dnis": "tel:+5519974158985", "outboundCampaignId": "1550f71d-bb61-4160-b319-2be7513d8c00", "outboundContactId": "6ef0588886ecb1a7db1ee2fa8771ccfc", "outboundContactListId": "a23d0255-ff28-4802-953e-92e619143adf", "edgeId": "bf24eacf-2a1a-4ae3-830b-465357c8f223", "segments": [ { "segmentStart": "2018-03-05T12:23:21.495Z", "segmentEnd": "2018-03-05T12:23:21.734Z", "queueId": "e2aa83f8-5923-4918-beac-9b433eca5872", "segmentType": "contacting", "conference": false }, { "segmentStart": "2018-03-05T12:23:21.734Z", "segmentEnd": "2018-03-05T12:25:21.738Z", "queueId": "e2aa83f8-5923-4918-beac-9b433eca5872", "disconnectType": "timeout", "segmentType": "dialing", "conference": false }, { "segmentStart": "2018-03-05T12:25:26.906Z", "segmentEnd": "2018-03-05T12:25:26.906Z", "queueId": "e2aa83f8-5923-4918-beac-9b433eca5872", "wrapUpCode": "3585a751-b830-491c-90e2-ed467eae345e", "wrapUpNote": "", "disconnectType": "timeout", "segmentType": "wrapup", "conference": false } ] } ] } ] } ] }
(sorry for the large amount of data). Could you explain what is excluding this conversation from the aggregate count?
Thanks!
dkprado | 2018-03-06 17:12:18 UTC | #2
I'm comparing the Aggregate query results with the Interaction Details report. The problem is that I see a higher count of wrapups in the Interaction Details report, for the same timeframe.
Per my tests, the problem is that my query is not covering the interactions without a "voice" line. It seems that we have interactions with only "callback" line resulting the wrapup I'm trying to count.
system | 2018-04-06 17:12:21 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 2565