function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
UMANG GARGUMANG GARG 

live agent and snap ins related:

I have used two Chat buttons, one with pre-chat form and other without pre-chat form with different Deployments. Its working fine if using them seperately in the page. But if using them together in the page, then it is showing configuration of second script on page but request is sent to the agent of first button and vice versa by changing the order of script. Below is my script:
<style type='text/css'>
.embeddedServiceHelpButton .helpButton .uiButton { background-color: #F3AE6E; font-family: "Salesforce Sans", sans-serif; }
.embeddedServiceHelpButton .helpButton .uiButton:focus { outline: 1px solid #F3AE6E; }
@font-face {
font-family: 'Salesforce Sans';
src: url('https://www.sfdcstatic.com/system/shared/common/assets/fonts/SalesforceSans/SalesforceSans-Regular.woff') format('woff'),
url('https://www.sfdcstatic.com/system/shared/common/assets/fonts/SalesforceSans/SalesforceSans-Regular.ttf') format('truetype');
}
</style>
<script type='text/javascript' src='https://service.force.com/embeddedservice/3.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.defaultMinimizedText = '...'; //(Defaults to Chat with an Expert)
//embedded_svc.settings.disabledMinimizedText = '...'; //(Defaults to Agent Offline)

//embedded_svc.settings.loadingText = ''; //(Defaults to Loading)
//embedded_svc.settings.storageDomain = 'yourdomain.com'; //(Sets the domain for your deployment so that visitors can navigate subdomains during a chat session)

// Settings for Live Agent
embedded_svc.settings.avatarImgURL = '';
embedded_svc.settings.prechatBackgroundImgURL = '';
embedded_svc.settings.waitingStateBackgroundImgURL = '';
embedded_svc.settings.smallCompanyLogoImgURL = '';

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

embedded_svc.init('https://c2s--andrew.cs97.my.salesforce.com', 'https://andrew-tyco.cs97.force.com/livechat', gslbBaseURL, '00D0U000000Cmt0', 'SnapInsTrial', { baseLiveAgentContentURL: 'https://c.la2-c2cs-iad.salesforceliveagent.com/content', deploymentId: '572E0000000blJJ', buttonId: '5730L000000CqGK', baseLiveAgentURL: 'https://d.la2-c2cs-iad.salesforceliveagent.com/chat', eswLiveAgentDevName: 'EmbeddedServiceLiveAgent_Parent04I0U0000000001UAA_15e586bc423'}); };if (!window.embedded_svc) { var s = document.createElement('script'); s.setAttribute('src', 'https://c2s--andrew.cs97.my.salesforce.com/embeddedservice/3.0/esw.min.js'); s.onload = function() { initESW(null); }; document.body.appendChild(s); } else { initESW('https://c2s--andrew.cs97.my.salesforce.com'); }</script>
<style type='text/css'>
.embeddedServiceHelpButton .helpButton .uiButton { background-color: #005290; font-family: "Salesforce Sans", sans-serif; }
.embeddedServiceHelpButton .helpButton .uiButton:focus { outline: 1px solid #005290; }
@font-face {
font-family: 'Salesforce Sans';
src: url('https://www.sfdcstatic.com/system/shared/common/assets/fonts/SalesforceSans/SalesforceSans-Regular.woff') format('woff'),
url('https://www.sfdcstatic.com/system/shared/common/assets/fonts/SalesforceSans/SalesforceSans-Regular.ttf') format('truetype');
}
</style>
<script type='text/javascript' src='https://service.force.com/embeddedservice/3.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.defaultMinimizedText = '...'; //(Defaults to Chat with an Expert)
//embedded_svc.settings.disabledMinimizedText = '...'; //(Defaults to Agent Offline)

//embedded_svc.settings.loadingText = ''; //(Defaults to Loading)
//embedded_svc.settings.storageDomain = 'yourdomain.com'; //(Sets the domain for your deployment so that visitors can navigate subdomains during a chat session)

// Settings for Live Agent
embedded_svc.settings.avatarImgURL = '';
embedded_svc.settings.prechatBackgroundImgURL = '';
embedded_svc.settings.waitingStateBackgroundImgURL = '';
embedded_svc.settings.smallCompanyLogoImgURL = '';

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

embedded_svc.init('https://c2s--andrew.cs97.my.salesforce.com', 'https://andrew-tyco.cs97.force.com/livechat', gslbBaseURL, '00D0U000000Cmt0', 'SnapInsWoPC', { baseLiveAgentContentURL: 'https://c.la2-c2cs-iad.salesforceliveagent.com/content', deploymentId: '5720U0000004CBI', buttonId: '5730L0000000ImX', baseLiveAgentURL: 'https://d.la2-c2cs-iad.salesforceliveagent.com/chat', eswLiveAgentDevName: 'EmbeddedServiceLiveAgent_Parent04I0U0000000006UAA_15e60c53f5b'}); };if (!window.embedded_svc) { var s = document.createElement('script'); s.setAttribute('src', 'https://c2s--andrew.cs97.my.salesforce.com/embeddedservice/3.0/esw.min.js'); s.onload = function() { initESW(null); }; document.body.appendChild(s); } else { initESW('https://c2s--andrew.cs97.my.salesforce.com'); }</script>
Please help me in resolving the issue. 
Danny BoyleDanny Boyle
Hi Umang,
I have to implement somthing similar. 2 separate snap-in deployments (one with pre-chat and one without pre-chat). Were you able to resolve your issue? Please share the code.