Can we show "position in queue" to user in virtual agent lite.

Community Alums
Not applicable

Can we show "position in queue" to user in virtual agent lite?

1 REPLY 1

Muralidharan BS
Mega Sage
Mega Sage

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)

})()

 

find_real_file.png.       

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. 

find_real_file.png

 

Thanks