Is there a concise/elegant way to check if a live agent is available? I'd like to show certain elements depending on whether or not an agent is available. The closest thing I found so far was this, but its from 3 years ago so I'm not sure if it's still up to date, or if there exists a better way of doing so.


There is an example in the chat button code that does that for you.

if (!window._laq) { window._laq = []; }
liveagent.showWhenOnline('<Chat Button Id Here>', document.getElementById('<Online Element Id Here>'));
liveagent.showWhenOffline('<Chat Button Id Here>', document.getElementById('<Offline Element Id Here>'));
  • What library loads in ._laq and the liveagent object?
    – ROODAY
    Jun 19 '17 at 14:45
  • There is code you need to copy from the Deployment as well. Jun 20 '17 at 18:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.