I am creating a bot using Microsoft bot framework , the bot will be receiving orders for a restaurant , I want to know how can I handle multiple dialogs , like for example the customer makes the first order , then i want the bot to ask do you want something else? then the customer says yes/no , incase of yes to repeat the same dailog again with keeping the state of the first one , what I am seeing in the documentation now is only one conversation and one dialog.
Thanks a lot
Obtain the CultureInfo in DialogContext. Helper function to simplify formatting the options for calling a prompt dialog. This helper will take an options argument and then call BeginDialogAsync(String, Object, CancellationToken).
A bot can have from one to several hundred dialogs, and it can get challenging to manage the dialog system and the conversation with users. In the Add a dialog section, we covered how to create a child dialog and wire it up to the dialog system using Begin a new dialog action.
To display multiple rich cards in list format, set the Activity object's attachmentLayout property to "list". To display multiple rich cards in carousel format, set the Activity object's attachmentLayout property to "carousel".
stepContext. Options is your way of receiving that object over the called Dialog. For example, in the first document, the main Dialog is calling each child Dialogs and sending them the userInfo. Guest object: return await stepContext.
To manage multiple dialogs you need to use the Dialog Chains. You can either manage the stack of dialogs explicitly (using Call/Done) or implicitly using the Chain fluent methods. Here is sample of how to use it.
If the set of things that the user can select are already predefined I would then recommend using FormFlow. The Pizza & Sandwich samples are good examples of how to handle orders with a predefined set of options.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With