I’ve developed the bot which assists the user to book the meeting room and is available only in Teams channel for 1 to 1 conversations. I’ve developed the waterfall dialogs to gather the data (preferred room, floor, number of the participants, date, time etc.). It works perfectly fine. But now I want to add the new feature which is to proactively notify the user once specific meeting room is free (let’s say it wasn’t before when user was making the reservation). I have added the second endpoint “api/notify” (as per official proactive bot sample) which receives the webhook and I use the connector to send proactive message to the user e.g. “Meeting room 1 is free now would you like to edit your original appointment location?”. Here I have some questions about the design and further development:
Once the user receives proactive notification and responds “yes”, I would like to invoke the new waterfall to let the user change the reservation. I’m not sure what is the right approach here and how to “trigger” EditReservationWaterfall dialog as simple “yes” doesn’t seem to be the right trigger to be caught as an interruption. Should I store the information about proactive message being send in the Cosmos DB/Blob container and combine it as a condition together with “yes” interruption (and maybe check if there is any active dialog as a third condition). Or is there a way to trigger the waterfall directly from the “api/notify” endpoint? Maybe there is a way to pass the “api/notify” request somehow to the main bot .cs? Or any other idea?
How to handle the scenarios when users is making the new reservation and during that process “api/notify” receives a post request. How to prevent the “api/notify” code not to interrupt the current waterfall? Can I somehow check if there is any active dialog from the “api/notify” endpoint and maybe respond with unsuccessful status code to webhook so the webhook would send the request again in some time. Or there is any other clever approach?
Just note that the webhook logic is separate here and will be configured as per the requirements.