Add email and name automatically from users to omnichannel form?

Hi guys,

Description

I’m wondering (and didn’t found) how to make the omnichannel get the current authenticated user email and first/last name from my app in order to skip them this annoying step ?

Is there a way to do this with javascript ? I saw the function setGuestEmail or setGuestName but it didn’t fill the inputs

Thanks in advance!

Server Setup Information

  • Version of Rocket.Chat Server: 5.0.4
  • Operating System: Debian
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: yes
  • NodeJS Version: 14.19.3
  • MongoDB Version: 4.4.15
  • Proxy: apache2

Hi! Welcome to our Community :hugs:

You can leverage the Widget API and register the visitor, providing not only the email and name, but also the custom fields and department:

Consider that the token is the field you want to tie with your unique, authenticated user.

Also, try not using number IDs for that one, like 134, as someone could register himself and pretend to be some other authenticated user.

please, let me know if this helps :slight_smile:

Hi, thanks for you answer.

It works like a charm!