June 3rd, 2021

Universal Actions in Adaptive Cards on Microsoft Teams

Note: This is part two of a series related to Adaptive Cards in Microsoft Teams. The first part of this series included five new features enhancing Adaptive Cards in Microsoft Teams.

Have you ever wondered how cool it would be to be able to send the same card to both Microsoft Teams & Outlook and keep them in sync? Did you ever want to give specific users information or action which was more relevant for them on the same card in the chat? Wouldn’t you love to complete your workflow in same message without spamming chats with long series of cardsDon’t you have scenarios where you wanted to keep data fresh on cards or simply give contextual feedback to your users on what they should do next?  

Well, if you answered “Yes” to any of the above questions – you’re in for a treat! 

We are excited to announce the release of Universal Actions in Adaptive Cards on Teams bringing in support for User Specific Views, Sequential Workflows and Up-to-date views on Adaptive Cards! 

Universal Actions for Adaptive Cards evolved from developer feedback that even though layout and rendering for Adaptive Cards was universal, action handling was not. Even if a developer wanted to send the same card to say Teams and Outlook, they had to handle actions differently using Action.Submit for Teams and Action.Http for Outlook. 

Different action models in Teams and Outlook for the same card

This new model brings the bot as the common backend for handling actions and introduces a new action type, Action.Execute, which works across apps, such as Teams and Outlook. With Action.Execute the capability to return a new card to update the older card in place is also brought in which will help developers to give instantaneous feedback to users.

Universal Actions thus enables sending the exact same card to both Teams and Outlook and maintaining them in sync, as shown below, thereby enabling developers to reach their users wherever they are. This enables strong use cases like sending approval requests, project management notifications and tasks, recognition messages, bot notifications, EDU: teacher reports, incident management, ticketing etc.

Image showing the same card in Microsoft Teams and Outlook

 

New features coming with the Universal Action Model

User Specific Views of Adaptive Cards

Today every user in the Teams chat or channel sees the exact same view and button actions on the Adaptive Card. However, in certain scenarios there is a requirement for certain users to act differently and have access to different information within the same chat or channel. With User Specific Views powered by the refresh property of Universal Actions you can now show differentiated information and actions by sending a different card to particular users in a chat/channel. This helps light up many powerful scenarios like providing creator controls (Edit, Close, View results etc.) for Polls, Teacher controls for EDU assignments, approvals (only approvers getting Approve/Reject buttons in chat/channel), Poll result view, ticketing, project management and task controls etc.

Image showing User Specific Views for three different users

Sequential Workflow Support

With Sequential Workflow support, users can progress through a series of workflows without sending different cards separately. This is made possible by the ability of Action.Execute to return an Adaptive Card in response to an action. Also, any user in the chat or channel can progress through their workflow without modifying the card for other users in the chat. This now improves the experience for taking multistep input from users in a bot chat or even in groups/channels as shown in the below food ordering example. Other scenarios like short quizzes, multi question polls, incident management etc. greatly benefit from this capability as well.

GIF showing a food ordering workflow in Teams by changing only one card

 

Image showing the food ordering workflow for three different users on different stagesUp to date views

You can now create Adaptive Cards that update automatically to keep the information on the cards up to date. This is achieved by the new refresh property coming in with the Universal Action model. The below image shows an example of how up to date views helps provide the latest information on approval states to users. This is also useful for scenarios like business analytics, ticketing and project management where cards need to update with latest information.

Image of cards in different stages of an Approval flow in Teams showcasing up to date views

 

Start updating your scenarios today!

You can start updating your scenarios today to utilize the Universal Action model. You can start by providing your users instantaneous feedback on an action as shown in the below example:

: GIF of a card on Teams where a new card acknowledges input

 

We will be releasing more features and updates over the next few months and have some exciting updates to share soon! Go check out our Build session for a quick coding demo and some scenarios our partners are building.

Happy coding!