We're removing support for TLS 1.0 and TLS 1.1 from July 30, 2020. Learn how it impacts your live chat solution here.
announcement close button
Home > Features > How to preset customer name and email on chat widget
How to preset customer name and email on chat widget

This can be done programmatically. You can send in your signed-in user’s name and email by simply calling the setVisitorInfo method to pass those details. This will skip the pre-chat form for the users.

Mandatory properties that needs to be set are:

  • name
  • email

Syntax - setVisitorInfo

HappyFoxChat.setVisitorInfo(<visitorInfoObject>, <callback>);

<visitorInfo[Object]> should have two mandatory properties name and email.


HFCHAT_CONFIG.onload = function() {
var HappyFoxChat = this;
HappyFoxChat.setVisitorInfo ({
'name': ‘Bob’,
'email': ‘bubblebob@gmail.com’
}, function(err, resp) {
if(err) {
console.error('Failed to set visitor details. Error:', err);
} else {
console.log('Added visitor details:', resp);

Important Note:

  • This API method should be called only after the script is loaded.
  • You can add your HappyFox Chat API related code with in the `onload` function.

Once a customer logs into your website and clicks on the chat widget their name will be shown directly instead of a pre-chat form.

0 out of 0 found this helpful

scroll to top icon