Pre-Populate User Information on Embed chat widget | Community
Skip to main content

Pre-Populate User Information on Embed chat widget

  • July 31, 2018
  • 7 replies
  • 0 views

How i can prepopulate user data and custom information on Embed chat widget

7 replies

  • July 31, 2018

Hi Sarath,

For the standalone Chat widget, you can use the APIs listed here to populate name and email alongside additional information via tags: https://api.zopim.com/files/meshim/widget/controllers/LiveChatAPI-js.html

For the Web Widget, you can set visitor name and email using this API: https://developer.zendesk.com/embeddables/docs/widget/api#ze.identify

Custom information outside tags are not supported currently.

-Ramin


  • Author
  • July 31, 2018

I want to prepopulate the info in the chat window, not to send as data to zendesk chat.


  • July 31, 2018

The setName/email both pre-fills and sets the information, there are no APIs to just pre-fill and we have no plans of adding those APIs in the near future.


  • Author
  • July 31, 2018

Thanks Ramin, I need to show the history of chat conversation then how will I be able to show the chat history in the chat window.


  • July 31, 2018

Conversation history is a feature built into the widget for authenticated visitors. Showing past chat messages is irrelevant to setting or pre-filling the visitor's personal information. 

Conversation history is dependent on the visitor being authenticated, you can learn more about the feature here: https://chat.zendesk.com/hc/en-us/articles/360000753167-Early-Access-Authenticated-Visitors-in-Chat-Widget

It is still in EAP, so you will need to register and get it enabled for your account first.


  • November 23, 2019

Hi Ramin, how about setting the phone number as well? Instead of having to ask the customers for it during the chat. Why not set it if it's available? Can we get this done somehow?


  • November 25, 2019

You can use the below to pre-fill the phone number also

zE('webWidget', 'prefill', {
  name: { … },
  email: { … },
  phone: { … }
})