Hello All,
As of now, I am sending post request using below Header Parameter for one QueueID and MediaType=voice. Please help me, How we can build/modify the same filter to Send request with multiple QueueID and MediType=voice.
{
"filter": {
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "queueId",
"operator": "matches",
"value": "20f15926-ea1d-47b0-a6e5-4be482976dad"
},
{
"type": "dimension",
"dimension": "mediaType",
"operator": "matches",
"value": "voice"
}
]
},
"metrics": [
"oWaiting"
]
}
Hi,
You have to create separate filter predicates for each queueId.
For example:
{
"filter":{
"type":"or",
"predicates":[
{
"type":"dimension",
"dimension":"queueId",
"operator":"matches",
"value":"20f15926-ea1d-47b0-a6e5-4be482976dad"
},
{
"type":"dimension",
"dimension":"queueId",
"operator":"matches",
"value":"49e0668f-e150-4656-842b-c06696b87d39"
},
{
"type":"dimension",
"dimension":"queueId",
"operator":"matches",
"value":"6e224dcf-9c33-462e-b8ba-a8e9d6d245a0"
},
{
"type":"dimension",
"dimension":"mediaType",
"operator":"matches",
"value":"voice"
}
]
},
"metrics":[
"oWaiting"
]
}
The analytics query builder is helpful for building these queries.
Hello,
Assuming you want [(queue1 or queue2 or queue3) and (mediaType = Voice)], you can use the following approach.
Two clauses - (Clause1 AND Clause2)
Clause1 contains a list of predicates with OR statement - for the queues
Second clause contains the mediaType = voice.
{
"filter": {
"type": "and",
"clauses": [
{
"type": "or",
"predicates": [
{
"type": "dimension",
"dimension": "queueId",
"operator": "matches",
"value": "xxxxxxxxx"
},
{
"type": "dimension",
"dimension": "queueId",
"operator": "matches",
"value": "yyyyyyyy"
},
{
"type": "dimension",
"dimension": "queueId",
"operator": "matches",
"value": "zzzzzzzzzzzzz"
}
]
},
{
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "mediaType",
"operator": "matches",
"value": "voice"
}
]
}
]
},
"metrics": [
"oWaiting"
]
}
Regards,
system
Closed
May 13, 2021, 2:47pm
4
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.