代理端点

智能体端点提供了一种获取智能体对象的方法。每个智能体对象都代表 Contact Center AI 平台 (CCAI Platform) 内的单个智能体。请查看以下模型,了解哪些字段可能包含个人身份信息 (PII)。

[
  {
    "id": 0,
    "email": "string",
    "created_at": "2018-05-30T20:46:31.333Z",
    "last_login_time": "2018-05-30T20:46:31.333Z",
    "first_name": "string",
    "middle_name": "string",
    "last_name": "string",
    "avatar_url": "string",
    "agent_number": "string",
    "status": {
      "id": 0,
      "name": "string",
      "color": "string"
    },
    "status_updated_at": "2018-05-30T20:46:31.333Z",
    "crm_authenticated": true,
    "online": true,
    "wrap_up": true,
    "call_count": 0,
    "chat_count": 0,
    "location": "string",
    "roles": [
      "agent"
    ],
    "teams": [
      {
        "id": 0,
        "name": "string",
        "parent_id": 0,
        "position": 0,
        "deleted": true,
        "agents_count": 0
      }
    ],
    "channels": [
      {
        "channel_type": "chat",
        "menu": {
          "id": 0,
          "name": "string",
          "parent_id": 0,
          "position": 0,
          "deleted": true,
          "hidden": "string",
          "menu_type": "ivr_menu",
          "output_msg": "string"
        }
      }
    ]
  }
]

智能体

参数 必需 数据类型 定义
页面 FALSE 字符串 与“每”配对,用于注明记录的页面。例如,如果“每”设置为 200,而“页面”设置为 2,则响应将包含记录 201-400,因为第 1 页将包含 1-200。
FALSE 字符串 与“页面”配对,用于注明记录页面中包含的记录数。例如,如果“每”设置为 200,而“页面”设置为 2,则响应将包含记录 201-400,因为第 1 页将包含 1-200。
id[] FALSE 数组 [字符串] 数组 [字符串]。要搜索和返回的记录的 ID
agent_number[] FALSE 数组 [字符串] 管理员在创建智能体时分配的智能体编号
status_id[] FALSE 数组 [字符串] 按智能体状态过滤
online[] FALSE 布尔值 按智能体是否在线过滤
wrap_up[] FALSE 布尔值 按智能体是否处于结束状态过滤
location[] FALSE 数组 [字符串] 按智能体位置过滤
last_login_time[from] FALSE UTC 时间 创建上次登录时间字段的下限。返回的所有记录都将晚于输入的值。
last_login_time[to] FALSE UTC 时间 创建上次登录时间字段的上限。返回的所有记录都将早于输入的值。
status_updated_at[from] FALSE UTC 时间 创建状态更新时间字段的下限。返回的所有记录都将晚于输入的值。
status_updated_at[to] FALSE UTC 时间 创建状态更新时间字段的上限。返回的所有记录都将早于输入的值。

端点

Method: GET
Type: 
URL: https://{{subdomain}}.{{domain}}/manager/api/v1/agents

更多请求/响应示例

请求示例:智能体示例

正文:无

响应示例:智能体示例

[
  {
    "id": 45,
    "email": "craigT@nelson.com",
    "roles": [
      "agent"
    ],
    "first_name": "Craig T",
    "middle_name": null,
    "last_name": "Nelson",
    "avatar_url": "https://subdomain.somedomain.com/default-profile.png",
    "agent_number": null,
    "crm_authenticated": false,
    "status": {
      "id": -6,
      "name": "Wrap-up",
      "color": "purple",
    },
    "online": false,
    "wrap_up": false,
    "call_count": 0,
    "chat_count": 0,
    "location": null,
    "created_at": "2016-11-10T00:15:04.000Z",
    "last_login_time": "2016-11-10T00:17:57.000Z",
    "status_updated_at": null,
    "teams": [
      {
        "id": 163,
        "name": "team CTN",
        "parent_id": null,
        "position": 11,
        "agents_count": 12,
        "deleted": false
      }
    ],
    "channels": [
      {
        "channel_type": "voice_call",
        "menu": {
          "id": 2029,
          "name": "Mobile Queue",
          "parent_id": null,
          "position": 0,
          "deleted": false,
          "menu_type": "mobile_menu",
          "output_msg": null,
          "hidden": false
        }
      }
    ]
  },
  {
    "id": 60,
    "email": "notanakinskywalker@empire.com",
    "roles": [
      "agent"
    ],
    "first_name": "Darth",
    "middle_name": null,
    "last_name": "Vader",
    "avatar_url": "https://subdomain.somedomain.com/default-profile.png",
    "agent_number": null,
    "crm_authenticated": false,
    "status": {
      "id": -7,
      "name": "In-call",
      "color": "light_blue",
    },
    "online": false,
    "wrap_up": false,
    "call_count": 0,
    "chat_count": 0,
    "location": null,
    "created_at": "2017-02-03T19:44:14.000Z",
    "last_login_time": "2017-02-03T20:05:31.000Z",
    "status_updated_at": "2017-02-04T12:36:11.000Z",
    "teams": [],
    "channels": [
      {
        "channel_type": "voice_call",
        "menu": {
          "id": 1693,
          "name": "Premium Support",
          "parent_id": null,
          "position": 0,
          "deleted": false,
          "menu_type": "ivr_menu",
          "output_msg": "You selected premium support",
          "hidden": false
        }
      }
    ]
  },
  {
    "id": 81,
    "email": "email@email.com",
    "roles": [
      "agent"
    ],
    "first_name": "Barry",
    "middle_name": null,
    "last_name": "Allen",
    "avatar_url": "https://subdomain.somedomain.com/default-profile.png",
    "agent_number": null,
    "crm_authenticated": false,
    "status": {
      "id": -10,
      "name": "Offline",
      "color": "grey",
    },
    "online": false,
    "wrap_up": false,
    "call_count": 0,
    "chat_count": 0,
    "location": null,
    "created_at": "2017-03-13T23:47:39.000Z",
    "last_login_time": "2017-03-13T23:48:17.000Z",
    "status_updated_at": "2017-03-13T23:56:04.000Z",
    "teams": [],
    "channels": [
      {
        "channel_type": "voice_call",
        "menu": {
          "id": 2028,
          "name": "Speed Issues",
          "parent_id": 2027,
          "position": 0,
          "deleted": false,
          "menu_type": "mobile_menu",
          "output_msg": null,
          "hidden": false
        }
      }
    ]
  }
]

状态代码 200

智能体当前状态

智能体当前状态会返回所有已登录的智能体及其当前状态、处于该状态的时长,以及其他信息,以指明智能体是否处于保留状态以及处于该状态的时长。

端点

Method: GET
Type: 
URL: https://{{subdomain}}.{{domain}}/manager/api/v1/agents/current_status

更多请求/响应示例

请求示例:智能体当前状态

正文:无

响应示例:智能体当前状态

[
  {
    "id": 1,
    "status": "Available",
    "status_id": 0,
    "status_updated_at": "2021-05-10T17:45:01.000Z",
    "on_hold": false,
    "on_hold_duration": 0
  }
]

状态代码 0

预计 API 响应中会出现无法识别的 JSON 键

所有 API 更新都向后兼容。我们保留随时在现有 API 响应中引入新 JSON 键的权利。我们建议您以防御方式处理响应,忽略任何无法识别的键,以保持持续的功能。