- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2020 02:19 AM
Hi,
I want to know is there any way in VA so we can define the queue waiting number while our chat is routed to Live Agent.
For Example- If have choose option to contact to live agent and all agents are busy and there are 3 other people waiting for the agents. So my queue waiting number should be 4 and visible to me.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2020 10:26 PM
Hi Sarabjeet,
I tried the same thing and it worked for me. But can you try this script in backgrounds and see the result. Also manually check in chat_queue_entry table and see the logs in the debug.
var chq = new GlideAggregate('chat_queue_entry');
chq.addQuery('state=1');
chq.addAggregate('count');
chq.query();
if(chq.next())
gs.info( 'Your wait position is: ' + (parseInt(chq.getAggregate('count'))+1));
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2020 02:23 AM
Hi,
I don't think you can configure that
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2020 10:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2020 12:45 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2020 08:53 PM
Hi Sarabjeet,
Add a bot response before the connect to live agent.
And use the script to return the count.
(function execute() {
var chq = new GlideAggregate('chat_queue_entry');
chq.addQuery('state=1');
chq.addAggregate('count');
chq.query();
if(chq.next())
return 'Your wait position is: ' + (parseInt(chq.getAggregate('count'))+1);
})()
I tried using the lookup action, but I dont know how to retrieve the count without using script.
Thanks