WalterAccantelli | 2017-04-10 12:47:17 UTC | #1
Hi,
We are developing a web page to retrieve informations about callbacks. We would like to count the number of callbacks that have been created for the current day.
In order to get those informations, we call API: /api/v2/analytics/conversations/details/query filtering the callback conversations as follow:
{ "interval": "2017-04-04T00:00:00.000Z/2017-04-05T00:00:00.000Z", "order": "asc", "orderBy": "conversationStart", "segmentFilters": [{ "type": "or", "clauses": [{ "type": "and", "predicates": [{ "type": "dimension", "dimension": "mediaType", "operator": "matches", "value":"callback" }, { "type": "dimension", "dimension": "queueId", "operator": "matches", "value": "123490c5-489d-4e85-a51d-f5a624737cdb" }] }, { "type": "and", "predicates": [{ "type": "dimension", "dimension": "mediaType", "operator": "matches" }, { "type": "dimension", "dimension": "queueId", "operator": "matches", "value": "567838f7-2bc7-4e98-99bb-913e0048e623" }] }] }] } Than we count the list of conversations returned.
Questions:
- Is there a better way (another API) to get those informations directly aggregate for queues?
As for calls and chat calling API /api/v2/analytics/conversations/aggregates/query
- If not, using API /api/v2/analytics/conversations/details/query, how can we distinguish callbacks that come from IVR against WEB callback?
- How can we deal with schedulate callback?
i.e. let's say a callback today has been scheduled for tomorrow: in today's query we found that callback, (and we can filter it using "callbackScheduledTime" property) - but how can we get the informations about that conversation in tomorrow's query?
Regards, /walter
tim.smith | 2017-04-10 15:51:10 UTC | #2
Is there a better way (another API) to get those informations directly aggregate for queues?
POST /api/v2/analytics/conversations/aggregates/query is the correct resource for retrieving aggregate data about conversations.
how can we distinguish callbacks that come from IVR against WEB callback?
You'll have to get the conversation details and inspect the participant details to glean which ones came from where.
How can we deal with schedulate callback?
i.e. let's say a callback today has been scheduled for tomorrow: in today's query we found that callback, (and we can filter it using "callbackScheduledTime" property) - but how can we get the informations about that conversation in tomorrow's query?
I'm not sure what you're looking for. If you want to get detailed information about a callback conversation, use GET /api/v2/conversations/callbacks/{callbackId}. Or if you're just trying to get aggregate data from a different day, adjust your interval and/or filter configuration.
system | 2017-08-28 19:33:44 UTC | #3
This post was migrated from the old Developer Forum.
ref: 1166