We use Omni Routing for our live chat and one of the features in there is the Omni Supervisor which shows some metrics on queues such as wait times.
There is a request where leadership in the call center wants to be notified in some way when wait times pass a certain threshold that they define for specific queues.
I haven’t been able to find any APIs that get me access to these details, but I believe I did find the object where I can filter down and get the same data being used.
I’d imagine that the wait time calculations are based on the created date of the record and the current time which may allow me to use this to do some other logic if it passes a defined threshold of say 10 minutes.
My question –
What would be an ideal way to be able to run this query frequently enough that it is near-real-time where I can trigger an email or platform event if it exceeds it?
Running a scheduled apex class every 5-10 minutes seems like a lot of overhead, but I’m not sure what other options would be available.
Is there a better pattern or approach for something like this?