Can we show "position in queue" to user in virtual agent lite.
Community Alums
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2022 07:37 AM
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2022 10:15 PM
Hi Suraj,
Yes we can show the position. But the queue count wont refresh even if user advances in the queue.
This is the script for agent chat:
(function execute() {
var VALq = new GlideAggregate('awa_interaction_work_item');
VALq.addEncodedQuery("wi_active=true^wi_state=pending_accept");
VALq.addAggregate('COUNT');
VALq.query();
if (VALq.next()) {
var countAgent = VALq.getAggregate('COUNT');
}
var msg = "Your current queue position is: " + countAgent;
vaSystem.sendSystemMessage(msg)
})()
.
I dont have any agent setup now, so if you try in your instance with agents then the count would reflect the current standing position.
Thanks