All Products

Prev Next

Introduction

The following objects will be shared in all supported app products. You can get the corresponding information according to the API provided for each object.

First of all, you must understand the methods provided by the SDK. Click here for the corresponding document.

Objects

Basic Data Structure

Agent

Name Type Description
id string Agent id
name string Agent name
email string Agent email
permissions array Current agent permission list. If current agent is admin, permission field return a empty array.
status string The status of agent, this property is only available for Agent Console
chats number Ongoing chats, this property is only available for Agent Console
isAdmin boolean The role of current agent
avatar string The avatar of current agent
language string The language set by the site which the agent belongs to
timeZone string Time zone set by agent
datetimeFormat string Time format set by agent

Permission

Name Type Description
id number It is permission Id
description string It raw html, describe the scope of this permission
moduleId string Module name to which the permission belongs
parentId number The current permission belongs to which parent permission

Agent

Agent refers to the currently logged-in agents. The Agent object supports the Agent Console and Control Panel modules.

Actions

  1. Get Current Agent Information

Get information of current logged-in agent.

Parameters: No parameters.

Scripts

const client = APPClient.init();
const currentAgent = await client.get("currentAgent");
  1. Change status for current agent
    This API only supports in Agent Console.

Parameters:

Name Type Description
label string The label of status switch to. System label: online, offline and away

Scripts:

const client = APPClient.init();
client.set("currentAgent.status", label);

App

Actions

  1. Get the settings of app

Parameters: no parameters

Scripts:

const client = APPClient.init();
client.get("app.settings")
.then(function(settings) {
// do stuff
});

  1. Store the settings of app

Parameters:

Name Type Description
settings object Needs to be stored data for your app

Scripts:

const client = APPClient.init();
client.set("app.settings", settings);

Copyright © 2022 Comm100 Network Corporation. All Rights Reserved.