I am trying to display both chat and flow in VF page

For the chat - I insert the embedded snap in and it works.

For the flow - I want it to look in the lightning UI, so I am opening it from lighting:out app.

The flow works good, but, The problem is that now when I click on the chat to start "chat with an agent" I get this error:

This page has an error. You might just need to refresh it. [NoErrorObjectAvailable] Script error.


Can I have both flow and chat on the same page with lighting enabled? what is the right way to do that?

This is my VF page code:

<apex:page showHeader="false" sidebar="false">

            <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
            <apex:includeLightning />
            <div id="flowContainer" />


            $Lightning.use("c:SupportForm",                             // name of the Lightning app
                           function() {                                 // Callback once framework and app loaded
                                   "c:SupportForm_CaseFlow",            // top-level component of your app
                                   {}   ,                               // attributes to set on the component when created
                                   "flowContainer",                     // the DOM location to insert the component
                                   function(cmp) {
                                                                        // callback when component is created and active on the page

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

            <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 = ''; //For example, enter 'en' or 'en-US'

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

                            baseLiveAgentContentURL: 'https://c.xxxxxx.salesforceliveagent.com/content',
                            deploymentId: 'xxxxxxxx',
                            buttonId: 'xxxxxxxx',
                            baseLiveAgentURL: 'https://d.xxxxxxxx.salesforceliveagent.com/chat',
                            eswLiveAgentDevName: 'chat_team',
                            isOfflineSupportEnabled: false

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


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.