分享方式:


Azure 通訊服務 - 工作路由器事件

本文提供通訊服務工作路由器事件的屬性和結構描述。 如需事件結構描述的簡介,請參閱 Azure Event Grid 事件結構描述。 會針對整個工作和背景工作角色生命週期的 Azure 通訊服務發出這些事件。

事件類型

Azure 通訊服務會發出下列工作路由器事件類型:

事件 子網域 描述
RouterJobReceived Job 已建立用於路由的新作業
RouterJobClassified Job 分類原則已套用至作業
RouterJobQueued Job 作業已成功排入佇列
RouterJobClassificationFailed Job 路由器無法使用分類原則將作業分類
RouterJobCompleted Job 作業已完成並輸入總結
RouterJobClosed Job 作業已關閉並完成總結
RouterJobCancelled Job 作業已取消
RouterJobExceptionTriggered Job 已觸發作業例外狀況
RouterJobWorkerSelectorsExpired Job 作業上的一或多個背景工作角色選取器已過期
RouterJobUnassigned Job 從背景工作角色將已指派的工作取消指派
RouterJobWaitingForActivation Job 排程工作的要求排程時間已到,路由器正在等候 contoso 處理工作
RouterJobSchedulingFailed Job 儘管已要求排程工作,但路由器無法建立排程工作
RouterJobDeleted Job 工作已遭刪除
RouterWorkerOfferIssued Worker 作業已提供給背景工作角色
RouterWorkerOfferAccepted Worker 已接受提供給背景工作角色的供應項目
RouterWorkerOfferDeclined Worker 已拒絕提供給背景工作角色的供應項目
RouterWorkerOfferRevoked Worker 已撤銷提供給背景工作角色的供應項目
RouterWorkerOfferExpired Worker 提供給背景工作角色的供應項目已過期
RouterWorkerRegistered Worker 已註冊的背景工作角色 (狀態已從非作用中/清空變更為作用中)
RouterWorkerDeregistered Worker 已取消註冊背景工作角色 (狀態已從作用中變更為非作用中/清空)
RouterWorkerDeleted Worker 背景工作角色已刪除

事件回應

觸發事件時,事件方格服務會將該事件的相關資料傳送至訂閱端點。

本節包含每個事件的資料外觀範例。

Microsoft.Communication.RouterJobReceived

返回事件目錄

{
  "id": "acdf8fa5-8ab4-4a65-874a-c1d2a4a97f2e",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}",
  "data": {
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "jobStatus": "PendingClassification",
    "channelId": "FooVoiceChannelId",
    "classificationPolicyId": "test-policy",
    "queueId": "queue-id",
    "priority": 0,
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "requestedWorkerSelectors": [
      {
        "key": "string",
        "labelOperator": "equal",
        "value": 5,
        "ttlSeconds": 50,
        "expirationTime": "2022-02-17T00:58:25.1736293Z"
      }
    ],
    "scheduledOn": "3/28/2007 7:13:50 PM +00:00",
    "unavailableForMatching": false
  },
  "eventType": "Microsoft.Communication.RouterJobReceived",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

屬性清單

屬性 類型 Nullable 描述 附註
jobId string
channelReference string
jobStatus enum 可能的值 PendingClassification,已排入佇列 送出此事件時,分類程序尚未執行,或已使用相關聯的 queueId 建立工作。
channelId string
classificationPolicyId string ✔️ 針對作業指定 queueId 時為 null
queueId string ✔️ 針對作業指定 classificationPolicyId 時為 null
priority int ✔️ 指定 classificationPolicyId 時為 Null。 直接佇列指派情況下為非 Null 值。
標籤 Dictionary<string, object> ✔️ 以使用者輸入為基礎
標記 Dictionary<string, object> ✔️ 以使用者輸入為基礎
requestedWorkerSelectors List<WorkerSelector> ✔️ 以使用者輸入為基礎
scheduledOn DateTimeOffset ✔️ 以使用者輸入為基礎
unavailableForMatching bool ✔️ 以使用者輸入為基礎

Microsoft.Communication.RouterJobClassified

返回事件目錄

{
  "id": "b6d8687a-5a1a-42ae-b8b5-ff7ec338c872",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}/queue/{queue-id}",
  "data": {
    "queueDetails": {
      "id": "625fec06-ab81-4e60-b780-f364ed96ade1",
      "name": "Queue 1",
      "labels": {
        "Language": "en",
        "Product": "Office",
        "Geo": "NA"
      }
    },
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "classificationPolicyId": "test-policy",
    "queueId": "625fec06-ab81-4e60-b780-f364ed96ade1",
    "priority": 5,
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "attachedWorkerSelectors": [
      {
        "key": "string",
        "labelOperator": "equal",
        "value": 5,
        "ttl": "P3Y6M4DT12H30M5S"
      }
    ]
  },
  "eventType": "Microsoft.Communication.RouterJobClassified",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

屬性清單

屬性 類型 Nullable 描述 附註
queueDetails QueueDetails
jobId string
channelReference string
channelId string
classificationPolicyId string
queueId string ✔️ classificationPolicy 未用於佇列選取時為 null
priority int ✔️ classificationPolicy 未用於在作業上套用優先順序時為 null
標籤 Dictionary<string, object> ✔️ 以使用者輸入為基礎
標記 Dictionary<string, object> ✔️ 以使用者輸入為基礎
attachedWorkerSelectors List<WorkerSelector> ✔️ 分類原則附加的背景工作角色選取器清單

Microsoft.Communication.RouterJobQueued

返回事件目錄

{
  "id": "b6d8687a-5a1a-42ae-b8b5-ff7ec338c872",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}/queue/{queue-id}",
  "data": {
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "queueId": "625fec06-ab81-4e60-b780-f364ed96ade1",
    "priority": 1,
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "requestedWorkerSelectors": [
      {
        "key": "string",
        "labelOperator": "equal",
        "value": 5,
        "ttl": "P3Y6M4DT12H30M5S"
      }
    ],
    "attachedWorkerSelectors": [
      {
        "key": "string",
        "labelOperator": "equal",
        "value": 5,
        "ttl": "P3Y6M4DT12H30M5S"
      }
    ]
  },
  "eventType": "Microsoft.Communication.RouterJobQueued",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

屬性清單

屬性 類型 Nullable 描述 附註
jobId string
channelReference string ✔️
channelId string
queueId string
priority int
標籤 Dictionary<string, object> ✔️ 以使用者輸入為基礎
標記 Dictionary<string, object> ✔️ 以使用者輸入為基礎
requestedWorkerSelectors List<WorkerSelector> ✔️ 以建立作業時的使用者輸入為基礎
attachedWorkerSelectors List<WorkerSelector> ✔️ 分類原則附加的背景工作角色選取器清單

Microsoft.Communication.RouterJobClassificationFailed

返回事件目錄

{
  "id": "b6d8687a-5a1a-42ae-b8b5-ff7ec338c872",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}/classificationpolicy/{classificationpolicy-id}",
  "data": {
    "errors": [
      {
        "code": null,
        "message": "Classification failed due to <reason>",
        "target": null,
        "innerError": null,
        "details": null
      }
    ],
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "classificationPolicyId": "test-policy",
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    }
  },
  "eventType": "Microsoft.Communication.RouterJobClassificationFailed",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

屬性清單

屬性 類型 Nullable 描述 附註
錯誤 List<CommunicationError>
jobId string
channelReference string
channelId string
classificationPolicyId string
標籤 Dictionary<string, object> ✔️ 以使用者輸入為基礎
標記 Dictionary<string, object> ✔️ 以使用者輸入為基礎

Microsoft.Communication.RouterJobCompleted

返回事件目錄

{
  "id": "b6d8687a-5a1a-42ae-b8b5-ff7ec338c872",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}/assignment/{assignment-id}",
  "data": {
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "queueId": "queue-id",
    "assignmentId": "6f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "workerId": "e3a3f2f9-3582-4bfe-9c5a-aa57831a0f88"
  },
  "eventType": "Microsoft.Communication.RouterJobCompleted",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

屬性清單

屬性 類型 Nullable 描述 附註
jobId string
channelReference string
channelId string
queueId string
標籤 Dictionary<string, object> ✔️ 以使用者輸入為基礎
標記 Dictionary<string, object> ✔️ 以使用者輸入為基礎
assignmentId string
workerId string

Microsoft.Communication.RouterJobClosed

返回事件目錄

{
  "id": "b6d8687a-5a1a-42ae-b8b5-ff7ec338c872",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}/assignment/{assignment-id}",
  "data": {
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "queueId": "",
    "dispositionCode": "",
    "workerId": "",
    "assignmentId": "",
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    }
  },
  "eventType": "Microsoft.Communication.RouterJobClosed",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

屬性清單

屬性 類型 Nullable 描述 附註
jobId string
channelReference string
channelId string
queueId string
標籤 Dictionary<string, object> ✔️ 以使用者輸入為基礎
標記 Dictionary<string, object> ✔️ 以使用者輸入為基礎
dispositionCode string ✔️ 以使用者輸入為基礎
workerId string
assignmentId string

Microsoft.Communication.RouterJobCancelled

返回事件目錄

{
  "id": "b6d8687a-5a1a-42ae-b8b5-ff7ec338c872",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}/disposition/{disposition-code}",
  "data": {
    "note": "Cancelled due to <reason>",
    "dispositionCode": "100",
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "queueId": ""
  },
  "eventType": "Microsoft.Communication.RouterJobCancelled",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

屬性清單

屬性 類型 Nullable 描述 附註
注意 string ✔️ 以使用者輸入為基礎
dispositionCode string
jobId string
channelReference string
channelId string
標籤 Dictionary<string, object> ✔️ 以使用者輸入為基礎
標記 Dictionary<string, object> ✔️ 以使用者輸入為基礎
queueId string ✔️

Microsoft.Communication.RouterJobExceptionTriggered

返回事件目錄

{
  "id": "1027db4a-17fe-4a7f-ae67-276c3120a29f",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}/exceptionrule/{rulekey}",
  "data": {
    "ruleKey": "r100",
    "exceptionRuleId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    }
  },
  "eventType": "Microsoft.Communication.RouterJobExceptionTriggered",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

屬性清單

屬性 類型 Nullable 描述 附註
ruleKey string
exceptionRuleId string
jobId string
channelReference string
channelId string
標籤 Dictionary<string, object> ✔️ 以使用者輸入為基礎
標記 Dictionary<string, object> ✔️ 以使用者輸入為基礎

Microsoft.Communication.RouterJobWorkerSelectorsExpired

返回事件目錄

{
  "id": "b6d8687a-5a1a-42ae-b8b5-ff7ec338c872",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}/queue/{queue-id}",
  "data": {
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "queueId": "625fec06-ab81-4e60-b780-f364ed96ade1",
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "requestedWorkerSelectorsExpired": [
      {
        "key": "string",
        "labelOperator": "equal",
        "value": 5,
        "ttl": "P3Y6M4DT12H30M5S"
      }
    ],
    "attachedWorkerSelectorsExpired": [
      {
        "key": "string",
        "labelOperator": "equal",
        "value": 5,
        "ttl": "P3Y6M4DT12H30M5S"
      }
    ]
  },
  "eventType": "Microsoft.Communication.RouterJobWorkerSelectorsExpired",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

屬性清單

屬性 類型 Nullable 描述 附註
jobId string
channelReference string ✔️
queueId string
channelId string
標籤 Dictionary<string, object> ✔️ 以使用者輸入為基礎
標記 Dictionary<string, object> ✔️ 以使用者輸入為基礎
requestedWorkerSelectorsExpired List<WorkerSelector> ✔️ 以建立作業時的使用者輸入為基礎
attachedWorkerSelectorsExpired List<WorkerSelector> ✔️ 分類原則附加的背景工作角色選取器清單

Microsoft.Communication.RouterJobUnassigned

返回事件目錄

{
  "id": "acdf8fa5-8ab4-4a65-874a-c1d2a4a97f2e",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}/assignment/{assignment-id}",
  "data": {
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "assignmentId": "",
    "workerId": "",
    "channelId": "FooVoiceChannelId",
    "channelReference": "test-abc",
    "queueId": "queue-id",    
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    }
  },
  "eventType": "Microsoft.Communication.RouterJobUnassigned",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

屬性清單

屬性 類型 Nullable 描述 附註
jobId string
assignmentId string
workerId string
channelId string
channelReference string
queueId string ✔️ 針對作業指定 classificationPolicyId 時為 null
標籤 Dictionary<string, object> ✔️ 以使用者輸入為基礎
標記 Dictionary<string, object> ✔️ 以使用者輸入為基礎

Microsoft.Communication.RouterJobWaitingForActivation

返回事件目錄

{
  "id": "acdf8fa5-8ab4-4a65-874a-c1d2a4a97f2e",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}",
  "data": {
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelId": "FooVoiceChannelId",
    "channelReference": "test-abc",
    "queueId": "queue-id",    
    "priority": 1,
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "requestedWorkerSelectors": [
      {
        "key": "string",
        "labelOperator": "equal",
        "value": 5,
        "ttl": "P3Y6M4DT12H30M5S"
      }
    ],
    "attachedWorkerSelectors": [
      {
        "key": "string",
        "labelOperator": "equal",
        "value": 5,
        "ttl": "P3Y6M4DT12H30M5S"
      }
    ],
    "scheduledOn": "2022-02-17T00:55:25.1736293Z",
    "unavailableForMatching": false
  },
  "eventType": "Microsoft.Communication.RouterJobWaitingForActivation",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

屬性清單

屬性 類型 Nullable 描述 附註
jobId string
channelId string
channelReference string
queueId string ✔️ 針對作業指定 classificationPolicyId 時為 null
標籤 Dictionary<string, object> ✔️ 以使用者輸入為基礎
標記 Dictionary<string, object> ✔️ 以使用者輸入為基礎
requestedWorkerSelectorsExpired List<WorkerSelector> ✔️ 以建立作業時的使用者輸入為基礎
attachedWorkerSelectorsExpired List<WorkerSelector> ✔️ 分類原則附加的背景工作角色選取器清單
scheduledOn DateTimeOffset ✔️ 以建立作業時的使用者輸入為基礎
unavailableForMatching bool ✔️ 以建立作業時的使用者輸入為基礎
priority int 以建立作業時的使用者輸入為基礎

Microsoft.Communication.RouterJobSchedulingFailed

返回事件目錄

{
  "id": "acdf8fa5-8ab4-4a65-874a-c1d2a4a97f2e",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}",
  "data": {
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelId": "FooVoiceChannelId",
    "channelReference": "test-abc",
    "queueId": "queue-id",    
    "priority": 1,
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "requestedWorkerSelectors": [
      {
        "key": "string",
        "labelOperator": "equal",
        "value": 5,
        "ttl": "P3Y6M4DT12H30M5S"
      }
    ],
    "attachedWorkerSelectors": [
      {
        "key": "string",
        "labelOperator": "equal",
        "value": 5,
        "ttl": "P3Y6M4DT12H30M5S"
      }
    ],
    "scheduledOn": "2022-02-17T00:55:25.1736293Z",
    "failureReason": "Error"
  },
  "eventType": "Microsoft.Communication.RouterJobSchedulingFailed",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

屬性清單

屬性 類型 Nullable 描述 附註
jobId string
channelId string
channelReference string
queueId string ✔️ 針對作業指定 classificationPolicyId 時為 null
標籤 Dictionary<string, object> ✔️ 以使用者輸入為基礎
標記 Dictionary<string, object> ✔️ 以使用者輸入為基礎
requestedWorkerSelectorsExpired List<WorkerSelector> ✔️ 以建立作業時的使用者輸入為基礎
attachedWorkerSelectorsExpired List<WorkerSelector> ✔️ 分類原則附加的背景工作角色選取器清單
scheduledOn DateTimeOffset ✔️ 以建立作業時的使用者輸入為基礎
failureReason string ✔️ 系統判定
priority int 以建立作業時的使用者輸入為基礎

Microsoft.Communication.RouterJobDeleted

返回事件目錄

{
  "id": "acdf8fa5-8ab4-4a65-874a-c1d2a4a97f2e",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}",
  "data": {
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "queueId": ""
  },
  "eventType": "Microsoft.Communication.RouterJobDeleted",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

屬性清單

屬性 類型 Nullable 描述 附註
jobId string

背景工作角色事件

Microsoft.Communication.RouterWorkerOfferIssued

返回事件目錄

{
  "id": "1027db4a-17fe-4a7f-ae67-276c3120a29f",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "worker/{worker-id}/job/{job-id}",
  "data": {
    "workerId": "w100",
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "queueId": "625fec06-ab81-4e60-b780-f364ed96ade1",
    "offerId": "525fec06-ab81-4e60-b780-f364ed96ade1",
    "offeredOn": "2021-06-23T02:43:30.3847144Z",
    "expiresOn": "2021-06-23T02:44:30.3847674Z",
    "jobPriority": 5,
    "jobLabels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "jobTags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    }
  },
  "eventType": "Microsoft.Communication.RouterWorkerOfferIssued",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

屬性清單

屬性 類型 Nullable 描述 附註
workerId string
jobId string
channelReference string
channelId string
queueId string
offerId string
offeredOn DateTimeOffset
expiresOn DateTimeOffset
jobPriority int
jobLabels Dictionary<string, object> ✔️ 以使用者輸入為基礎
jobTags Dictionary<string, object> ✔️ 以使用者輸入為基礎

Microsoft.Communication.RouterWorkerOfferAccepted

返回事件目錄

{
  "id": "1027db4a-17fe-4a7f-ae67-276c3120a29f",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "worker/{worker-id}/job/{job-id}",
  "data": {
    "workerId": "w100",
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "jobPriority": 5,
    "jobLabels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "jobTags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "queueId": "625fec06-ab81-4e60-b780-f364ed96ade1",
    "offerId": "565fec06-ab81-4e60-b780-f364ed96ade1",
    "assignmentId": "765fec06-ab81-4e60-b780-f364ed96ade1"
  },
  "eventType": "Microsoft.Communication.RouterWorkerOfferAccepted",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

屬性清單

屬性 類型 Nullable 描述 附註
workerId string
jobId string
jobPriority int
jobLabels Dictionary<string, object> ✔️ 以使用者輸入為基礎
jobTags Dictionary<string, object> ✔️ 以使用者輸入為基礎
channelReference string
channelId string
queueId string
offerId string
assignmentId string

Microsoft.Communication.RouterWorkerOfferDeclined

返回事件目錄

{
  "id": "1027db4a-17fe-4a7f-ae67-276c3120a29f",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "worker/{worker-id}/job/{job-id}",
  "data": {
    "workerId": "w100",
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "queueId": "625fec06-ab81-4e60-b780-f364ed96ade1",
    "offerId": "565fec06-ab81-4e60-b780-f364ed96ade1",
  },
  "eventType": "Microsoft.Communication.RouterWorkerOfferDeclined",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

屬性清單

屬性 類型 Nullable 描述 附註
workerId string
jobId string
channelReference string
channelId string
queueId string
offerId string

Microsoft.Communication.RouterWorkerOfferRevoked

返回事件目錄

{
  "id": "1027db4a-17fe-4a7f-ae67-276c3120a29f",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "worker/{worker-id}/job/{job-id}",
  "data": {
    "offerId": "565fec06-ab81-4e60-b780-f364ed96ade1",
    "workerId": "w100",
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "queueId": "625fec06-ab81-4e60-b780-f364ed96ade1"
  },
  "eventType": "Microsoft.Communication.RouterWorkerOfferRevoked",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

屬性清單

屬性 類型 Nullable 描述 附註
offerId string
workerId string
jobId string
channelReference string
channelId string
queueId string

Microsoft.Communication.RouterWorkerOfferExpired

返回事件目錄

{
  "id": "1027db4a-17fe-4a7f-ae67-276c3120a29f",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "worker/{worker-id}/job/{job-id}",
  "data": {
    "offerId": "565fec06-ab81-4e60-b780-f364ed96ade1",
    "workerId": "w100",
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "queueId": "625fec06-ab81-4e60-b780-f364ed96ade1"
  },
  "eventType": "Microsoft.Communication.RouterWorkerOfferExpired",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

屬性清單

屬性 類型 Nullable 描述 附註
workerId string
offerId string
jobId string
channelReference string
channelId string
queueId string

Microsoft.Communication.RouterWorkerRegistered

返回事件目錄

{
  "id": "1027db4a-17fe-4a7f-ae67-276c3120a29f",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "worker/{worker-id}",
  "data": {
    "workerId": "worker3",
    "totalCapacity": 100,
    "queueAssignments": [
      {
        "id": "MyQueueId2",
        "name": "Queue 3",
        "labels": {
          "Language": "en",
          "Product": "Office",
          "Geo": "NA"
        }
      }
    ],
    "labels": {
      "x": "111",
      "y": "111"
    },
    "channelConfigurations": [
      {
        "channelId": "FooVoiceChannelId",
        "capacityCostPerJob": 10,
        "maxNumberOfJobs": 5
      }
    ],
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    }
  },
  "eventType": "Microsoft.Communication.RouterWorkerRegistered",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

屬性清單

屬性 類型 Nullable 描述 附註
workerId string
totalCapacity int
queueAssignments List<QueueDetails>
標籤 Dictionary<string, object> ✔️ 以使用者輸入為基礎
channelConfigurations List<ChannelConfiguration>
標記 Dictionary<string, object> ✔️ 以使用者輸入為基礎

Microsoft.Communication.RouterWorkerDeregistered

返回事件目錄

{
  "id": "1027db4a-17fe-4a7f-ae67-276c3120a29f",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "worker/{worker-id}",
  "data": {
    "workerId": "worker3"
  },
  "eventType": "Microsoft.Communication.RouterWorkerDeregistered",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

屬性清單

屬性 類型 Nullable 描述 附註
workerId string

Microsoft.Communication.RouterWorkerDeleted

返回事件目錄

{
  "id": "1027db4a-17fe-4a7f-ae67-276c3120a29f",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "worker/{worker-id}",
  "data": {
    "workerId": "worker3",
    "totalCapacity": 100,
    "queueAssignments": [
      {
        "id": "MyQueueId2",
        "name": "Queue 3",
        "labels": {
          "Language": "en",
          "Product": "Office",
          "Geo": "NA"
        }
      }
    ],
    "labels": {
      "x": "111",
      "y": "111"
    },
    "channelConfigurations": [
      {
        "channelId": "FooVoiceChannelId",
        "capacityCostPerJob": 10,
        "maxNumberOfJobs": 5
      }
    ],
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    }
  },
  "eventType": "Microsoft.Communication.RouterWorkerDeleted",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

屬性清單

屬性 類型 Nullable 描述 附註
workerId string
totalCapacity int
queueAssignments List<QueueDetails>
標籤 Dictionary<string, object> ✔️ 以使用者輸入為基礎
channelConfigurations List<ChannelConfiguration>
標記 Dictionary<string, object> ✔️ 以使用者輸入為基礎

模型定義

QueueDetails

public class QueueDetails
{
    public string Id { get; set; }
    public string Name { get; set; }
    public Dictionary<string, object>? Labels { get; set; }
}

CommunicationError

public class CommunicationError
{
    public string? Code { get; init; }
    public string Message { get; init; }
    public string? Target { get; init; }
    public CommunicationError? InnerError { get; init; }
    public IEnumerable<CommunicationError>? Details { get; init; }
}

ChannelConfiguration

public class ChannelConfiguration
{
    public string ChannelId { get; set; }
    public int CapacityCostPerJob { get; set; }
    public int? MaxNumberOfJobs { get; set; }
}

WorkerSelector

public class WorkerSelector
{
    public string Key { get; set; }
    public LabelOperator LabelOperator { get; set; }
    public object Value { get; set; }
    public double? TTLSeconds { get; set; }
    public WorkerSelectorState State { get; set; }
    public DateTimeOffset? ExpireTime { get; set; }
}

public enum WorkerSelectorState
{
    Active = 0,
    Expired = 1
}

public enum LabelOperator
{
    Equal,
    NotEqual,
    LessThan,
    LessThanEqual,
    GreaterThan,
    GreaterThanEqual,
}