jtran7 | 2024-10-28 17:25:12 UTC | #1
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" ] }
Jason_Mathison | 2024-11-01 18:03:49 UTC | #2
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
AdrianRodriguezVar | 2024-11-04 11:11:29 UTC | #3
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
system | 2024-12-05 11:12:04 UTC | #4
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 30087