+ Start a Discussion
Leo10Leo10 

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,
Leo
 
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.

WORKAROUND:

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.

Thanks.
Leo10Leo10
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)

Thanks,
Leo 
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.

Thanks.