Live Chat Visitor Badge

Prev Next

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

  1. 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

  1. 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
  }
);
Copyright © 2022 Comm100 Network Corporation. All Rights Reserved.