Skip to content

Instantly share code, notes, and snippets.

@grantmiller
Created August 15, 2013 18:58
Show Gist options
  • Save grantmiller/6243694 to your computer and use it in GitHub Desktop.
Save grantmiller/6243694 to your computer and use it in GitHub Desktop.
LP Mobile HTML Plugin custom offline action (onChatNotAnswered)
<script type="text/javascript">
/* LP Mobile JS Configuration */
var _LP_CFG_ = {
app_id : "YOUR_MOBILE_SITE_ID",
options : {
// All configuration options defined in here
onChatNotAnswered : function(messages) { // An event that fires after a message is sent by the user but agents are no longer available. It takes one parameter which is an array of the messages attempted to be sent by the user.
alert('All chat agents are currently helping other customers. Please call our customer service center at 800-555-5555');
}
}
};
/* End of Configuration */
/* LP Mobile JS include */
(function(){var a=_LP_CFG_.lpjsid="lpjs-"+(new Date).getTime(),b=document.createElement("script"),s=document.getElementsByTagName("script")[0];b.id=a;b.type="text/javascript";b.async=true;b.src="https://d3tpuxked45kzt.cloudfront.net/lp_lib/liveperson-mobile.js";s.parentNode.insertBefore(b,s)})();
/* End of Include */
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment