private async Task <DialogTurnResult> APIStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) { if ((bool)stepContext.Result) { var bookingDetails = (BookingDetails)stepContext.Options; //Call our API APIHandler api = new APIHandler(); //Start of API CALL employee = await api.GetEmpById(bookingDetails.IDA); return(await stepContext.BeginDialogAsync(nameof(QueryDialog), employee, cancellationToken)); } return(await stepContext.EndDialogAsync(null, cancellationToken)); }