formflow

Adaptive Cards as Formflow prompts

三世轮回 提交于 2020-02-05 05:29:07
问题 I made a bot in C# using BotFramework, Adaptive Cards, LUIS and FormFlow. It/he is responsible for managing meetings in a team. return new FormBuilder<MeetingRequestInput>() ... .Field( nameof(MeetingRequestInput.RequestedDate), "What date would you like to meet?" ) ... .Build(); During tests we noticed problems when a user was supposed to type the desired meeting date/time (people would type dd/mm/yy , mm/dd/yy , dd-mm-yy , only dd , etcetra) so we would like to use some kind of "Form" with

How do I intercept a message in FormFlow before it reaches recognizers? (enum usage)

半城伤御伤魂 提交于 2020-01-06 08:03:57
问题 I would like to intercept what the user writes if he doesn't like any option in the list. My code is the following, but the validate function works only if the user chooses an option. using Microsoft.Bot.Builder.Dialogs; using Microsoft.Bot.Builder.FormFlow; using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace BotApplication.App_Code { public enum MainOptions { AccessoAreaRiservata = 1, AcquistoNuovaPolizza, RinnovoPolizza, Documenti, StatoPratica,

Adding verification step in formFlow - Check if topping is in stock

空扰寡人 提交于 2020-01-02 09:26:27
问题 I am working on using the form flow example found Here The example uses formFlow to help the user pick out the toppings they want on their sandwich. I'm trying to add a verification step that checks if each of the toppings they add is in stock and if it isn't send an apology message and prompt the user to enter a different topping instead. A code example is seen below: public static IForm<SandwichOrder> BuildForm() { return new FormBuilder<SandwichOrder>() .Message("Welcome to the sandwich

Integrating LUIS with FormFlow

瘦欲@ 提交于 2020-01-01 18:55:49
问题 I have created a bot, having a FormFlow in it. Now if you type I want to launch a product, LUIS will tell which dialog it has to go to : internal static IDialog<AssesmentHelper> CreateProduct() { return Chain.From(() => FormDialog.FromForm(AssesmentHelper.BuildForm)) .Do(async (context, profileForm) => { try { var completed = await profileForm; } catch (FormCanceledException<AssesmentHelper> e) { string reply; if (e.InnerException == null) { reply = $"You quit on {e.Last}--maybe you can

How to forward conversation from formflow to QnaDialog

南笙酒味 提交于 2019-12-24 09:40:02
问题 Hi Guys im new to bot development, and im trying to figure out how can i forward the conversation to a QnaDialog after formflow. My formflow simply asks the user his/her name after he/she was identified, it would simply say hi (username) afterwards what I want is that any message afterwards would be forwarded to a QnaDialog already since the user was already identified. I tried adding a checker once to flag that a greeting was done already, however since you are only allowed one Conversation

How to change the default button label “No Preference” in FormFlow

落爺英雄遲暮 提交于 2019-12-24 09:21:11
问题 Is there a way to modify the default "No Preference" label of the button when updating the user inputs to read e.g. "I don't want to change anything." without introducing a new Resources.*.resx file? I tried all templates that allow changing such literals but I found no one that could achieve this. TemplateUsage.NoPreference can be used to change only the value of an optional field, not the button label. 回答1: You can do it by overriding the Template value in your FormFlow. Here is an example

FormFlow define options for string field

こ雲淡風輕ζ 提交于 2019-12-23 17:40:21
问题 I am using bot framework and I am trying to define a form dynamically using FormFlow. I have a problem with one specific field: .Field(new FieldReflector<IssueFormModel>(nameof(IssueResultModel.ProductPlatform)) .SetType(typeof(string)) .SetDefine(async (issue, field) => { if (issue.ProductName != null) { foreach (var platform in productsWithPlatforms[issue.ProductName]) { field.AddDescription(platform, platform).AddTerms(platform, platform); } } return await Task.FromResult(true); })

FormFlow: add multiple entities using recurring questions

[亡魂溺海] 提交于 2019-12-13 15:38:29
问题 I've been playing around with the bot framework and creating a chat bot for fun that lets you detail the members of your family/pets. Is there a way to recur over the same set of questions until the user is satisfied? Example code below: [Prompt("What is your family name?")] public string familyName{ get; set; } [Prompt("What is your postcode?")] public string postcode { get; set; } [Prompt("Would you like to add a family member? {||}")] public bool AddPerson { get; set; } [Prompt("What is

BotBuilder: Customize Formflow

吃可爱长大的小学妹 提交于 2019-12-13 07:48:03
问题 can you suggest me which configuration need to be set to change the "What do you want to change?" after saying no in confirmation at the end of the formflow? Thx 回答1: That message is part of the of the TemplateNavigation resources and a Template in the FormConfiguration class is defined with the TemplateUsage.Navigation as seen here. The way to go is partially explained here with the only difference that you need to change the Template to look for and that you don't need to change any command

How to use Suggested actions in Dialog and form flow respectively in bot framework

对着背影说爱祢 提交于 2019-12-11 07:58:00
问题 private async Task MessageReceivedAsync(IDialogContext context, IAwaitable<object> result) { var cli = new ConnectorClient(new Uri(activity.ServiceUrl)); var activity = await result as IMessageActivity; await context.PostAsync($"{activity.Text}"); activity.SuggestedActions = new SuggestedActions() { Actions = new List<CardAction>() { new CardAction(){ Title = "Blue", Type=ActionTypes.ImBack, Value="Blue" }, new CardAction(){ Title = "Red", Type=ActionTypes.ImBack, Value="Red" }, new