Virtual Agent - route to live agent queue

Jesper Slot
Tera Guru

Hi

I got a setup with HR, Finance, IT and some scoped applications. They all got a portal and I'd like to use virtual agent and chat on some of the portals.

I've been looking at virtual agent, but I don't get how I can route a portal user to a specific queue from a specific portal. So for example, I'd like to route users on the IT portal to the IT chat queue. 

I know you can transfer a user to a live agent from a topic via the "vaSystem.connectToAgent();" command but how do I combine it with the LiveAgent_itsm_queue ? No matter what I try, I my chats ends up in the global queue.

Hope you got some ideas 🙂

/Jesper

1 ACCEPTED SOLUTION

Marc54
Mega Guru

Hi Jesper.

there are 2 options that I have found so far:

1. static in the portal widget instance options using: sysparm_liveagent_queue=<sys_id_of_chat_queue>

2. dynamic in a script action 

vaVars.LiveAgent_queue =  <sys_id_of_chat_queue>;
if (vaSystem.isLiveAgentAvailable()) {
    vaSystem.connectToAgent();
    }

I have tested both on Madrid and it is working.

Instead of setting a fixed sys_id you can retrieve that from your queue definitions using GlideRecord lookups ofcourse.

 

Marc

View solution in original post

13 REPLIES 13

Thanks Jesper, will let you know how we get on!

That would be very nice 🙂

Marc54
Mega Guru

Hi Jesper.

there are 2 options that I have found so far:

1. static in the portal widget instance options using: sysparm_liveagent_queue=<sys_id_of_chat_queue>

2. dynamic in a script action 

vaVars.LiveAgent_queue =  <sys_id_of_chat_queue>;
if (vaSystem.isLiveAgentAvailable()) {
    vaSystem.connectToAgent();
    }

I have tested both on Madrid and it is working.

Instead of setting a fixed sys_id you can retrieve that from your queue definitions using GlideRecord lookups ofcourse.

 

Marc

Hi Marc,

Could you provide some example on how to modify the widget instance (Option #1) when using a GlideRecord? I'm not familiar with the Service Portal and am hoping you can help. Thank you.

Hi,

in the ServicePortal (as admin user) <control> + <right click> on the VA widget, then choose instance options.

In the following dialog set the static default queue, see screenshot below.

find_real_file.png

You could use multiple widget instances in different parts of the portal and point each to a different queue.

 

If you want to choose the queue dynamically based on some user input or lookups, then use method 2.

 

And a final method would be to modify the widget server side code where you could pass a sysparm_liveagent_queue=<sys_id> based on some server side logic.