Route widgets direct to departments

Hi, I’m currently using a single TawkTo property with multiple widgets on different pages. I’d like to be able to direct users to specific departments depending on which widget they are using. I’ve tried using this but doesn’t seem to have any effect.

var Tawk_API = Tawk_API || {};" +
     "Tawk_API.onLoad = function () {" +
           "Tawk_API.setDepartment('Technical Support');" +
     "};
1 Like

Hi @SadRavioli ,

Thanks for reaching us. Have you tried using the pre-chat form with the deparment selection?
Help Center | tawk.to | Set up a Pre-Chat Form with the option to select a Department

Thanks for your response! Unfortunately I’ve found that the pre-chat form will only appear once for a user, and even after going through the process of creating a ticket → completing → deleting the ticket and chat, or if the user ends that chat, it won’t show up again next time they message?

Hi @SadRavioli - unfortunately, yes.

The pre-chat form will show up again once they closed the browser and open it again.

Oh okay that’s good at least. Is there any way to trigger this behaviour on browser refresh as well?
Thanks again :grinning:

Hi @SadRavioli - I am sorry, no.

Currently, closing the browser is the only option to show the pre-chat form once filled out. However, your client may request to transfer it to a different department.

Okay no worries, thanks for your help :slight_smile:

No worries @SadRavioli - a pleasure to help.

Let me know if you need more help.