Set agents group by javascript, not by default url routing

Hi there :wave: i was wondering how can set the agent group by Javascript dinamically, like we do with Name and Email.

Routing by URL is not an options and pre-survey form with a Group select element is very limited at the desing level.

Thank you all!

Hi there i was wondering how can set the agent group by Javascript dinamically, like we do with Name and Email.

there is a method for that https://developers.livechat.com/docs/management/configuration-api/#update-agentbut its not to be used in the front end of your website
so you would have to build around that - create your API that would use above method

Routing by URL is not an options and pre-survey form with a Group select element is very limited at the desing level.

you could create your own script that would load our snippet with specific group like we are doing here http://lcsupport.ehost.pl/mp/sites/geolocation.phpif there is a need you can destroy it with
https://developers.livechat.com/docs/extending-chat-widget/javascript-api/#destroy
and reload again

hope it helps!

1 Like

Exactly! this is the way i’m doing with anothers chats plugins.
Thanks for your help @Lukasz_W !!

1 Like