Skip to content

Commit ffda682

Browse files
authored
Create wsi.html
1 parent 7b06ebb commit ffda682

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<html>
2+
<head>
3+
<title>Williams Sonoma</title>
4+
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
5+
</head>
6+
<body>
7+
8+
<style>
9+
body {
10+
/*overflow: hidden*/;
11+
}
12+
.background-container {
13+
width: 100%;
14+
}
15+
16+
.background-container img {
17+
display: block;
18+
width: 100%;
19+
height: 200%;
20+
}
21+
</style>
22+
23+
24+
<div class="background-container">
25+
<!-- <img src="https://esw1234.github.io/wsi.png" alt="Background"> -->
26+
</div>
27+
28+
<button type="button" class="custom-fab" onclick="launchChat()">launch chat</button>
29+
<button type="button" class="custom-fab" onclick="sendNudge()">send nudge</button>
30+
<script type='text/javascript'>
31+
function sendNudge(nudge) {
32+
embeddedservice_bootstrap.utilAPI.sendTextMessage("Text");
33+
}
34+
35+
function launchChat() {
36+
embeddedservice_bootstrap.utilAPI.launchChat();
37+
}
38+
39+
function initEmbeddedMessaging() {
40+
try {
41+
embeddedservice_bootstrap.settings.language = 'en_US'; // For example, enter 'en' or 'en-US'
42+
embeddedservice_bootstrap.settings.devMode = true;
43+
44+
embeddedservice_bootstrap.init(
45+
'00DSB00000aGFJL',
46+
'CWC_5',
47+
'https://orgfarm-d585323017.test1.my.pc-rnd.site.com/ESWCWC51764103699905',
48+
{
49+
scrt2URL: 'https://orgfarm-d585323017.test1.my.pc-rnd.salesforce-scrt.com'
50+
}
51+
);
52+
} catch (err) {
53+
console.error('Error loading Embedded Messaging: ', err);
54+
}
55+
};
56+
</script>
57+
<script type='text/javascript' src='https://orgfarm-d585323017.test1.my.pc-rnd.site.com/ESWCWC51764103699905/assets/js/bootstrap.js' onload='initEmbeddedMessaging()'></script>
58+
59+
</body>
60+
</html>

0 commit comments

Comments
 (0)