選單代表代理可指派的佇列,以及終端使用者與代理聯絡時可選取的選項。每個物件代表一個選單。
菜單端點共有七個:
/menu- 顯示菜單清單。/menu/tree- 以樹狀結構形式提取選單,模擬使用者與服務專員聯絡時的路徑。/menu/{:id}- 提取單一選單資源。/menu/current_status- Returns current queue status for menus with consumers waiting in queue./menu/sla- 傳回從現在起至先前指定分鐘數的所有選單路徑的服務等級協議。/menu/sla_by_queue_group- 傳回從現在起至先前指定分鐘數的所有佇列群組 SLA。/menus/operation_hours:傳回菜單的營業時間。
請參考下列模型,判斷哪些欄位可能含有 PII:
{
"id": 0,
"name": "string",
"parent_id": 0,
"position": 0,
"deleted": true,
"hidden": "string",
"menu_type": "ivr_menu",
"output_msg": "string",
"agent_assignments": [
{
"lang": "en",
"queue_level": "primary",
"channel_type": "chat",
"assignee": {
"id": 0,
"name": "string", // This may be considered PII
"last_name": "string", // This may be considered PII
"first_name": "string", // This may be considered PII
"agent_number": "string",
"avatar_url": "string"
}
}
],
"team_assignments": [
{
"lang": "en",
"queue_level": "primary",
"channel_type": "chat",
"team": {
"id": 0,
"name": "string",
"parent_id": 0,
"position": 0,
"deleted": true,
"agents_count": 0,
"assignees": {
"id": 0,
"name": "string", // This may be considered PII
"last_name": "string", // This may be considered PII
"first_name": "string", // This may be considered PII
"agent_number": "string",
"avatar_url": "string"
}
}
}
]
}
選單清單
| 參數 | 必填 | 資料類型 | 定義 |
|---|---|---|---|
| sort_column | FALSE | 字串 | 根據回應物件中的任何欄位排序回應。 |
| sort_direction | FALSE | ASC 或 DESC | 註明排序方向,是遞增還是遞減 |
| 頁面 | 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 |
| 名稱 [] | FALSE | Array[String] | 根據資源名稱傳回記錄。 |
| parent_id[] | FALSE | Array[String] | 根據指定記錄的父項 ID 傳回記錄 |
| position[] | FALSE | Array[String] | 根據選單所在位置傳回記錄 |
| menu_type[] | FALSE | Array[String] | 根據選單類型傳回記錄。可能的值:ivr_menu、mobile_menu、web_menu |
| hidden[] | FALSE | 布林值 | 傳回已隱藏的記錄 (True),或不傳回已隱藏的記錄 (False) |
| with_deleted | FALSE | 布林值 | 傳回已刪除的記錄 (True),或不傳回已刪除的記錄 (False) |
端點:
Method: GET
Type:
URL: https://{{subdomain}}.{{domain}}/manager/api/v1/menus
更多要求/回應範例:
要求範例:菜單清單
內文:無
回覆範例:菜單清單
[
{
"id": 1693,
"name": "Death Star",
"parent_id": null,
"position": 0,
"deleted": false,
"menu_type": "ivr_menu",
"output_msg": "You have reached the Death Star",
"hidden": false,
"agent_assignments": [
{
"lang": "en",
"queue_level": "primary",
"channel_type": "voice_call",
"assignee": {
"id": 97,
"agent_number": 97,
"name": "Darth Vader",
"last_name": "Darth",
"first_name": "Vader"
}
},
{
"lang": "it",
"queue_level": "primary",
"channel_type": "voice_call",
"assignee": {
"id": 1407,
"agent_number": 123,
"name": "Moff Tarkin",
"last_name": "Moff",
"first_name": "Tarkin"
}
}
],
"team_assignments": [
{
"lang": "en",
"queue_level": "primary",
"channel_type": "voice_call",
"team": {
"id": 10,
"name": "Storm Troopers",
"parent_id": null,
"position": 1,
"agents_count": 48,
"deleted": false,
"assignees": [
{
"id": 1,
"agent_number": null,
"name": "Storm Troooper 1",
"last_name": "Storm ",
"first_name": "Admin1",
"avatar_url": "https://subdomain.somedomain.com/data_uri_upload20171201-21853-1ijzccm.png"
},
{
"id": 2,
"agent_number": null,
"name": "Storm Troooper 2",
"last_name": "Storm ",
"first_name": "Admin1",
"avatar_url": "https://subdomain.somedomain.com/data_uri_upload20171201-21853-1ijzccm.png"
},
{
"id": 3,
"agent_number": null,
"name": "Storm Troooper 3",
"last_name": "Storm ",
"first_name": "Admin1",
"avatar_url": "https://subdomain.somedomain.com/data_uri_upload20171201-21853-1ijzccm.png"
}
]
}
}
]
}]
狀態碼:200
選單樹狀結構
| 參數 | 必填 | 資料類型 | 定義 |
|---|---|---|---|
| menu_type | FALSE | Array[String] | 根據選單類型傳回記錄。可能的值:ivr_menu、mobile_menu、web_menu |
| lang | FALSE | 字串 | 傳回具有特定語言屬性的記錄。可能的值:en、es、fr、de |
端點:
Method: GET
Type:
URL: https://{{subdomain}}.{{domain}}/manager/api/v1/menus/tree
更多要求/回應範例:
要求範例:菜單樹狀結構
內文:無
回覆範例:選單樹狀結構
[
{
"id": 2029,
"name": "Mobile 1",
"parent_id": null,
"position": 0,
"deleted": false,
"menu_type": "mobile_menu",
"output_msg": null,
"hidden": false,
"children": []
},
{
"id": 2024,
"name": "Death Star Venting System",
"parent_id": null,
"position": 1,
"deleted": false,
"menu_type": "mobile_menu",
"output_msg": null,
"hidden": false,
"children": []
},
{
"id": 2025,
"name": "Droid Repair",
"parent_id": null,
"position": 2,
"deleted": false,
"menu_type": "mobile_menu",
"output_msg": null,
"hidden": false,
"children": []
},
{
"id": 2049,
"name": "Emperor's Hotline",
"parent_id": null,
"position": 3,
"deleted": false,
"menu_type": "mobile_menu",
"output_msg": null,
"hidden": false,
"children": []
},
{
"id": 2026,
"name": "Storm Trooper Armor",
"parent_id": null,
"position": 4,
"deleted": false,
"menu_type": "mobile_menu",
"output_msg": null,
"hidden": false,
"children": [
{
"id": 2036,
"name": "Armor Polishing Team",
"parent_id": 2026,
"position": 0,
"deleted": false,
"menu_type": "mobile_menu",
"output_msg": null,
"hidden": false,
"children": []
}
]
}]
狀態碼:200
單一選單
| 參數 | 必填 | 資料類型 | 定義 |
|---|---|---|---|
| record_id | FALSE | 字串 | 根據 ID 傳回特定記錄 |
| with_deleted | FALSE | 布林值 | 傳回已刪除的記錄 (True),或不傳回已刪除的記錄 (False) |
端點:
Method: GET
Type:
URL: https://{{subdomain}}.{{domain}}/manager/api/v1/menus/{{menu_id}}
更多要求/回應範例:
要求範例:單一菜單
內文:無
回覆範例:單一選單
[
{
"id": 1693,
"name": "Death Star",
"parent_id": null,
"position": 0,
"deleted": false,
"menu_type": "ivr_menu",
"output_msg": "You have reached the Death Star",
"hidden": false,
"agent_assignments": [
{
"lang": "en",
"queue_level": "primary",
"channel_type": "voice_call",
"assignee": {
"id": 97,
"agent_number": 97,
"name": "Darth Vader",
"last_name": "Darth",
"first_name": "Vader"
}
},
{
"lang": "it",
"queue_level": "primary",
"channel_type": "voice_call",
"assignee": {
"id": 1407,
"agent_number": 123,
"name": "Moff Tarkin",
"last_name": "Moff",
"first_name": "Tarkin"
}
}
],
"team_assignments": [
{
"lang": "en",
"queue_level": "primary",
"channel_type": "voice_call",
"team": {
"id": 10,
"name": "Storm Troopers",
"parent_id": null,
"position": 1,
"agents_count": 48,
"deleted": false,
"assignees": [
{
"id": 1,
"agent_number": null,
"name": "Storm Troooper 1",
"last_name": "Storm ",
"first_name": "Admin1",
"avatar_url": "https://subdomain.somedomain.com/data_uri_upload20171201-21853-1ijzccm.png"
},
{
"id": 2,
"agent_number": null,
"name": "Storm Troooper 2",
"last_name": "Storm ",
"first_name": "Admin1",
"avatar_url": "https://subdomain.somedomain.com/data_uri_upload20171201-21853-1ijzccm.png"
},
{
"id": 3,
"agent_number": null,
"name": "Storm Troooper 3",
"last_name": "Storm ",
"first_name": "Admin1",
"avatar_url": "https://subdomain.somedomain.com/data_uri_upload20171201-21853-1ijzccm.png"
}
]
}
}
]
}]
狀態碼:200
菜單目前狀態
「Current Status」選單會傳回所有有佇列通話或即時通訊的選單,以及這些佇列項目的時間長度等額外資料。
端點:
Method: GET
Type:
URL: https://{{subdomain}}.{{domain}}/manager/api/v1/menus/current_status
更多要求/回應範例:
要求範例:菜單目前狀態
內文:無
回覆範例:菜單目前狀態
[
{
"menu_id": 10,
"lang": "en",
"menu_path_id": 5,
"menu_path": "zdco IVR Support/1 Day Shipping",
"comm_type": "Call",
"in_queue_count": 2,
"oldest_in_queue": "2021-05-10T22:17:21.000Z",
"oldest_duration_in_queue": 300,
"total_queue_duration": 400,
"average_queue_duration": 200
}
]
狀態碼:0
菜單服務水準協議
| 參數 | 必填 | 資料類型 | 定義 |
|---|---|---|---|
| 頻道 | TRUE | 字串 | 字串。可接受的值:call、chat |
| 分鐘 | TRUE | 字串 | 字串。計算服務水準協議時,要從現在回溯的分鐘數。舉例來說,如果值為 15,系統會為每個選單路徑要求過去 15 分鐘的 SLA |
端點:
Method: GET
Type:
URL: https://{{subdomain}}.{{domain}}/manager/api/v1/menus/sla
查詢參數:
| 鍵 | 值 | 說明 |
|---|---|---|
| 頻道 | {channel} | 字串。可接受的值:call、chat |
| 分鐘 | {minutes} | 字串。計算服務水準協議時,要從現在回溯的分鐘數。舉例來說,如果值為 15,系統會為每個選單路徑要求過去 15 分鐘的 SLA |
更多要求/回應範例:
要求範例:菜單服務水準協議
查詢:
| 鍵 | 值 | 說明 |
|---|---|---|
| 頻道 | {channel} | 字串。可接受的值:call、chat |
| 分鐘 | {minutes} | 字串。計算服務水準協議時,要從現在回溯的分鐘數。舉例來說,如果值為 15,系統會為每個選單路徑要求過去 15 分鐘的 SLA |
內文:無
回覆範例:菜單服務水準協議
[
{
"menu_path_id": 100,
"lang": "en",
"menu_path": "Support/1 Day Shipping",
"sla": 96.5
},
{
"menu_path_id": 100,
"lang": "es",
"menu_path": "Support/1 Day Shipping Spanish",
"sla": 99.0
},
{
"menu_path_id": 101,
"lang": "en",
"menu_path": "Support/3 Day Shipping",
"sla": 0.0
}
]
狀態碼:200
佇列群組服務水準協議
| 參數 | 必填 | 資料類型 | 定義 |
|---|---|---|---|
| 頻道 | TRUE | 字串 | 字串。可接受的值:call、chat |
| 分鐘 | TRUE | 字串 | 字串。計算服務水準協議時,要從現在回溯的分鐘數。舉例來說,如果值為 15,系統會為每個選單路徑要求過去 15 分鐘的 SLA |
端點:
Method: GET
Type:
URL: https://{{subdomain}}.{{domain}}/manager/api/v1/menus/sla_by_queue_groups
查詢參數:
| 鍵 | 值 | 說明 |
|---|---|---|
| 頻道 | {channel} | 字串。可接受的值:call、chat |
| 分鐘 | {minutes} | 字串。計算服務水準協議時,要從現在回溯的分鐘數。舉例來說,如果值為 15,系統會為每個選單路徑要求過去 15 分鐘的 SLA |
更多要求/回應範例:
要求範例:佇列群組服務水準協議
查詢:
| 鍵 | 值 | 說明 |
|---|---|---|
| 頻道 | {channel} | 字串。可接受的值:call、chat |
| 分鐘 | {lminutes} | 字串。計算服務水準協議時,要從現在回溯的分鐘數。舉例來說,如果值為 15,系統會為每個選單路徑要求過去 15 分鐘的 SLA |
內文:無
回應範例:佇列群組服務水準協議
[
{
"queue_group_id": 20,
"queue_group_name": "Shipping",
"sla": null
},
{
"queue_group_id": 24,
"queue_group_name": "Customer Support",
"sla": 99.2
},
{
"queue_group_id": 29,
"queue_group_name": "Escalations",
"sla": 98.3
}
]
狀態碼:200
菜單供應時間
端點:
Method: GET
Type:
URL: https://{{subdomain}}.{{domain}}/manager/api/v1/menus/operation_hours
查詢參數:無
更多要求/回應範例:
要求範例:菜單營業時間
查詢:無
內文:無
回覆範例:菜單營業時間
[
{
"created_at": "2020-07-31T03:08:29.000Z",
"fri_end_time": 86400,
"fri_start_time": 0,
"holidays": [],
"id": 1,
"mon_end_time": 86400,
"mon_start_time": 0,
"sat_end_time": 86400,
"sat_start_time": 0,
"sun_end_time": 86400,
"sun_start_time": 0,
"thu_end_time": 86400,
"thu_start_time": 0,
"time_zone": "Africa/Cairo",
"tue_end_time": 86400,
"tue_start_time": 0,
"updated_at": "2021-03-24T13:23:43.000Z",
"wed_end_time": 86400,
"wed_start_time": 0
},
{
"created_at": "2022-08-01T11:33:21.000Z",
"fri_end_time": 28800,
"fri_start_time": 21600,
"holidays": [],
"id": 2,
"mon_end_time": 28800,
"mon_start_time": 21600,
"sat_end_time": 0,
"sat_start_time": 0,
"sun_end_time": 0,
"sun_start_time": 0,
"thu_end_time": 28800,
"thu_start_time": 21600,
"time_zone": "Europe/Helsinki",
"tue_end_time": 28800,
"tue_start_time": 21600,
"updated_at": "2022-11-09T10:47:20.000Z",
"wed_end_time": 28800,
"wed_start_time": 21600
}
]
狀態碼:200