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:
The Button is done as follows:
Summarizing: why does the startChat without the user Id redirects rightly and the startChat with the user Id doesn not?