- 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
‎11-02-2020 03:57 AM
You've welcome
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2021 05:08 AM
Hi Murali, are you just adding your script mentioned above to the "Response Message" in the "Text" bot response in VA Designer, as I tried doing that and the topic just passes straight by this action, where as If I run as a background script as you mention it tells me I am in position 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2021 09:43 PM
Hi Jonathan,
click on the script button in response msg and add the below,
(function execute() {
var chq = new GlideAggregate('chat_queue_entry');
chq.addQuery('state=1');
chq.addAggregate('count');
chq.query();
if(chq.next()){
var position = 'Your wait position is: ' + (parseInt(chq.getAggregate('count'))+1);
vaSystem.sendSystemMessage(position);
}
})()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2022 01:34 PM
Hi Murali,
Is it possible to add this to the Contact Live Agent Virtual Agent menu item?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2022 10:29 PM
Hi Aratik,
It is not possible at the Agent end, but there is a workaround. You can create a list view on workspace on this table - awa_interaction_work_item.
Agents have to click the list to know the number of chat in their queue.
Tweak the state to get exact count.
Thanks