Can a dynamic time interval be created in the request body for a post data action

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"
]
}

We currently do not support the date/time velocity functions. You can vote on adding that capability here:

https://genesyscloud.ideas.aha.io/ideas/OP-I-337

Hi
In this case you can set as inpuot, endDate and startDate.
Then you can calculate these dates from script or architech flow using logic.

BR

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.