Can we dynamically show "position in queue" to user in virtual agent.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2025 04:41 PM
I have configured the queue count during a live agent transfer in the Virtual Agent and displayed it as a system message using the script below. However, I am looking for options to dynamically track and update this count in real time. Is there a way to achieve this?
(function execute() {
var VALq = new GlideAggregate('awa_interaction_work_item');
VALq.addEncodedQuery("wi_active=true^wi_state=queued");
VALq.addAggregate('COUNT');
VALq.query();
if (VALq.next()) {
var countAgent = VALq.getAggregate('COUNT');
}
var msg = "Your current queue position is: " + countAgent;
vaSystem.sendSystemMessage(msg)
})()
0 REPLIES 0