+ Start a Discussion
AmitSinhaAmitSinha 

Live Agent Customization

I am running into an issue where - If a customer is not connected to an Agent after they request a Chat from a pre-chat page they end up going to the post chat survey. 

We want to stop the users from ending up on the post chat survey if for some reason they are not connected to the Agent, can we redirect these customers to a different page or perhaps capture that they were not connected to the agent and then use that information to hide the Survey link on the post chat page ?

Any help will be greatly appreciated. 
Vikash TiwaryVikash Tiwary
Hi Amit,

Not sure whether this suits your need. One of the reason that customer is not connected to an Agent is that he may be offline. For such case you can do as such to show and hide the link. Additionally, you can also show a link to redirect to the page you want when the agen is not connected. You simply need to place that link within a div whose Id will be liveagent_button_offline. When the agent is offline elements within that div will always be displayed.

window._laq.push(function(){
liveagent.showWhenOffline('{!ChatButtonId}', document.getElementById('liveagent_button_online'));      
liveagent.showWhenOffline('{!ChatButtonId}', document.getElementById('liveagent_button_offline'));
  });

<div id="liveagent_button_offline">
   <a onclick="redirect();">Redirect </a>
</div>

Please let me know if this helps.

Thanks.
Vikash
AmitSinhaAmitSinha
Hi Vikash, 

Thanks for replying to my questions.
Actually, this is what I was looking for - http://salesforce.stackexchange.com/questions/46955/live-agent-post-chat-page/46961#46961

Thanks
Amit