sajidali | 2016-12-01 08:29:50 UTC | #1
Hi, I am trying fetch the the user conversations using "PostConversationsDetailsQuery" but i cant see granularity. Is there any way to fetch data on 30 minutes in this case?
KevinGlinski | 2016-12-01 11:43:27 UTC | #2
You would need to use the analytics conversation detail query and include a filter on the userid https://developer.mypurecloud.com/api/rest/v2/analytics/conversation.html
sajidali | 2016-12-01 15:34:00 UTC | #3
Thanks Kevin, I have tried but i dont think userid is supported in this case:
{"status":400,"code":"bad.request","message":"Dimension userId is not valid in context CONVERSATION","messageParams":{},"contextId":"0695957d-bfcf-475c-8ef2-09e59c881ee7","details":[],"errors":[]}
tim.smith | 2016-12-01 15:37:48 UTC | #4
It needs to be a segment filter:
{
"interval": "2016-11-14T07:00:00.000Z/2016-11-26T06:59:59.000Z",
"order": "asc",
"orderBy": "conversationStart",
"paging": {
"pageSize": 25,
"pageNumber": 1
},
"segmentFilters": [
{
"type": "or",
"predicates": [
{
"type": "dimension",
"dimension": "userId",
"operator": "matches",
"value": "9ed7d9f6-0c59-4360-ac54-40dd35eb9c2f"
}
]
}
]
}
sajidali | 2016-12-02 12:41:35 UTC | #5
Thanks, really appreciate the help. I am still not able to get the data in 30 minutes interval. Maybe i can not have granularity for postconversationdetails query? I am using c# and this is how i build the query.. ConversationQuery qs = new ConversationQuery();
qs.SegmentFilters =new List<AnalyticsQueryFilter>() { new AnalyticsQueryFilter(AnalyticsQueryFilter.TypeEnum.Or, null, new List<AnalyticsQueryPredicate>() { new AnalyticsQueryPredicate( AnalyticsQueryPredicate.TypeEnum.Dimension, AnalyticsQueryPredicate.DimensionEnum.Userid, null, null, null, AnalyticsQueryPredicate.OperatorEnum.Matches, "563c0881-0bcd-4586-9cf7-c9adb1c48172" ) }) };
And this is how segment data is returned:
<img src="//inin-prod-use1-developerforum.s3.amazonaws.com/original/1X/7785f25c3cec40d2ea7c9fec06b5bfa7ecbc49b2.png" width="690" height="80">
Am i missing something here?
tim.smith | 2016-12-02 17:48:23 UTC | #6
sajidali, post:5, topic:691
Maybe i can not have granularity for postconversationdetails query?
Granularity only makes sense with aggregate queries. Detail queries return individual results for the specified interval.
sajidali | 2016-12-05 07:32:57 UTC | #7
Thanks for the clarification, Tim.
system | 2017-08-28 19:29:12 UTC | #8
This post was migrated from the old Developer Forum.
ref: 691