Asking for user input in adaptive dialogs
APPLIES TO: SDK v4
The Bot Framework SDK defines a variety of input dialogs for collecting and validating user input. Input dialogs are a type of adaptive dialog action.
Actions (trigger actions) are dialogs, and as such have all of the power and flexibility you need to create a fully functional and robust conversation flow. While the actions included in the Bot Framework SDK are extensive, you can also create your own custom actions to perform virtually any specialized task or process you need.
- Introduction to adaptive dialogs
- Events and triggers in adaptive dialogs
- Actions in adaptive dialogs
- Memory scopes and managing state in adaptive dialogs
- Familiarity with Language Generation templates
- Familiarity with Adaptive expressions
This syntax defined in the Language Generation templates, which includes Adaptive expressions, is used in the
ActivityTemplate object that is required for several parameters that are used in most of the input actions provided in the Bot Framework SDK.
Similar to prompts, you can use inputs in adaptive dialogs to ask for and collect input from a user, validate it, and accept it into memory. An input:
- Binds the prompt result to a property in a state management scope.
- Prompts the user only if the result property doesn't already have a value.
- Saves the input to the specified property if the input from user matches the type of entity expected.
- Accepts validation constraints such as min, max, and so on.
- Can use as input locally relevant intents within a dialog as well as use interruption as a technique to bubble up user response to an appropriate parent dialog that can handle it.
The adaptive dialogs library defines the following input types:
- The input base class. The base class that all of the input classes derive from.
- Text. To ask for any text based user input.
- Number. To ask for any numeric based user input.
- Confirmation. To request a confirmation from the user.
- Multiple choice. To request a selection from a set of options.
- File or attachment. To request/enable a user to upload a file.
- Date or time. To request a date and or time from a user.
- Oauth login. To enable your users to sign into a secure site.