Skip to content

Latest commit

 

History

History

Bot.Builder.Community.Components.Dialogs.Input

Custom Input for Bot Framework Composer

Build status

Branch Status Recommended NuGet package version
master Build status NuGet version

Description

This is part of the Bot Builder Community project which contains Bot Framework Components and other projects / packages for use with Bot Framework Composer and the Bot Builder .NET SDK v4.

This package contains additional Inputs , beyond those offered out of the box by the Bot Framework composer. Internally the Inputs uses the Microsoft Text Recognizers and Multi-Select-choice use the Adaptive card.

Installation

Currently the following Inputs are available

Input Description
Phone Number Input a user for PhoneNumber.
SocialMedia Input a user for find mention,Hashtag.
Email Input a user for Email.
Multi-Select-choice Options to user to select one or more values
Number-with-Unit Input to find unit type
Number-with-Type Input to find number type
Guid Extract a GUID from a message from the user.
Internet-Protocol Input to find IpAddress,Url.
True-False Input to find true or false

Composer component installation

  1. Navigate to the Bot Framework Composer Package Manager.
  2. Change the filter to Community packages.
  3. Search for 'Input' and install Bot.Builder.Community.Components.Dialogs.Input

image

After install the package custom Input's is avaliable in sub-menu of "Ask a question -> Community " menu.

Note : Composer is not supported tab view for the 3rd party input types so custom inputs display in the flat view.

custominput

Email Input

The EmailInput will extract an email address from a message from the user.

Design in composer

image

Sample output

image

Phone Number Input

The PhoneNumberInput will extract a phone number from a message from the user;

Design in composer

image

Sample output

image

Social Medial Input

The SocialMediaInput will extract one of the following types based on which MediaType enum value is passed in:

Properties Description Example
Mention extract mention tag from string If a user enters my twitter handle is @VinothRajendran
the resulting answers is @vinothrajendran
Hashtag extract hash tag from string if a user enters "Trends? Does #WM35 count?"
the resulting answers is "#WM35"
Design in Composer

image

Sample Output

image

Multi-Select-choice

The MultiSelectChoice will give options to the user to select one or more values

Properties Description
List of choices Add the choices
Display Type choices display option Horizontal or Vertical
Action Name User 'submit' , name like "OK" , "Submit" , "Process"
Design in Composer

image

Sample output

image

Number-with-Unit

The Number with Unit Prompt allows you to prompt for the following types of number

Properties Description Example : Input output
Currency find any currency presented 42 dollars Value: 42, Unit: Dollar
Temperature find any temperature presented 25 degrees celsius Value: 25, Unit: C
Age find any age number presented 25 years old Value: 25, Unit: Year
Dimension find any currency presented 6 miles Value: 6, Unit: Mile

Number-with-Type

The Number with Type Prompt allows you to prompt for the following types of number

Properties Description Example : Input output
Ordinal find any ordinal number Ok, eleventh Value: 11
Percentage find any ordinal number Ok, I sent one hundred percents find that Value:100%
NumberRange find any cardinal or ordinal number range the range between 1982 and 1987 Value: [1982,1987)
Number find any number from the input Total four projects in bot builder community Value: 4

Internet-Protocol

The InternetTypePrompt will extract one of the following types based on which InternetTypePromptType enum value is passed in:

Properties Description Example : Input output
IpAddress find ip address my ip address is 127.0.0.0 127.0.0.0
Url find url community address is https://github.com/BotBuilderCommunity https://github.com/BotBuilderCommunity

Guid

The GuidPrompt will extract a GUID from a message from the user.
For example, if a user enters "my azure id is 7d7b0205-9411-4a29-89ac-b9cd905886fa" when you are using the Guid prompt type, the resulting Guid is "7d7b0205-9411-4a29-89ac-b9cd905886fa"

True-False

This recognizer will find any boolean value, even if its write with emoji. E.g. "👌 It's ok" , The result of this input will return True.