Discrepancies between using Action.Submit and Action.Execute in Teams bot adaptive cards

Boris Rusinovic 1 Reputation point
2024-04-21T10:15:12.1033333+00:00

Using Action.Submit there is an option to hide the feedback message using:

            "msTeams": {
                "feedback": {
                    "hide": true
                }
            }

With Action.Execute that is not possible.

Using Action.Execute it is possible to return an information or error text message, or adaptive card, as specified here:

https://learn.microsoft.com/en-us/adaptive-cards/authoring-cards/universal-action-model#response-format

{
"statusCode" : 500,
"type": "application/vnd.microsoft.error",
"value": {
    "code": "500",
    "message": "Error: Simulated error occurred"
  } 
}

simulatedError

With Action.Submit regardless of the return body, all you can get is the feedback message:

StandardResponse

Considering everything, Action.Execute appears to be a better choice but there is a really bad issue with Action.Execute.

Entered screen values are reset to default (previous values) when Action.Execute button is clicked.

Let's imagine an adaptive card form that the user needs to fill in. Clicking on a button with Action.Execute will clear all entered fields to horror the user. Nevertheless the correct values are sent to the bot and server.

Or this example with entering time:

  1. User is entering time and initial value is 0

Start

  1. User enters 7 hours

Enter7

  1. User clicks on Save (Action.Execute). The entered value of 7 resets to 0

ClickSave

  1. After the card refresh, the correct time is stored on the server

Saved7

Overall, both Action.Submit and Action.Execute do not provide complete control over adaptive card behavior in Teams. Ideally, it would be great to have an option to freely send an information message (feedback) to an already existing adaptive card message, and options to control/suppress feedback for both when needed.

Thanks,

Boris

Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,866 questions
{count} votes