Hello everyone,
I am currently using a data action to count the number of calls on a DID in order to calculate a ratio for triggering a recording.
_____
/api/v2/analytics/conversations/details/query
{
"interval": "${input.Interval}",
"paging": {
"pageSize": 25,
"pageNumber": 1
},
"segmentFilters": [
{
"type": "or",
"predicates": [
{
"type": "dimension",
"dimension": "dnis",
"operator": "matches",
"value": "${input.DNI}"
}
]
}
]
}
______
During unit testing, there is no issue, but things get complicated when I move to production.
At the end of the day, the response returns more than 80,000 lines, whereas I only need the "totalhits." Due to the long execution time, the calls fail when invoking the data action in a flow.
How can I optimize the response to get only the total hits or the minimum information?
The interval is calculated like this: append(ToString(MakeDateTime(year(GetCurrentDateTimeUtc()), month(GetCurrentDateTimeUtc()), day(GetCurrentDateTimeUtc()), 00, 00, 00)),"/",ToString(MakeDateTime(year(GetCurrentDateTimeUtc()), month(GetCurrentDateTimeUtc()), day(GetCurrentDateTimeUtc()), 23, 59, 59)))
If I can't optimize the response (even with a pagesize: 1, it remains too long), how can I retrieve the last quarter-hour within the interval? For example, at 10:10:00, I would need the interval 09:45:00-10:00:00.
Thank you for your assistance.
#ArchitectureandDesign#Integrations#Routing(ACD/IVR)#Telephony------------------------------
Arnaud
------------------------------