...
Code Block | ||
---|---|---|
| ||
$(document).ready(
function() {
$.getScript("https://mywebsite.com/livechat/lib/livechatagentsdk.js")
.then(
function() {
return LIVECHATSDK.SDK.Init("https://mywebsite.com/livechat/")
}
).then(
function() {
// CTLive Agent's SDK library loaded
// Call library initialization...
LIVECHATSDK.LIVECHAT.init(
{
"nickname": "Agent1",
"isAgent": true,
"id": "USER_AGENT1",
"channel": "web"
}
);
}
).catch(
function(err) {
console.error(err);
}
);
}
);
|
CTLive SDK needs to be initialized specifying some parameters:
nickname: a friendly id that identifies the user
isAgent: a true/false value that identifies the user as a call center agent
id: unique user identifier
channel:
web
is the default value, otherwisewhatsapp
identify an engagement from the WhatsApp mobile application