+ Start a Discussion

How to route chats to agents based on website language?

Hi all,
I have a requirement, need to route chats from live webchat to live agents based on website languages. How to accomplish this?.

Eg: English-> English speaking agent, Spanish-> Spanish speaking agent 

Thanks in advance,
AbhishekAbhishek (Salesforce Developers) 
Hi Leo,

Language of the Standard Chat window can be changed by:

Click Setup | Go to Live agent Chat buttons and invitation and then edit your button and change the language to your preferred language.

This will open the Chat window in the language you selected here. However, After you fill your pre-chat form and select a specific language there and then redirect to Chat window, at this stage, Unfortunately, dynamically it's not possible to change the language of the Standard Chat Window, as it's not possible to pass the language parameter in the endpoint to salesforce so that Salesforce can change the language.


You can plan the pre-chat window such that a user can select a language on the Pre chat window and then Based on the Selection of the Language, you can redirect the User to different Page, which is a VisualForce page rendered with specific Language and then User can fill that form to submit to get it redirected to the Chat window.

In order to create a VF page in a specific language, you will have to add 'language' attribute to the <apex: page> so that the VF page can be rendered as a specific language.

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Hi Abhishek,
Thanks for your reply.

Actually, I have generated javascript by embedded service deployments and pasted it on the website.   
now I can chat with agents from that website. But, I need to route the chats based on the browser language. Suppose, a Spanish customer is trying to chat with agents, the chat should go to the agents who speak Spanish like that.

 see this link (https://help.salesforce.com/articleView?id=omnichannel_skills_based_routing_route_chat_using_skills.htm&type=5)

AbhishekAbhishek (Salesforce Developers) 
Hi Leo,

I suspect that functionality is not available right now.

You can raise an Idea based on it, maybe we can see that functionality in the future.

Nirav Tejani 10Nirav Tejani 10
Hi Leo,

I am currently looking for the same solution where i want to assign chat to the appropriate agent based on browser language and i am having hard time to achieve this
Have you found the solution for it ? If yes can you please share here?
Thank you in advance. 
Barb LeungBarb Leung
Hi Leo, Nirav,
I am also looking to assign chat based on language.  Has anyone found the best way to achieve this?  
Thanks so much!
Hello Nirav, Barb
I had created button Ids for the combination of language and location 
eg: Button Id 1 for French and France
      Button Id 2 for Spain and Spanish

In javascript, I will find browser language and location using ipinfo.io, Based on location and language the chat will route into button ids
suppose browser location is Spain and language is Spanish, the chat will route to Button Id 2

Note: need to set up users for the button ids in salesforce