BotFramework-Composer icon indicating copy to clipboard operation
BotFramework-Composer copied to clipboard

Adaptive Card Submit jumps to Unknown Intent

Open adrwh opened this issue 3 years ago • 2 comments

Objective: I want to capture value/s from an adaptive card, when the usr clicks a submit button, store the values and use them in future bot responses and activities.

Environment: 12.5 Monterey M1 Pro Macbook, Bot Composes v2.1.2, with the Node JS Empty Bot sample loaded up.

  1. In my Greeting Intent, I simply load the MailboxManagement Dialog.
  2. In MailboxManagement Dialog, i chose the "Ask a Question > Ask activity" activity.
  3. In the trigger i added a basic adaptive card as an attachment. There is a Text Field, with an ID of txtInput and a Submit Button. (adaptive card JSON below.)
  4. I added a "Send a Response" activity with a text value of ${turn.activity.value.txtInput}

What I expected: When running the bot, the user enters a text value into the adaptive card text box and hits submit. Upon hitting submit, the value from the txtInput field is captured and sent back to the screen.

What happens: Instead of sending the value back to the screen, the txtInput value is indeed captured, however i am redirected to the Unknown Intent dialog.

Screen Shot 2022-08-02 at 10 09 38 AM

Adaptive Card JSON

{
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.3",
    "body": [
        {
            "type": "Input.Text",
            "placeholder": "Placeholder text",
            "id": "txtInput"
        },
        {
            "type": "ActionSet",
            "actions": [
                {
                    "type": "Action.Submit",
                    "title": "Action.Submit"
                }
            ]
        }
    ]
}

adrwh avatar Aug 02 '22 14:08 adrwh

Hi @adrwh I'm not entirely sure how the Ask activity is supposed to work. I am currently investigating.

dmvtech avatar Aug 03 '22 18:08 dmvtech

Hey team, I seem to have resolved this, I can't explain exactly, however I have updated the dialog so that the Ask Activity is the last action on the step, and then it does now trigger the Message Received activity and outputs the value correctly.

adrwh avatar Aug 03 '22 19:08 adrwh

Thanks @adrwh!

I was able to confirm the same thanks to your info. Closing as resolved.

dmvtech avatar Aug 16 '22 23:08 dmvtech