All Products
- 14 Jul 2022
- 1 Minute to read
- Print
- DarkLight
All Products
- Updated on 14 Jul 2022
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
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 |
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
- 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");
- 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
- Get the settings of app
Parameters
: no parameters
Scripts
:
const client = APPClient.init();
client.get("app.settings")
.then(function(settings) {
// do stuff
});
- 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);
Was this article helpful?