Rocket.Chat's Community Open Call 🎤 Dec 15, 2021 Join us!

Assing access to chats based on user/group permissions

Hey there! We’re currently evaluating RocketChat as a tool for our company to provide advice for our target audiences via a chat on our website. We don’t only need to be GDPR compliant, but also implement some other data protection standards. A self hosted RocketChat seemed like the perfect solution.

We have multiple agents, providing their service in multiple languages. Ideally it should be that case, that visitors could choose a language before they start a chat. The chat should then only be accessible to the agents who were assigned that language.

So, basically we want to assing access to incoming chats based on a users group permissions.

I’ve gone through the settings and tried to figure out if this is possible, but right now to me it looks like there’s only one chat widget that’s connected to the Omnichat. Is there an alternative? (Sorry if this is obvious. I’m new to RocketChat and couldn’t find anything.)

We’re hosting RocketChat 4.1.0 on a dedicated Hetzner server running Debian 11.

Hi! Welcome to our forums.

Rocket.Chat is very flexible. I can think of a way to accomplish what you want.

Considering we have the API for tweaking LiveChat Widget ( you can create a form that will then provide the language parameter to manipulate this api.

So, the user will provide the language he wants. Based on this option, you can set the department accordingly, like so:

RocketChat(function() {
    this.setDepartment('support-' + chosen_language);

you can even have multiple departments, based on language. like support-pt-br, support-en, sales-pt-br, sales-en.

Please, let me know if this is what you want.

Maybe, the form is not even necessary :thinking:

Something like this might be used:

RocketChat(function() {
    var userLang = navigator.language || navigator.userLanguage;
    this.setDepartment('support-' + userLang);

You only need to check when a user language doesn’t have a corresponding department, and set a fallback department for those cases.

Regarding the agents, they will only receive the chats transferred to departments they are enlisted as agent.

Only the manager will be able to see all chats.

Hope to have solved some of your questions :slight_smile: