Legacy Dev Forum Posts

 View Only

Sign Up

Overall totals seem to change if requestedRoutingSkillId groupby is used

  • 1.  Overall totals seem to change if requestedRoutingSkillId groupby is used

    Posted 06-05-2025 19:06

    matthew | 2018-09-07 20:27:07 UTC | #1

    I have 2 conversation aggregate queries that are identical apart from the groupby. the 2nd query has an additional groupby for requestedRoutingSkillId, but in the 2nd query the overall answered and handled count when totalled up is less for each agent.

    first query without requestedSkillId :

    {"interval":"2018-07-27T03:00:00/2018-08-18T04:00:00","granularity":"PT30M","groupBy":["userId","queueId","wrapUpCode","direction","mediaType"],"filter":{"type":"and","clauses":[{"type":"or","predicates":[{"type":"dimension","dimension":"userId","value":"c835421a-4cf8-44e0-a91a-63312b2283f5"},{"type":"dimension","dimension":"userId","value":"25de9906-c214-4542-a78f-b058654630ca"},{"type":"dimension","dimension":"userId","value":"37117886-08b4-4ece-bfc6-344cd9b34ec4"}]}]}}

    2nd query with requestedSkillId groupby which results in a lower call total

    {"interval":"2018-07-27T03:00:00/2018-08-18T04:00:00","granularity":"PT30M","groupBy":["userId","queueId","wrapUpCode","direction","mediaType","requestedRoutingSkillId"],"filter":{"type":"and","clauses":[{"type":"or","predicates":[{"type":"dimension","dimension":"userId","value":"c835421a-4cf8-44e0-a91a-63312b2283f5"},{"type":"dimension","dimension":"userId","value":"25de9906-c214-4542-a78f-b058654630ca"},{"type":"dimension","dimension":"userId","value":"37117886-08b4-4ece-bfc6-344cd9b34ec4"}]}]}}

    I also tried flattenMultivaluedDimensions = true, which is required for this project and this reduces the overall count even further.

    I find this strange. Adding an additional groupby or flattening the dimensions should not reduce the total counts - It should result in more aggregation combinations coming back, but the total number of calls handled should be the same.

    It potentially could be when the skills are null in the case of an outbound call. How does the groupby calculations handle the situation when the group by field is null? Does it just disregard those aggregations which have a null groupby element? If so, i don't think thats correct.


    tim.smith | 2018-09-10 21:02:39 UTC | #2

    Please open a case with PureCloud Care to investigate the discrepancies in the data.


    matthew | 2018-09-10 21:16:28 UTC | #3

    we already have, was hoping that someone from the analytics team may be able to quickly shed some light on this


    system | 2018-10-10 21:16:29 UTC | #4

    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: 3511