3

I have set up a Live Agent. Suppose a chat has begun between a client and the operator. At the end of this chat the operator ha the chance to give to the client a link that he can use in another moment to reconnect with the same Operator. The link is done is this way: http://mySite.com/CP_RicollegamentoChatEsistente?idUtentetramiteURL=00525000000EbDQ

CP_RicollegamentoChatEsistente is a Visualforce page that implements the connection with a liveagent with a specific user:

<apex:page docType="html-5.0" showHeader="false"  cache="true" controller="CP_RicollegamentoChatEsistenteController" >  

<head>Redirecting page</head> 



<script type='text/javascript' src='https://c.la1-c1cs-lon.salesforceliveagent.com/content/g/js/34.0/deployment.js'></script>

<script>

    //------------------------------------------------- 
    liveagent.addCustomDetail("&$£&%"$£/!$£/");    
    liveagent.findOrCreate("Info__c").map("ID_AOL__c", "IdAOL", false, false,true);
    ...........  bla bla bla, stuff I have to take care .............
 liveagent.findOrCreate("Survey_Operatore__c").saveToTranscript("Survey_Operatore__c","Survey_Operatore__c");

     // DEPLOYMENT 
    liveagent.init('https://d.la1-c1cs-lon.salesforceliveagent.com/chat', '572250000008OKV', '00D25000000DJeh');

     // BUTTON
     setTimeout(function(){ 
        //liveagent.startChatWithWindow('573250000008OLT', 'ChatWindow','{! idUtente}', true); THIS CALLS THE LIVEAGENT STANDARD CHAT

        liveagent.startChat('573250000008OLT', '{! idUtente}', true); // LIVEAGENT STANDARD CHAT  
        //liveagent.startChat('573250000008OLT'); THIS WOULD CALL THE CUSTOM 'CHATWINDOW'
     },2000);  

    // Javascript URL redirection
    // window.location.replace("http://andreaianni.branded.me/");

</script> 


<!-- Stuff necessary for the liveagent -->

<a id="liveagent_button_online_573250000008OLT" href="javascript://Chat" style="display: none;" onclick="liveagent.startChat('573250000008OLT')"> <!-- Online Chat Content  -->
</a>
<div id="liveagent_button_offline_573250000008OLT" style="display: none;"><!-- Offline Chat Content --></div>
<script type="text/javascript">
if (!window._laq) { window._laq = []; }
window._laq.push(function(){liveagent.showWhenOnline('573250000008OLT', document.getElementById('liveagent_button_online_573250000008OLT'));
liveagent.showWhenOffline('573250000008OLT', document.getElementById('liveagent_button_offline_573250000008OLT'));
});</script>

<!-- End Stuff -->

</apex:page>

The Deployment is the following:

enter image description here

The Button is done as follows: enter image description here

Summarizing: why does the startChat without the user Id redirects rightly and the startChat with the user Id doesn not?

1 Answer 1

-1

This looks like a bug in the startChat() method - the method does not seem to function correctly with the 18-character user Id but does seem to work using the 15-character version. startChat() with the user Id should redirect correctly once you've made this change in your idUtente variable.

liveagent.startChat('573250000008OLT', '{! idUtente}', true);

2
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post.
    – crmprogdev
    Commented Oct 9, 2015 at 18:21
  • @crmprogdev I edited the answer to clarify. Thanks.
    – sagacious
    Commented Oct 9, 2015 at 18:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .