- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 01-17-2022 10:13 PM
- This article talks about a specific use case of transferring a chat to a specific queue using context variables.
- This functionality can be achieved in several ways and this article demonstrates this by making use of VA-Designer.
- If VA-Designer(com.glide.cs.chatbot) is not installed, the same can be achieved by making use of the pre-chat survey(FYI).
Firstly what are contextual variables:
- The variables that contain contextual information can be used to determine topic intent or control how chats are routed to live agents.
- You can also define variables to capture contextual information passed in Virtual Agent topic scripts to share with the live agent.
- To find where the context variables are defined, Open the 'chat setup' record and the 'contexts' are added as a related list to it as shown below.
Now that we understand what are the context variables, Let's make use of them to achieve the functionality of routing to a specific queue.
Step1:
- Create a topic and add a static 'Choice component ' that defines the number of queues based on the requirement.
- In the below example, I have created two queues for example:
- Queue1:Agent Chat
- Queue2: Agent queue 2
- Create the script actions to make use of the context variables to map the respective queues based on the work item routing condition provided in the Queue.
- The below images showcases the script used in the script action snippets.
- The context variable used is the 'vaVars.LiveAgent_queue' that defines the queue to be routed.
- For example:
-
(function execute() { vaVars.LiveAgent_queue = 'Agentqueue2'; if(vaSystem.isLiveAgentAvailable()){ vaSystem.connectToAgent(); } })()
Step2:
- Configure the Service channel and the queue.
- On the queue, let's look into the details in using the context variables on the 'work item routing condition'
- By following the above steps, We have achieved dot walking the queue variable from the contexts.
- Once the queue variable is dot walked on the routing condition, Map the queue with one of the choices that were created in the topic .
- For example: Context.queue - contains - Agentqueue2
- Make sure the topic that was created is published and activated. And once the above configuration is done, now the chats will be routed to the specific queue as defined above.
Do share your thoughts on the same.
Happy learning.
- 4,595 Views

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Great job documenting this.
It's a super basic use case but for some reason made incredibly complex in setting up and hadn't really been well documented that I recall seeing so this will definitely help some new VA admins.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thank you chris for your inspiring compliments.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Good Afternoon,
This is what I have been looking for but it doesn't seem to work for me, as the context field doesn't get set until after the agent has accepted the chat when the interaction record is created.
Did you need to make any more changes for it to work?
Kind Regards
Ashley
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I've defined two queues Technical support and Subscription support. I've followed your steps but its not connecting to the agents. Displaying final message "Sorry for the inconvenience caused!
There are no agents available at the moment. Please try again later."
Kindly help me to connect to live agent of particular group based on user input - select queue "technical" or "subscription".