Home > Set the email address for pre-chat form or start of chat

Categories:


(Last Updated On: )

About This Article

The purpose of this article is to provide a comprehensive overview of how to pre set an email address for pre-chat forms or the start of a chat.

Have a returning visitors or customers coming to your site frequently? You can pre-set the email address of a known user or users using our JavaScript API. This will permit you to pre-populate the email field on a pre-chat form or if you are not using that, it will pass the email address of the visitor over to the agent at the start of the chat.

First, confirm or create your server side scripting or javascript for the email address. This may require you to contact your developer if you are not familiar with the code on your site.

Next, add the call below to your SnapEngage API section of your code snippet ( Below line that states * Place your SnapEngage JS API code below *):

SnapEngage.setUserEmail('[email protected]');

Note: In the SnapEngage JavaScript section where [email protected] should be replaced by your user email address,[email protected] is just a placeholder.

This will then take the action to pre-populate the pre-chat email address line or pass along the email of the visitor to the agent at the start of the chat.

Now… If you would like to have the pre-set email address read only for the user (in which the user will not be able to modify it), you can add the 2nd parameter to true, as shown below.

SnapEngage.setUserEmail('[email protected]', true);

 

To see this and other javascript API calls that are available, please visit:

http://developer.snapengage.com/javascript-api/

Did you find this article helpful?

Not HelpfulNeeds WorkSo-soHelpfulVery Helpful (6 votes, average: 3.50 out of 5)
Loading ... Loading ...

Published January 12, 2012