I been trying to see if a dynamic time interval for the current date and going back can be added to the request body teemplate for my data action for my
/api/v2/analytics/conversations/aggregates/query API but when I tried it I would get malformed syntax. Is it actually possible to do it or there is limitation in genesys.
{
"interval": "{{dateTime.format(dateTime.setHour(dateTime.setMinute(dateTime.setSecond(dateTime.addDays(currentDateTime, -7), 0), 0), 5), 'yyyy-MM-ddTHH:mm:ss.SSSZ')}}/{{dateTime.format(dateTime.setHour(dateTime.setMinute(dateTime.setSecond(dateTime.addDays(currentDateTime, -6), 0), 0), 5), 'yyyy-MM-ddTHH:mm:ss.SSSZ')}}",
"granularity": "PT24H",
"timeZone": "",
"groupBy": [
"outboundCampaignId"
],
"filter": {
"type": "and",
"clauses": [
{
"type": "or",
"predicates": [
{
"type": "dimension",
"dimension": "outboundCampaignId",
"operator": "matches",
"value": ""
}
]
}
]
},
"flattenMultivaluedDimensions": true,
"metrics": [
"nOutboundAbandoned"
]
}