Help in integrating livechat with custom portal

Hello
I need some help in integrating livechat with a custom solution .
What I need is a way to automatically fill in the pre-chat form with the logged in users email and name so that they dont have to do it . I see in the documentation I can set customfields values using javascript , but how do I pass in users email and name as well .

1 Like

Same question:
Is there any way to setName and setEmail in the javascript snippet prior to chat session activation?

Hello @digvijay and @tammon!
As you may know, Livechat has an iFrame API that allows to handle the Livechat Widget:
https://rocket.chat/docs/developer-guides/livechat-api/#livechat-api

However, filling in pre-chat was not allowed, but we are working on Livechat iFrame API to provide new methods. There is a PR awaiting for review, as you can see here:
https://github.com/RocketChat/Rocket.Chat/pull/10918

Once this PR is approved, You will be able to do what you are looking for, I suggest using the registerGuest method.
Please, follow the review process to find out when these new features will be available.

Thanks.

3 Likes