var email = 'email@example.com'; // Set the email field SnapEngage.setUserEmail(email); // Do the same as above AND make the email field read-only // i.e. not editable for the visitor SnapEngage.setUserEmail(email, true);
Provide a visitor's email address to SnapEngage.
This will do two things: First, it pre-populates the 'email' field on your prechat or offline form.
Second, even if you are not using a prechat form, this will still provide a visitor’s email address to an agent who takes the chat. (The email gets stored in the case and will be passed to your integration at the close of the case).
|String||A non-encoded email address, for example,
|locked||boolean||An optional parameter. If set to true, the email field will be locked i.e. read-only and the visitor will not be able to edit the field. If set to false, the email field will not be read-only and the visitor will be able to edit the field (this is the default).|