You need to sign in to do that
Don't have an account?
Han Dao
Adding Live Agent Chat Button to Self-Service Community
Hi all,
I'm putting together a community site using one of the new Winter '15 templates and looking to add a chat button/link that routes to a pre-chat form. I've configured/generated the following live agent deployment and button code (IDs replaced with '*') and dropped it into an html element of the community:
<a id="liveagent_button_online_***************" href="javascript://Chat" onclick="liveagent.startChat('***************')">Click here to chat with us!</a>
<div id="liveagent_button_offline_***************" style="display: none;">No agents are currently available.</div>
<script type="text/javascript">
if (!window._laq) { window._laq = []; }
window._laq.push(function(){liveagent.showWhenOnline('***************', document.getElementById('liveagent_button_online_***************'));
liveagent.showWhenOffline('***************', document.getElementById('liveagent_button_offline_***************'));
});
</script>
<script type='text/javascript' src='https://c.la3-c1-was.salesforceliveagent.com/content/g/js/31.0/deployment.js'></script>
<script type='text/javascript'>
liveagent.init('https://d.la3-c1-was.salesforceliveagent.com/chat', '***************', '***************');
</script>
I've tried this same code on a community page created from a custom Site.com template, and it works just fine. When I use it on the community template, the link doesn't seem to recognize whether a chat agent is online, so it always displays the available message. Also, when I click on the link, I get the message "Uncaught TypeError: Cannot read propert 'startChat' of undefined" using the Chrome console.
Any help would be greatly appreciated!
I'm putting together a community site using one of the new Winter '15 templates and looking to add a chat button/link that routes to a pre-chat form. I've configured/generated the following live agent deployment and button code (IDs replaced with '*') and dropped it into an html element of the community:
<a id="liveagent_button_online_***************" href="javascript://Chat" onclick="liveagent.startChat('***************')">Click here to chat with us!</a>
<div id="liveagent_button_offline_***************" style="display: none;">No agents are currently available.</div>
<script type="text/javascript">
if (!window._laq) { window._laq = []; }
window._laq.push(function(){liveagent.showWhenOnline('***************', document.getElementById('liveagent_button_online_***************'));
liveagent.showWhenOffline('***************', document.getElementById('liveagent_button_offline_***************'));
});
</script>
<script type='text/javascript' src='https://c.la3-c1-was.salesforceliveagent.com/content/g/js/31.0/deployment.js'></script>
<script type='text/javascript'>
liveagent.init('https://d.la3-c1-was.salesforceliveagent.com/chat', '***************', '***************');
</script>
I've tried this same code on a community page created from a custom Site.com template, and it works just fine. When I use it on the community template, the link doesn't seem to recognize whether a chat agent is online, so it always displays the available message. Also, when I click on the link, I get the message "Uncaught TypeError: Cannot read propert 'startChat' of undefined" using the Chrome console.
Any help would be greatly appreciated!
http://www.infallibletechie.com/2013/06/live-agent-implementation-in-salesforce.html
This will works for you.
Is this issue is fixed? I am faction the same issue now. Can you provide me a solution?