Gaurav Shirsat
Mega Sage

                                                  Connect to Preferred Language Live Agent

Usually when we click on connect to live agent the user get redirected to the live agent

1) based on language of user in profile with same language chat queue

2) same language chat queue and available live agent.

Now, what if user wants to interact with the Live Agent with different language than the user's language set in user profile? this article will explain you, how to do this with very small customizations.

we have OOB Topic in Virtual Agent named "Transfer to Live Agent" which routs the user to available live agent.

Now follow below steps

step 1:-

Duplicate the OOB Topic Transfer to Live Agent

Give suitable name to the topic

add an static input activity after the decision utility in your duplicated topic as follow.

Option Giving.png

Post this we have to add one script action utility after this activity as shown below

Script Change.png

embed the below script in the script action activity.

var gr = new GlideRecord("sys_user");
gr.addQuery("sys_id",vaInputs.user.getValue());
gr.query();
if(gr.next()){
//language is the backend name of static activity which provided language option to user.
gr.u_virtual_transfer= vaInputs.language;
gr.update();

 

}
vaSystem.connectToAgent();
 
Step 2:-
Now , I am assuming that you have all your chat queues ready for different language service desk teams in chat queue. i.e Application nav-->Advance Work Assignment-->Queue
queue.png
Now make adjustment as shown in below image to your language queue as, peroform .walk openedfor.Virtual Transfer followed by your language queue respectively.
language queue.png
Step 3:-
Create a new choice field in sys_user table. as per your wish, you can make it available on form later or not.
rec.png
Step 4:-
Replace OOB Transfer to Live Agent with your Duplicate Topic in all the Topics where you want user to connect to live agent.
 
You can review my other Articles as below
Thanks and Regards
Gaurav Shirsat
ServiceNow Community MVP 2022
 
Comments
gkbhandare003
Kilo Guru

Hi Gaurav,

Thank you for this article.

 

I have one suggestion, instead of updating sys_user record for each new interaction for the user, we can achieve this with live agent variables as well..

We can use the LiveAgent_language variable, assign preferred language to it and add condition in queue to check if the preferred language.

 

Your static input:

 

Ganesh49_1-1667912556197.png

Note: LiveAgent_language variable holds Two-letter language code, hence we have to give value to store for language according to that check same in queue condition.

Script to add in Connect to Agent utility:

 

vaVars.LiveAgent_language = vaInputs.preferred_language;

 

 

Condition in Queue:

 

Ganesh49_0-1667912487459.png

 

 

Any thoughts?

 

Gaurav Shirsat
Mega Sage

Hello @gkbhandare003 

 

yes we can proceed with that, but this we did because we already have this custom field in user table.

Here the major concern is to route user to the Queue. main part is to work on OOB Live Agent Topic and further we can bypass as suitable to client.

 

Important Steps:-

Chat Conditions

Options in VA Chat

 

Thanks and Regards
Gaurav Shirsat
ServiceNow Community MVP 2022
brownb4
Giga Explorer

Both admins and agents can choose their own language directly on the login screen to the LiveAgent agent panel. You can choose available languages in Configuration > System > Languages section. By default all available languages are imported and active We  love language test   can use the LiveAgent_language variable, assign preferred language to it and add condition in queue to check if the preferred language. Your ...The dynamic translation is one of the features of Virtual Agent that offers a real-time, in-context translation that facilitates communication and collaboration as a solution to language constraints. Chatbots and virtual agents are similar; they're both software, but there are important differences. Chatbots are simpler and don't use AI. Virtual agents are more sophisticated, can offer better answers, and utilize AI to deliver the assistance customers need.

Shiva Durga Pra
Tera Contributor

How to get the notification sound for the chat 

Version history
Last update:
‎11-03-2022 10:44 PM
Updated by:
Contributors