Here's my code:

<div id="liveagent_invite_button_5733B00000000DZ" style="display: none;
                                                         position: fixed; border: 2px solid darkblue; border-radius: 5px;
                                                         background-color: lightblue; height: 100px; width: 200px;">
    <div style="cursor: pointer; padding: 5px; right: 0px;
                position: absolute; color: darkred; font-weight: bold;"
    <div style="cursor: pointer; top: 42px; left: 65px; position: absolute;
                font-weight: bold; font-size: 16px;" 
         onclick="liveagent.startChat('5733B00000000DZ')">Start Chat</div>

<script type='text/javascript'
<script type='text/javascript'>
function buttonCallback(e) {
    if (e == liveagent.BUTTON_EVENT.BUTTON_AVAILABLE) {
        = '';
        document.getElementById('liveagent_invite_button_5733B00000000DZ').style.left = 
        document.getElementById('liveagent_invite_button_5733B00000000DZ').style.top = 
    if (e == liveagent.BUTTON_EVENT.BUTTON_UNAVAILABLE) {
        document.getElementById('liveagent_invite_button_5733B00000000DZ').style.display =
    if (e == liveagent.BUTTON_EVENT.BUTTON_ACCEPTED) {
        document.getElementById('liveagent_invite_button_5733B00000000DZ').style.display =
    if (e == liveagent.BUTTON_EVENT.BUTTON_REJECTED) {
        document.getElementById('liveagent_invite_button_5733B00000000DZ').style.display =
liveagent.addButtonEventHandler('5733B00000000DZ', buttonCallback);
liveagent.init('https://d.la1-c1cs-dfw.salesforceliveagent.com/chat', '5723B000000CaUz',

Any ideas?

  • 1
    Hey Rob! Did you check the console for any errors?
    – Adrian Larson
    Apr 14, 2017 at 3:59
  • Hi, Adrian! It's now working at home. It wasn't working earlier at the office. I'll have to see if it works at the office tomorrow. Apr 14, 2017 at 4:31
  • 1
    Rob, check for the html/js of the hosted page. Typically, if there is some sort of conflict the automatuon invitation doesn't tend to show up.
    – mubs
    Apr 14, 2017 at 5:23
  • It's working at the office now. I'm not sure what's different from yesterday. Apr 14, 2017 at 16:14


You must log in to answer this question.

Browse other questions tagged .