Get Scheduled callbacks API Interval

Hello,

I am trying to use /api/v2/analytics/conversations/details/query API to get the number of scheduled callbacks in particular interval. But the interval doesn't seem to work as expected.

For example, if I schedule 2 callbacks for today at 5pm and one callback tomorrow at 4pm, I tried to query the scheduled callbacks using below request.

{
"segmentFilters": [
{
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "mediaType",
"operator": "matches",
"value": "callback"
},
{
"type": "dimension",
"dimension": "segmentType",
"operator": "matches",
"value": "Scheduled"
},
{
"dimension": "segmentEnd",
"operator": "notExists"
},
{
"dimension": "queueId",
"operator": "matches",
"value": "{{queueId}}"
}
]
}
],
"interval": "2024-11-05T17:00:00.000-05:00/2024-11-05T18:00:00.000-05:00"
}

I am querying with interval 5pm to 6pm and it returns 3 conversation IDs including the one scheduled for the next day. Is there a way to get the number of scheduled callbacks in specific interval? And based on what condition does the callback conversations are picked in a given interval?

Thanks.

You're expecting to interval to know what you mean and do what you want.
It has it's own specific meaning and doing that.

  • Interval: Conversation detail queries will only include conversations that started on a day (UTC) touched by the interval. Conversation detail jobs will by default include all conversations whose lifetime overlaps with the query interval. If you want the same behavior as for queries, you should set the startOfDayIntervalMatching flag in the query to true.

That's the best definition of how interval works right there, from a somewhat unrelated article..

It's a conversation level filter.

The only way to find items that are scheduled for a specific call back time is to look at what those times are set at via the callbackScheduledTime property. As far as I know there are no ranges supported for that dimension though, so you can do this;

,
    {
      "type": "and",
      "predicates": [
        {
          "dimension": "callbackScheduledTime",
          "value": "2024-11-05T16:33:38.727Z"
        }
      ]
    }

but not much else. To do a range evaluation you basically have to do it through your scripting, bringing back everything where callbackScheduledTime exists for a given interval and then winnowing it down client side to the ones you actually care about.

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