Agent Endpoint は、エージェント オブジェクトを取得する手段を提供します。各エージェント オブジェクトは、コンタクト センター 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"
}
}
]
}
]
エージェント
/manager/api/v1/agents エンドポイントは、アクティブなエージェントのエージェント オブジェクト、リアルタイム ステータス、プレゼンス データのみを返します。このエンドポイントは、無効化されたエージェント レコードを返しません。
次の表に、/manager/api/v1/agents エンドポイントでサポートされているクエリ パラメータを示します。
| パラメータ | 必須 | データ型 | 定義 |
|---|---|---|---|
| ページ | FALSE | 文字列 | per と組み合わせて、レコードのページを指定します。たとえば、per が 200 で page が 2 の場合、page 1 には 1 ~ 200 が含まれるため、レスポンスにはレコード 201 ~ 400 が含まれます。 |
| / | FALSE | 文字列 | page と組み合わせて、1 ページのレコードに含まれるレコード数を指定します。たとえば、per が 200 で page が 2 の場合、page 1 には 1 ~ 200 が含まれるため、レスポンスにはレコード 201 ~ 400 が含まれます。 |
| 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 | 時刻(UTC) | 最終ログイン時刻フィールドの下限を作成します。入力された値より後のすべてのレコードが返されます。 |
| last_login_time[to] | FALSE | 時刻(UTC) | 最終ログイン時刻フィールドの上限を作成します。返されるすべてのレコードは、入力された値より前のものになります。 |
| status_updated_at[from] | FALSE | 時刻(UTC) | ステータス更新日時フィールドの下限を作成します。入力された値より後のすべてのレコードが返されます。 |
| status_updated_at[to] | FALSE | 時刻(UTC) | status_updated_at フィールドの上限を作成します。返されるすべてのレコードは、入力された値より前のものになります。 |
エンドポイント:
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
エージェントの現在のステータス
Agents Current Status は、ログインしているすべてのエージェントとその現在のステータス、そのステータスになってからの経過時間、エージェントが保留中かどうかとその保留時間を示す追加情報を返します。
エンドポイント:
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 アップデートには下位互換性があります。Google は、既存の API レスポンスに新しい JSON キーをいつでも導入する権利を有します。機能を継続的に維持するため、認識できないキーを無視して、レスポンスを防御的に処理することをおすすめします。