You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/communication-services/how-tos/router-sdk/scheduled-jobs.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Create a scheduled job for Azure Communication Services
3
3
titleSuffix: An Azure Communication Services how-to guide
4
-
description: Use Azure Communication Services Job Router SDK to create a scheduled job
4
+
description: Use Azure Communication Services Job Router SDK to create a scheduled job.
5
5
author: williamzhao
6
6
manager: bga
7
7
services: azure-communication-services
@@ -25,12 +25,12 @@ In the context of a call center, customers may want to receive a scheduled callb
25
25
- A deployed Communication Services resource. [Create a Communication Services resource](../../quickstarts/create-communication-resource.md).
26
26
- A Job Router queue with queueId `Callback` has been [created](manage-queue.md).
27
27
- A Job Router worker with channel capacity on the `Voice` channel has been [created](../../concepts/router/matching-concepts.md).
28
-
- Subscribe to the [JobWaitingForActivation event](subscribe-events.md#microsoftcommunicationrouterjobwaitingforactivation)
29
-
- Optional: Complete the quickstart to [get started with Job Router](../../quickstarts/router/get-started-router.md)
28
+
- Subscribe to the [JobWaitingForActivation event](subscribe-events.md#microsoftcommunicationrouterjobwaitingforactivation).
29
+
- Optional: Complete the quickstart to [get started with Job Router](../../quickstarts/router/get-started-router.md).
30
30
31
31
## Create a job using the ScheduleAndSuspendMode
32
32
33
-
In the following example, a job is created that is scheduled 3 minutes from now by setting the `MatchingMode` to `ScheduleAndSuspendMode` with a `scheduleAt` parameter. This example assumes that you've already[created a queue](manage-queue.md) with the queueId `Callback` and that there's an active [worker registered](../../concepts/router/matching-concepts.md) to the queue with available capacity on the `Voice` channel.
33
+
In the following example, a job is created that is scheduled 3 minutes from now by setting the `MatchingMode` to `ScheduleAndSuspendMode` with a `scheduleAt` parameter. This example assumes that you [created a queue](manage-queue.md) with the queueId `Callback` and that there's an active [worker registered](../../concepts/router/matching-concepts.md) to the queue with available capacity on the `Voice` channel.
## Wait for the scheduled time to be reached, then queue the job
89
89
90
-
When the scheduled time has been reached, the job's status is updated to `WaitingForActivation` and Job Router emits a [RouterJobWaitingForActivation event](subscribe-events.md#microsoftcommunicationrouterjobwaitingforactivation) to Event Grid. If this event has been subscribed, some required actions may be performed, before enabling the job to be matched to a worker. For example, in the context of the contact center, such an action could be making an outbound call and waiting for the customer to accept the callback. Once the required actions are complete, the job can be queued by calling the `UpdateJobAsync` method with the `MatchingMode` set to `QueueAndMatchMode` and priority set to `100` to quickly find an eligible worker, which updates the job's status to `queued`.
90
+
When the scheduled time is reached, the job's status is updated to `WaitingForActivation` and Job Router emits a [RouterJobWaitingForActivation event](subscribe-events.md#microsoftcommunicationrouterjobwaitingforactivation) to Event Grid. If this event is subscribed, some required actions may be performed, before enabling the job to be matched to a worker. For example, in the context of the contact center, such an action could be making an outbound call and waiting for the customer to accept the callback. Once the required actions are complete, the job can be queued by calling the `UpdateJobAsync` method with the `MatchingMode` set to `QueueAndMatchMode` and priority set to `100` to quickly find an eligible worker, which updates the job's status to `queued`.
91
91
92
92
::: zone pivot="programming-language-csharp"
93
93
@@ -152,14 +152,15 @@ if (eventGridEvent.EventType == "Microsoft.Communication.RouterJobWaitingForActi
0 commit comments