Skip to content

Instantly share code, notes, and snippets.

@soe
Created January 30, 2013 00:32
Show Gist options
  • Save soe/4669486 to your computer and use it in GitHub Desktop.
Save soe/4669486 to your computer and use it in GitHub Desktop.
sample page on how to include Salesforce Live Agent button code and deployment code
<html>
<body>
<!-- live chat button -->
<a id="liveagent_button_online_573i00000004DD7" href="javascript://Chat" style="display: none;" onclick="liveagent.startChat('573i00000004DD7')">
Online Chat
</a>
<div id="liveagent_button_offline_573i00000004DD7" style="display: none;">
Offline Chat
</div>
<script type="text/javascript">
if (!window._laq) { window._laq = []; }
window._laq.push(
function(){
liveagent.showWhenOnline(
'573i00000004DD7',
document.getElementById('liveagent_button_online_573i00000004DD7')
);
liveagent.showWhenOffline(
'573i00000004DD7',
document.getElementById('liveagent_button_offline_573i00000004DD7')
);
}
);
</script>
<!-- live agent deployment -->
<script type='text/javascript' src='https://c.la1c1.salesforceliveagent.com/content/g/deployment.js'></script>
<script type='text/javascript'>
liveagent.init('https://d.la1c1.salesforceliveagent.com/chat', '572i00000004DD7', '00Di0000000HJOD');
</script>
</body>
</html>
@jfeliweb
Copy link

Thank you!

@gselvarajPandi
Copy link

Hi,
is there any way we can customize the chat? And do you know how to use the embedded chat in non-salesforce website.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment