Adding parameterized adaptive card prompt

Brass Contributor

Currently we are using adaptive card prompt for displaying the below details in bot.

 

Aiswarya_Lakshmy_1-1695819147888.png

 

 

We want to change the behavior to accept User name, Image, Created date, Board and List from user by each dialog flow and show the adaptive card prompt with the same 'view' and 'set due date' functionality.

 

AddDialog(new AdaptiveCardPrompt(nameof(AdaptiveCardPrompt), UserCardFactory.GetUserDataAdaptiveCard(), CustomUserDataOptionalValidator));
AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
            {
                NameStepAsync,
                NameConfirmStepAsync,
                ImageConfirmStepAsync,
                CreateDateConfirmStepAsync,
                BoardDateConfirmStepAsync,
                ListDateConfirmStepAsync,
                ConfirmAdaptiveCardPromptWithUSerResponseAsync
            }));

            InitialDialogId = nameof(WaterfallDialog);


private async Task<DialogTurnResult> ConfirmAdaptiveCardPromptWithUSerResponseAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken)
{
return await stepContext.PromptAsync(nameof(AdaptiveCardPrompt), new PromptOptions() { }, cancellationToken);
}

 

On the final step, we need to fill the user input data to the adaptive card prompt and User name, Image, Created date, Board and List needs to be filled in the adaptive card

0 Replies