apriftis | 2019-11-22 13:09:37 UTC | #1
Hello,
I am trying to find a quick way to get conversations and filter them. Our only option is to filter them by scriptids, but in some cases the analytic api brings conversations with null value at sciptid at all participants.
Any suggestion for that?
tim.smith | 2019-11-22 15:25:36 UTC | #2
The conversation detail query allows a filter by scriptId: https://developer.mypurecloud.com/api/rest/v2/analytics/conversation.html
apriftis | 2019-11-22 15:43:06 UTC | #3
Could you give some more help on that. I didnt find a way to do it.
here is my query for the moment
var query = new ConversationAggregationQuery { Interval = $"{fromUtc.ToString("s")}/{toUtc.ToString("s")}", };
query.GroupBy = new List<ConversationAggregationQuery.GroupByEnum>() { ConversationAggregationQuery.GroupByEnum.Conversationid, ConversationAggregationQuery.GroupByEnum.Purpose };
query.Filter = new ConversationAggregateQueryFilter { Type = ConversationAggregateQueryFilter.TypeEnum.And, Predicates = new List<ConversationAggregateQueryPredicate> { new ConversationAggregateQueryPredicate {Dimension = ConversationAggregateQueryPredicate.DimensionEnum.Wrapupcode,_Operator = ConversationAggregateQueryPredicate.OperatorEnum.Exists } } };
tim.smith | 2019-11-22 15:58:04 UTC | #4
You can use the analytics query builder to build and test queries before you start writing any code. https://developer.mypurecloud.com/developer-tools/#/analytics-query-builder
You're looking for something like this:
{
"interval": "2019-11-22T07:00:00.000Z/2019-11-23T07:00:00.000Z",
"order": "asc",
"orderBy": "conversationStart",
"paging": {
"pageSize": 25,
"pageNumber": 1
},
"segmentFilters": [
{
"type": "or",
"predicates": [
{
"type": "dimension",
"dimension": "scriptId",
"operator": "matches",
"value": "12d65b7b-8f73-46de-a66f-bc28ef6b631c"
}
]
}
]
}
system | 2019-12-23 15:58:05 UTC | #5
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: 6551