forked from ESW1234/esw1234.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbryan_testcodesnippetgenerator.html
More file actions
48 lines (34 loc) · 3.37 KB
/
bryan_testcodesnippetgenerator.html
File metadata and controls
48 lines (34 loc) · 3.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0">
</head>
<body>
This is a page.
<div id="button_goes_here"></div>
<script type='text/javascript' src='https://service.force.com/lightning/lightning.out.js'></script>
<script type='text/javascript' src='https://service.force.com/204.0/esw.js'></script>
<script type='text/javascript'>
var initESW = function(gslbBaseUrl) {
/*Optionally specify the embedded_svc.settings to customize the images used in the snap-in chat widget.
To change the chat avatar, specify an image URL in embedded_svc.settings.avatarImgURL = '';
To change the background image on the pre-chat form, specify an image URL in embedded_svc.settings.prechatBackgroundImgURL = '';
To change the background image that appears when the customer is waiting for an agent to join the chat, specify an image URL in embedded_svc.settings.waitingStateBackgroundImgURL = '';
To show your company logo in the chat button when the button is minimized, specify an image URL in embedded_svc.settings.smallCompanyLogoImgURL = '';*/
embedded_svc.settings.avatarImgURL = '';
embedded_svc.settings.prechatBackgroundImgURL = '';
embedded_svc.settings.waitingStateBackgroundImgURL = '';
embedded_svc.settings.smallCompanyLogoImgURL = '';
/*Optionally specify the embedded_svc.settings to customize the appearance and behavior of the snap-in chat widget.
To show the default chat button that connects your customers to the chat widget, set the displayHelpButton = true;. Valid parameters are true|false.
To specify whether the pre-chat form appears when a customer initiates a chat, set initialInteractionState = "PRECHAT";. Valid parameters are PRECHAT|WAITING. By default, the parameter is set to show the pre-chat form. If you set it to “Waiting,” then the chat widget doesn’t show the pre-chat form and immediately opens a chat window.
To customize the text that appears in the chat button when agents are online, set the parameter onlineText = "..." to whatever text you want to show. If you don’t specify this parameter, the default text shown is “Chat with an Expert”.
To customize the text that appears in the chat button when agents are offline, set the parameter offlineText = "..." to whatever text you want to show. If you don’t specify this parameter, the default text shown is “Agent Offline”.*/
embedded_svc.settings.displayHelpButton = true; //Or false
embedded_svc.settings.initialInteractionState = 'PRECHAT'; //Or 'WAITING'
//embedded_svc.settings.onlineText = '...'; (defaults to Chat with an Expert, localized)
//embedded_svc.settings.offlineText = '...'; (defaults to Agent Offline, localized)
embedded_svc.init('http://b-chu-ltm.internal.salesforce.com:6109', 'http://b-chu-ltm.internal.salesforce.com:8096/chat', 'http://b-chu-ltm.internal.salesforce.com:8095/content', 'null', '572xx000000000BAAQ', '00Dxx0000001gV3', '573xx000000000BAAQ', '204.0', gslbBaseUrl);
} if (!window.embedded_svc) { var s = document.createElement('script'); s.setAttribute('src', 'http://b-chu-ltm.internal.salesforce.com:6109/embeddedservice/204.0/esw.js'); s.onload = function() { initESW(null); }; document.body.appendChild(s);} else { initESW('http://b-chu-ltm.internal.salesforce.com:6109'); }</script>
</body>
</html>