Live Chat Visitor Badge
- 14 Jul 2022
- 1 Minute to read
- Print
- DarkLight
Live Chat Visitor Badge
- Updated on 14 Jul 2022
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
The widget appears as an icon beside the visitor avatar in the live chat tab.
Example manifest:
{
"manifestVersion": "2.0",
"agentConsole": {
"widgets": {
"visitorBadge": {
"id": "custom-icon",
"url": "./index.html",
"tooltip": "Custom Icon",
"icon": "./icon.png"
}
}
}
}
See more introduction.
The following additional actions are available in this widget:
How to Use API
You must invoke api through SDK, which provides different methods, such as listening to events using the on method. Which method is used to call the api? It it desided by the providor.
Learn more for SDK view here.
Actions
- Update the visitor badge widget
Params:
Name | Type | Description |
---|---|---|
isEnabled | bool | Default value is true , if the value is true , the custom icon is available. |
isHidden | bool | Default value is false , if the value is true , the custom icon is hidden. |
Return:
No.
Example
:
const client = APPClient.init();
client
.set("agentconsole.livechat.visitorBadges.icon", {
isEnabled: true,
isHidden: false,
})
Events
- Register click event callback
Params:
Name | Type | Description |
---|---|---|
callback | function | The callback function will be fired when clicking the extended badge. |
Return:
No.
Example:
const client = APPClient.init();
client.on(
"agentconsole.livechat.visitorBadges.icon.click",
function (badge) {
// do stuff
}
);
Was this article helpful?