+ Start a Discussion

Live Agent - how to block new chat request when it is out of business hours



Here is the scenario:


Business hours are defined in SFDC.

Live agent is deployed in external website.

Agent forgot to turn his/her status into offline when it is out of business hours. 


How to block new chat request?


There are two approaches:

1. Turn the agent's status into offline automatically when it is out of business hours.

2. Show offline button on the external website when out of business hours even if agent is still online.


Any hints or suggestion to implement it?





Jeff MayJeff May

If users sign out of SFDC, they get logged out of the Live Agent Console, so asking users to remember to sign out, or setting a maximum session timeout, is the easiest.   Otherwise, you could do something on the page where the Chat Button is hosted to either show the Chat button during "office hours", or not.  The limitation there is there would be no way for special circumstances' when someone wants to chat after hours.


Hi Tomas,


I am having an requirement to invoke LiveAgent webchat in external websites, Could you please provide the steps how to invoke liveagent webchat in external websites.


Thanks in advance for your help.


With Regards,


Hi Vetrivel,

You can follow the developer guide of live agent.


Best Regards,

Hi Tomas,


Thanks for providing the Live Agent link. It's very useful. I am able to create the Live Agent configuration and able to communicate with Agents.


 My requirement is to invoke Live Agent web chat from my official website.  for this sake, I have created one html page with generated Live agent JavaScript embed with it.  When I invoke this html page in FIREFOX browser, it working fine and i am able to chat with Agent.


 But, when i tried to invoke In Internet Explorer, I got JavaScript error while invoking the html page. Please find the two errors below.



'document.body' is null or not an object





2) 'liveagent' is null or not an object.


Please provide your thoughts to resolve this problem.


Thanks in Advance for your help and support.


With Regards,