Hi,
I am trying to get the amount of calls currently being dialed in a queue.
How can I get this number? Is there a way to do this using the python SDK similar to oUserRoutingStatuses?
Thank you
Hi,
I am trying to get the amount of calls currently being dialed in a queue.
How can I get this number? Is there a way to do this using the python SDK similar to oUserRoutingStatuses?
Thank you
Hi,
The /api/v2/analytics/queues/observations/query
can be used for this.
The following metrics can be used:
oAlerting
: Observed number of alerting conversations on a queue
oInteracting
: Observed number of current users interacting on a queue
oWaiting
: Observed number of interactions waiting in a queue
I'm pretty sure oInteracting
is the metric you're looking for.
This python code should do it for you:
analyticsApi = PureCloudPlatformClientV2.AnalyticsApi(apiclient)
queueIdPredicate = PureCloudPlatformClientV2.QueueObservationQueryPredicate()
queueIdPredicate.type = "dimension"
queueIdPredicate.dimension = "queueId"
queueIdPredicate.operator = "matches"
queueIdPredicate.value = "[YOUR_QUEUE_ID]"
mediaTypePredicate = PureCloudPlatformClientV2.QueueObservationQueryPredicate()
mediaTypePredicate.type = "dimension"
mediaTypePredicate.dimension = "mediaType"
mediaTypePredicate.operator = "matches"
mediaTypePredicate.value = "voice"
myFilter = PureCloudPlatformClientV2.QueueObservationQueryFilter()
myFilter.type = "and"
myFilter._predicates = [queueIdPredicate, mediaTypePredicate]
body = PureCloudPlatformClientV2.QueueObservationQuery()
body.filter = myFilter
body.metrics = ["oInteracting"]
response = analyticsApi.post_analytics_queues_observations_query(body)
print(response)
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.