選單代表可能指派給服務專員的佇列,以及使用者與服務專員聯絡時可選取的選項。每個物件代表一個選單。
菜單端點共有七個:
/menu:提取選單清單。/menu/tree:以樹狀結構提取選單,模擬使用者與服務專員聯絡的路徑。/menu/{:id}:提取單一選單資源。/menu/current_status:傳回有消費者排隊等候的菜單目前排隊狀態。/menu/sla:傳回從現在到先前指定分鐘數內,所有選單路徑的服務等級協議。/menu/sla_by_queue_group:傳回所有佇列群組從現在到指定分鐘數前的服務水準協議。/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,因為 page 1 會包含 1-200。 |
| / | FALSE | 字串 | 與 page 搭配使用,表示一頁記錄中應包含多少筆記錄。舉例來說,如果 per 設為 200,page 設為 2,則回應會包含記錄 201-400,因為 page 1 會包含 1-200。 |
| id[] | FALSE | Array[String] | Array[Strings]。要搜尋及傳回的記錄 ID |
| name[] | FALSE | Array[String] | 根據資源名稱傳回記錄。 |
| parent_id[] | FALSE | Array[String] | 根據指定記錄的父項 ID 傳回記錄 |
| position[] | FALSE | Array[String] | 根據選單位置傳回記錄 |
| menu_type[] | FALSE | 字串 | 要傳回樹狀結構的選單類型。請傳遞不含括號的單一值,例如 menu_type=ivr_menu。如果省略 menu_type,API 會傳回行動版選單樹狀結構。如要擷取多個菜單類型,請為每個類型要求一次樹狀結構。 |
| hidden[] | FALSE | 布林值 | 傳回已隱藏的記錄 (True),或不包含已隱藏的記錄 (False) |
| with_deleted | FALSE | 布林值 | 傳回已刪除的記錄 (True),或不包含已刪除的記錄 (False) |
端點:
Method: GET
Type:
URL: https://{{subdomain}}.{{domain}}/manager/api/v1/menus
更多要求/回應範例:
要求範例:菜單
Body: None
回覆範例:選單清單
[
{
"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] | 根據選單類型傳回記錄。請為每種類型傳遞一次 menu_type[] (例如 menu_type[]=ivr_menu&menu_type[]=web_menu),即使只有一種類型,也請使用這個陣列格式。如果 HTTP 用戶端需要,請將括號編碼為 menu_type%5B%5D。如果省略 menu_type[],API 會傳回所有類型的菜單。API 不會篩選類型參數。 |
| lang | FALSE | 字串 | 要傳回樹狀結構的語言。如果省略 lang,API 會傳回 en 樹狀結構。如要擷取多種語言,請為每種語言要求一次樹狀結構。 |
端點:
Method: GET
Type:
URL: https://{{subdomain}}.{{domain}}/manager/api/v1/menus/tree
更多要求/回應範例:
要求範例:選單樹狀結構
Body: None
回覆範例:選單樹狀結構
[
{
"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}}
更多要求/回應範例:
要求範例:單一菜單
Body: None
回覆範例:單一菜單
[
{
"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
菜單目前狀態
「選單目前狀態」會傳回所有含有待處理通話或即時通訊的選單,以及這些待處理項目的持續時間等額外資料。
端點:
Method: GET
Type:
URL: https://{{subdomain}}.{{domain}}/manager/api/v1/menus/current_status
更多要求/回應範例:
要求範例:菜單目前狀態
Body: None
回應範例:菜單目前狀態
[
{
"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 分鐘的服務水準協議 |
端點:
Method: GET
Type:
URL: https://{{subdomain}}.{{domain}}/manager/api/v1/menus/sla
查詢參數:
| 鍵 | 值 | 說明 |
|---|---|---|
| 頻道 | {channel} | 字串。接受的值:call、chat |
| 分鐘 | {minutes} | 字串。計算服務水準協議時,從現在起回溯的分鐘數。舉例來說,如果值為 15,則會要求每個選單路徑過去 15 分鐘的服務水準協議 |
更多要求/回應範例:
要求範例:菜單服務水準協議
查詢:
| 鍵 | 值 | 說明 |
|---|---|---|
| 頻道 | {channel} | 字串。接受的值:call、chat |
| 分鐘 | {minutes} | 字串。計算服務水準協議時,從現在起回溯的分鐘數。舉例來說,如果值為 15,則會要求每個選單路徑過去 15 分鐘的服務水準協議 |
Body: None
回覆範例:菜單服務水準協議
[
{
"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 分鐘的服務水準協議 |
端點:
Method: GET
Type:
URL: https://{{subdomain}}.{{domain}}/manager/api/v1/menus/sla_by_queue_groups
查詢參數:
| 鍵 | 值 | 說明 |
|---|---|---|
| 頻道 | {channel} | 字串。接受的值:call、chat |
| 分鐘 | {minutes} | 字串。計算服務水準協議時,從現在起回溯的分鐘數。舉例來說,如果值為 15,則會要求每個選單路徑過去 15 分鐘的服務水準協議 |
更多要求/回應範例:
要求範例:佇列群組服務水準協議
查詢:
| 鍵 | 值 | 說明 |
|---|---|---|
| 頻道 | {channel} | 字串。接受的值:call、chat |
| 分鐘 | {lminutes} | 字串。計算服務水準協議時,從現在起回溯的分鐘數。舉例來說,如果值為 15,則會要求每個選單路徑過去 15 分鐘的服務水準協議 |
Body: None
回應範例:佇列群組服務水準協議
[
{
"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
查詢參數:無
更多要求/回應範例:
要求範例:菜單營業時間
查詢:無
Body: None
回覆範例:菜單供應時間
[
{
"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