I've been working in a requirement where we customized the Pre-Chat form using Lightning Components to leverage the usage of some customs messages and conditions to submit the chat or not. The current problem is that the Chat button is disabled automatically when there are no Agents online.

enter image description here

I wasn't able to find any configuration settings related to the button at Embedded Service for Web Developer Guide , so I'm kind lost since we really want to keep using the standard chat and not go with a custom chat button/chat window.

There it isn't much code available since we're using the Embedded Service Code Snippets, but in any case, here it is.

<apex:page >
    <style type='text/css'>
    .embeddedServiceHelpButton .helpButton .uiButton {
        background-color: #005290;
        font-family: "Arial", sans-serif;
    .embeddedServiceHelpButton .helpButton .uiButton:focus {
        outline: 1px solid #005290;

        .embeddedServiceHelpButton .uiButton .helpButtonLabel .message {
         overflow: visible !important;

<script type='text/javascript' src='https://service.force.com/embeddedservice/5.0/esw.min.js'></script>
<script type='text/javascript'>
    var initESW = function(gslbBaseURL) {

        embedded_svc.settings.displayHelpButton = true;
        embedded_svc.settings.language = ''; 

        embedded_svc.settings.enabledFeatures = ['LiveAgent'];
        embedded_svc.settings.entryFeature = 'LiveAgent';

            'Org Id',
            'Button name',
                baseLiveAgentContentURL: 'https://something.salesforceliveagent.com/content',
                deploymentId: 'Embedded Service Deployment Id',
                buttonId: 'Chat Button Id',
                baseLiveAgentURL: 'https://something.salesforceliveagent.com/chat',
                eswLiveAgentDevName: 'Button name',
                isOfflineSupportEnabled: false

    if (!window.embedded_svc) {
        var s = document.createElement('script');
        s.setAttribute('src', 'https://yourOrdAddress.my.salesforce.com/embeddedservice/5.0/esw.min.js');
        s.onload = function() {
    } else {

TL;DR - Is there a way to keep the Embedded Service Chat Button enabled even when there are no Agents available?

Thanks in advance!

Your Answer

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

Browse other questions tagged or ask your own question.