Report to group by WrapUpCode

Using the query analytics builder, I am trying to get a report by of the number of calls tagged with each wrapup code. below is the query it is generating but it is not grouping by wrap-up code only "voice"

{
"interval": "2017-01-01T06:00:00.000Z/2017-02-11T06:00:00.000Z",
"granularity": "P1D",
"groupBy": [
"wrapUpCode",
"wrapUpNote"
],
"metrics": [
"nOffered",
"nEvaluations"
],
"flattenMultivaluedDimensions": true
}

Currently, you can't group by wrapUpNote. You can group by wrapUpCode, but you have to include one of the following statistics, as wrapUpCode is only indexed for those statics: tAcw tHandle, tTalkComplete, and tHeldComplete.

OK that worked, one other quick question -

I set a flow level variable in the IVR, this variable is visible in the API call

/api/v2/conversations/calls/c34663da-4e6d-4e55-9cfa-e524796e9fbd as an attribute

Is it possible to group based on the CSR_Message attribute?

No, you can only group by valid dimensions.