-
Notifications
You must be signed in to change notification settings - Fork 123
Expand file tree
/
Copy pathmiaw_loacl_prechat.html
More file actions
35 lines (31 loc) · 1.15 KB
/
miaw_loacl_prechat.html
File metadata and controls
35 lines (31 loc) · 1.15 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
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
<title>Test Page</title>
</head>
<body><script type='text/javascript'>
function initEmbeddedMessaging() {
try {
embeddedservice_bootstrap.settings.language = 'en_US'; // For example, enter 'en' or 'en-US'
window.addEventListener("onEmbeddedMessagingReady", () => {
console.log("Received the onEmbeddedMessagingReady event…");
// Send data to Salesforce
embeddedservice_bootstrap.prechatAPI.setHiddenPrechatFields(
{"MiddleName" : "K"});
});
embeddedservice_bootstrap.init(
'00Dxx0000006Gm7',
'MIAWDP25Sep',
'https://chatorg.my.localhost.sfdcdev.site.com:6101/ESWMIAEDP25Sep1758803904400',
{
scrt2URL: 'https://chatorg.my.localhost.sfdcdev.salesforce-scrt.com:18000'
}
);
} catch (err) {
console.error('Error loading Embedded Messaging: ', err);
}
};
</script>
<script type='text/javascript' src='https://chatorg.my.localhost.sfdcdev.site.com:6101/ESWMIAEDP25Sep1758803904400/assets/js/bootstrap.min.js' onload='initEmbeddedMessaging()'></script>
</body>
</html>