代理程式端點

代理程式端點提供取得代理程式物件的方法。每個代理程式物件都代表 Contact Center AI 平台 (CCAI 平台) 內的單一代理程式。請查看下列模型,瞭解哪些欄位可能含有個人識別資訊 (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 字串 搭配「per」使用,註明記錄的頁面。舉例來說,如果 per 設為 200,而 page 設為 2,則回應會包含記錄 201 到 400,因為第 1 頁會包含記錄 1 到 200。
/ FALSE 字串 與頁面配對,記錄一頁記錄中會包含多少筆記錄。舉例來說,如果 per 設為 200,而 page 設為 2,則回應會包含記錄 201 到 400,因為第 1 頁會包含記錄 1 到 200。
id[] FALSE Array[String] 字串陣列。要搜尋及傳回的記錄 ID
agent_number[] FALSE Array[String] 管理員在建立服務專員時指派的號碼
status_id[] FALSE Array[String] 依代理商狀態篩選
online[] FALSE 布林值 依代理是否在線上篩選
wrap_up[] FALSE 布林值 依代理是否處於結尾狀態篩選
location[] FALSE Array[String] 依代理商位置篩選
last_login_time[from] FALSE 世界標準時間 建立上次登入時間欄位的下限。系統會傳回輸入值之後的所有記錄。
last_login_time[to] FALSE 世界標準時間 建立上次登入時間欄位的上限。傳回的所有記錄都會早於輸入值。
status_updated_at[from] FALSE 世界標準時間 建立狀態更新時間欄位的下限。系統會傳回輸入值之後的所有記錄。
status_updated_at[to] FALSE 世界標準時間 建立狀態更新時間的上限。傳回的所有記錄都會早於輸入值。

端點:

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 金鑰。建議您採取防禦性做法處理回應,忽略任何無法辨識的鍵,以維持功能運作。