Discover how to accept or decline Job Router job offers
This guide lays out the steps you need to take to observe a Job Router offer. It also outlines how to accept or decline job offers.
Important
Functionality described on this section is currently in private preview. Private preview includes access to SDKs and documentation for testing purposes that are not yet available publicly. Apply to become an early adopter by filling out the form for preview access to Azure Communication Services.
Prerequisites
- An Azure account with an active subscription. Create an Azure account for free.
- A deployed Azure Communication Services resource. Create a Communication Services resource.
- Optional: Complete the quickstart to get started with Job Router.
Observe worker offer-issued events
After you create a job, observe the worker offer-issued event, which contains the worker ID and the job offer ID:
var workerId = event.data.workerId;
var offerId = event.data.offerId;
Console.WriteLine($"Job Offer ID: {offerId} offered to worker {workerId} ");
Accept job offers
The worker can accept job offers by using the SDK:
var result = await client.AcceptJobOfferAsync(workerId, offerId);
Decline job offers
The worker can decline job offers by using the SDK:
var result = await client.DeclineJobOfferAsync(workerId, offerId);
Next steps
- Review how to manage a Job Router queue.
- Learn how to subscribe to Job Router events.
Feedback
Submit and view feedback for