How to transfer a chat to a specific Queue using context variables?
Import
·
Jan 18, 2022
·
article
- 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.
Labels:
View original source
https://www.servicenow.com/community/virtual-agent-nlu-articles/how-to-transfer-a-chat-to-a-specific-queue-using-context/ta-p/2307392
