0

I am trying to implement a fallback routing mechanism for my chat implementation with skills routing.

I am putting my chat snippet in a VisualForce page:

<apex:page showheader="false" sidebar="false" standardStylesheets="false">

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

    <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; //Or false
            embedded_svc.settings.language = ''; //For example, enter 'en' or 'en-US'


            embedded_svc.settings.fallbackRouting = ['buttonId1','buttonId2']; //An array of button IDs, user IDs, or userId_buttonId


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

            embedded_svc.init(
                'my sub-domain url',
                'my community url',
                gslbBaseURL,
                'my org id',
                'Skills_Chat_POC',
                {
                    baseLiveAgentContentURL: 'content url',
                    deploymentId: 'deploymentId',
                    buttonId: 'buttonId1',
                    baseLiveAgentURL: 'baseLiveAgentURL',
                    eswLiveAgentDevName: 'EmbeddedServiceLiveAgent_...',
                    isOfflineSupportEnabled: false
                }
            );
        };

        if (!window.embedded_svc) {
            var s = document.createElement('script');
            s.setAttribute('src', 'mydomain.my.salesforce.com/embeddedservice/5.0/esw.min.js');
            s.onload = function() {
                initESW(null);
            };
            document.body.appendChild(s);
        } else {
            initESW('https://service.force.com');
        }
    </script>
    
</apex:page>

Now - I put in the line embedded_svc.settings.fallbackRouting an array of button Ids that I have = ['buttonId1','buttonId2'];.

Expected behavior:

  1. If button buttonId1 has an available agent, the button should be clickable to start a chat session.
  2. If button buttonId1 does not have an available agent - the chat mechanism should check if buttonId2 has an available agent and if yes - the button should be clickable to start a chat session.

Problem:

The 2nd choice does not happen never, the button shows availability only for the buttonId1 and if it is not available, nothing happens.

Questions:

Am I implementing this wrong?

Is this the expected behavior of embedded_svc.settings.fallbackRouting?

Is there another way to get fallback routing?

1
  • Was this ever figured out? I'm guessing it's because buttonID1 has to always be online – Franz Mar 30 at 20:25

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.