Home > JavaScript event API documentation
Categories: JavaScript API
(Last Updated On: )
About This Article
The purpose of this article is to provide a comprehensive overview of JavaScript events.
*Note: Please see the updated Javascript Event Documentation here.
Open:
Usage: called when the user opens the form on a button click, through an API call to startLink(), startChat(), etc.
Parameters:
– agent online/offline with the string value ‘online’ or ‘offline’
OpenProactive:
Usage: called when the proactive chat starts
Parameters:
– agent alias as a string
– proactive prompt message as a string
Close:
Usage: called when the form close button is clicked
Parameters:
– what was closed: the form, a chat session in progress, or a proactive prompt not answered by the visitor with the respective string
values ‘form’/’chat’/’proactive’
– agent status online/offline with the string value ‘online’ or ‘offline’
MessageSubmit:
Usage: called when the visitor posts the form for an offline message (not a chat)
Parameters:
– email address as a string
– message/question as a string
StartChat:
Usage: called when the visitor starts a chat
Parameters:
– email as a string
– first message as a string
– type of chat manual or proactive, as ‘manual’ or ‘proactive’
ChatMessageSent:
Usage: called when the visitor submits a chat message while in the chat session
Parameters:
– the message as a string
ChatMessageReceived:
Usage: called when the agent submits a text message for the visitor
Parameters:
– the agent alias as a string
– the message as a string
StartCallme:
Usage: called when the visitor starts a call-me
Parameters:
– phone number as a string
Code examples on how to use the SnapEngage JavaScript event API:
Published January 12, 2012