代理端點可讓您取得代理物件。每個服務專員物件代表 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"
}
}
]
}
]
代理
/manager/api/v1/agents 端點只會傳回活躍服務專員的物件、即時狀態和上線狀態資料。這個端點不會傳回已停用的代理記錄。
下表列出 /manager/api/v1/agents 端點支援的查詢參數:
| 參數 | 必填 | 資料類型 | 定義 |
|---|---|---|---|
| 頁面 | FALSE | 字串 | 與 per 搭配使用,表示記錄頁面。舉例來說,如果 per 設為 200,page 設為 2,則回應會包含記錄 201-400,因為 page 1 會包含 1-200。 |
| / | FALSE | 字串 | 與 page 搭配使用,表示一頁記錄中應包含多少筆記錄。舉例來說,如果 per 設為 200,page 設為 2,則回應會包含記錄 201-400,因為 page 1 會包含 1-200。 |
| id[] | FALSE | Array[String] | Array[Strings]。要搜尋及傳回的記錄 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
更多要求/回應範例:
要求範例:代理範例
Body: None
回覆範例:代理範例
[
{
"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
代理目前狀態
「Agents Current Status」(服務專員目前狀態) 會傳回所有已登入的服務專員及其目前狀態、處於該狀態的時間長度,以及其他資訊,指出服務專員是否處於保留狀態,以及保留時間長度。
端點:
Method: GET
Type:
URL: https://{{subdomain}}.{{domain}}/manager/api/v1/agents/current_status
更多要求/回應範例:
要求範例:代理目前狀態
Body: None
回覆範例:代理目前的狀態
[
{
"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 鍵的權利。建議您謹慎處理回應,忽略任何無法辨識的鍵,以維持功能正常運作。