Chat API

Set Chat Data

MyLiveChat allows you to gather additional information available from the web page and pass them into chat server. Normally, you'll need to work with your web developers to use ASP, ASP.NET, JSP, PHP, JavaScript, etc to populate the value of these fields differently for each visitor on your Web site. In this example, mylivechat ID is 68268000. You need to replace it with your own mylivechat ID.

Chat Data Method
Method Name Description
MyLiveChat_SetUserName Set current visitor's name
MyLiveChat_SetEmail Set current visitor's email address
MyLiveChat_SetDepartment Set the department for current visitor
MyLiveChat_SetQuestion Set current visitor's question of the pre-chat survey window
MyLiveChat_SetContextData Set a string which relative to current visitor. The agent console can read it .
MyLiveChat_SetProductName Set the product name of the current visiting page
MyLiveChat_SetProductKey Set the product key of the current visiting page