You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<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.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 Chat
//embedded_svc.settings.directToButtonRouting = function(prechatFormData) {
// Dynamically changes the button ID based on what the visitor enters in the pre-chat form.
// Returns a valid button ID.
//};
//embedded_svc.settings.prepopulatedPrechatFields = {}; //Sets the auto-population of pre-chat form fields
//embedded_svc.settings.fallbackRouting = []; //An array of button IDs, user IDs, or userId_buttonId
//embedded_svc.settings.offlineSupportMinimizedText = '...'; //(Defaults to Contact Us)
embedded_svc.settings.enabledFeatures = ['LiveAgent'];
embedded_svc.settings.entryFeature = 'LiveAgent';
embedded_svc.init(
'https://domain--xxx.my.salesforce.com',
'https://xxxx-domain.cs90.force.com/survey',
gslbBaseURL,
'20201020',
'Support',
{
baseLiveAgentContentURL: 'https://c.xxx-c1cs-phx.salesforceliveagent.com/content',
deploymentId: 'xxxxxxx',
buttonId: 'xxxxxxx',
baseLiveAgentURL: 'https://d.la4-c1cs-phx.salesforceliveagent.com/chat',
eswLiveAgentDevName: 'Support',
isOfflineSupportEnabled: false
}
);
};
if (!window.embedded_svc) {
var s = document.createElement('script');
s.setAttribute('src', 'https://xxxxxxx--xxxx.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>`
The text was updated successfully, but these errors were encountered:
rahulpuroht
changed the title
SaleForce Widget
SaleForce Widget with turbolinks
Mar 23, 2021
Sample can be check from this link also
https://stackoverflow.com/questions/63678354/how-to-wrap-a-salesforce-live-chat-in-angularjs
`<style type='text/css'>
<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.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 Chat //embedded_svc.settings.directToButtonRouting = function(prechatFormData) { // Dynamically changes the button ID based on what the visitor enters in the pre-chat form. // Returns a valid button ID. //}; //embedded_svc.settings.prepopulatedPrechatFields = {}; //Sets the auto-population of pre-chat form fields //embedded_svc.settings.fallbackRouting = []; //An array of button IDs, user IDs, or userId_buttonId //embedded_svc.settings.offlineSupportMinimizedText = '...'; //(Defaults to Contact Us) embedded_svc.settings.enabledFeatures = ['LiveAgent']; embedded_svc.settings.entryFeature = 'LiveAgent'; embedded_svc.init( 'https://domain--xxx.my.salesforce.com', 'https://xxxx-domain.cs90.force.com/survey', gslbBaseURL, '20201020', 'Support', { baseLiveAgentContentURL: 'https://c.xxx-c1cs-phx.salesforceliveagent.com/content', deploymentId: 'xxxxxxx', buttonId: 'xxxxxxx', baseLiveAgentURL: 'https://d.la4-c1cs-phx.salesforceliveagent.com/chat', eswLiveAgentDevName: 'Support', isOfflineSupportEnabled: false } ); }; if (!window.embedded_svc) { var s = document.createElement('script'); s.setAttribute('src', 'https://xxxxxxx--xxxx.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>`.embeddedServiceHelpButton .helpButton .uiButton {
background-color: #808080;
font-family: "Salesforce Sans", sans-serif;
}
.embeddedServiceHelpButton .helpButton .uiButton:focus {
outline: 1px solid #808080;
}
@font-face {
font-family: 'Salesforce Sans';
src: url('https://c1.sfdcstatic.com/etc/clientlibs/sfdc-aem-master/clientlibs_base/fonts/SalesforceSans-Regular.woff') format('woff'),
url('https://c1.sfdcstatic.com/etc/clientlibs/sfdc-aem-master/clientlibs_base/fonts/SalesforceSans-Regular.ttf') format('truetype');
}
</style>
The text was updated successfully, but these errors were encountered: