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

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