+ Start a Discussion
D_KellyD_Kelly 

Live Agent Integration with VF

Hi,

 

Part of a project we are working on is deploying Live Agent. Part of Live Agent is the ability to add a button to a page that indicates if a Live Agent user has logged in and is available to chat, The button renders one message if its available and another if not. This is great and works well when we added to a home page in a customer portal setup.

 

However, when we added the code to a VisualForce page, the button would not work! Does anybody have experience with using this button code in a VF page? The VF page we are using is a sites page and is publicly available. The code is below, there are two sections to it.

 

<!-- START Salesforce Live Agent Deployment Code: MUST BE PLACED DIRECTLY ABOVE THE CLOSING </BODY> TAG and AFTER/OUTSIDE ALL HTML -->
<script type="text/javascript">
var __ALC_Deployment = 9702;
document.write(unescape("%3Cscript src='"+document.location.protocol+"//depot.liveagentforsalesforce.com/app/js/lt.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<!-- END Salesforce Live Agent Deployment Code -->


And this is the code for the buttons:



<!-- START Salesforce Live Agent Button/Link Code: Place this code into your HTML wherever you want this button/link to appear -->
<script type="text/javascript">
var __ALC_BADGE_SUFFIX = (Math.round(Math.random()*10000000000));
document.write('<div id="__ALC_BADGE_ONLINE'+__ALC_BADGE_SUFFIX+'" style="display: none;"><a href="javascript&colon;//chat" onclick="_alc.startChat(14885); return false;"><img id="__ALC_BADGE_ONLINE_IMAGE" style="border: 0px none" src="'+unescape(document.location.protocol+'//depot.liveagentforsalesforce.com/app/chat/buttons/97/btn3_grn2_on.gif')+'" /></a></div><div id="__ALC_BADGE_OFFLINE'+__ALC_BADGE_SUFFIX+'" style="display: none;"><a href="http://www.city-link.com"><img id="__ALC_BADGE_OFFLINE_IMAGE" style="border: 0px none" src="'+unescape(document.location.protocol+'//depot.liveagentforsalesforce.com/app/chat/buttons/97/btn3_grn2_off.gif')+'" /></a></div>');
if ( typeof(__ALC_Badges) == 'undefined' ) __ALC_Badges = new Array();
var __ALC_BUTTON = new Object(); __ALC_BUTTON.id = '14885'; __ALC_BUTTON.available = '__ALC_BADGE_ONLINE'+__ALC_BADGE_SUFFIX; __ALC_BUTTON.unavailable = '__ALC_BADGE_OFFLINE'+__ALC_BADGE_SUFFIX; __ALC_BUTTON.department = 0; __ALC_Badges.push(__ALC_BUTTON);
</script>
<!-- END Salesforce Live Agent Button/Link Code -->

 

JonAnianoJonAniano

There are two most-likely options here:

 

1. You may not have the "Domain" setting set properly within your Deployment setup in the Live Agent Account Dashboard. Please log into the Live Agent Account Dashboard, "edit" your current deployment, review the "Domains" setting, and make sure you have the right "domain" setup there.

 

2. You may not have the Deployment code placed in the right spot in your page. Please make sure you're placing the Deployment code directly before the closing </body> tag in your HTML.

onCloudNineonCloudNine

I am facing the same issue. @D_Kelly : Were you able to resolve this?

360venky360venky

Hi

 

I'm setup salesforce Live chat..


I'm having problem in live chat button visible.The code added to footer & the chat button is added I have pasted the code.


The button is added on the side bar at the top. I have removed the old chat button code added to the content in that page. But the chat button is not visible. ...More over its prompting me to a page to sing up Account Dashboard Account.Do i have to setup a account for this live agent application.If i have to setup an account .Please do forward me that link........Please check the below links

 

https://depot.liveagentforsalesforce.com/app/operator.php

https://dashboard.liveagentforsalesforce.com/login/auth

 

  Here i have some links (https://dashboard.liveagentforsalesforce.com/support/Buttons-Links/how-to/58).In this link they are stating that i should have Live agent Account Dashbord accounut.I have login in to that account & i have copy some code and merge in my button code.Do i have really do that.(https://dashboard.liveagentforsalesforce.com/account/dashboard)