{"id":6387,"date":"2021-06-03T09:47:50","date_gmt":"2021-06-03T17:47:50","guid":{"rendered":"https:\/\/officedevblogs.wpengine.com\/?p=6387"},"modified":"2021-06-03T09:47:50","modified_gmt":"2021-06-03T17:47:50","slug":"universal-actions-in-adaptive-cards-on-microsoft-teams","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/universal-actions-in-adaptive-cards-on-microsoft-teams\/","title":{"rendered":"Universal Actions in Adaptive Cards on Microsoft Teams"},"content":{"rendered":"<p><em>Note: This is part two of a series related to Adaptive Cards in Microsoft Teams. The first part of this series included <a href=\"https:\/\/developer.microsoft.com\/microsoft-365\/blogs\/five-new-features-enhancing-adaptive-cards-in-microsoft-teams\/\" target=\"_blank\" rel=\"noopener noreferrer\">five new features enhancing Adaptive Cards in Microsoft Teams<\/a>.<\/em><\/p>\n<p><span data-contrast=\"auto\">Have you ever wondered how cool it would be to be able to send the same card to both<\/span><span data-contrast=\"auto\">\u00a0Microsoft<\/span><span data-contrast=\"auto\">\u00a0Teams &amp; 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<\/span><span data-contrast=\"auto\">\u00a0in the chat<\/span><span data-contrast=\"auto\">? Wouldn&#8217;t you love to complete your workflow in same message without spamming chats with\u00a0<\/span><span data-contrast=\"auto\">a\u00a0<\/span><span data-contrast=\"auto\">long series of\u00a0<\/span><span data-contrast=\"auto\">cards<\/span><span data-contrast=\"auto\">?\u00a0<\/span><span data-contrast=\"auto\">Don\u2019t you<\/span><span data-contrast=\"auto\">\u00a0have scenarios where you wanted to keep data fresh on cards or simply give contextual feedback to your users on what they should do next?\u00a0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Well, if you answered &#8220;Yes&#8221; to any of the above questions &#8211; you\u2019re\u00a0<\/span><span data-contrast=\"auto\">in for a treat!<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">We\u00a0are excited to announce\u00a0the release of\u00a0<\/span><a href=\"https:\/\/docs.microsoft.com\/en-us\/microsoftteams\/platform\/task-modules-and-cards\/cards\/universal-actions-for-adaptive-cards\/overview?tabs=mobile\"><span data-contrast=\"none\">Universal Actions in Adaptive Cards on Teams<\/span><\/a><span data-contrast=\"auto\">\u00a0bringing in support for User Specific Views, Sequential Workflows and Up-to-date views\u00a0on Adaptive Cards!<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">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 <\/span><span data-contrast=\"auto\">Teams and Outlook, they <\/span><span data-contrast=\"auto\">had to<\/span><span data-contrast=\"auto\">\u00a0<\/span><span data-contrast=\"auto\">handle actions differently\u00a0using\u00a0Action.Submit\u00a0for Teams and\u00a0Action.Http\u00a0for Outlook.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-6449 size-full\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Universal-Actions-in-Cards_Action-Model.png\" alt=\"Different action models in Teams and Outlook for the same card\" width=\"720\" height=\"366\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Universal-Actions-in-Cards_Action-Model.png 720w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Universal-Actions-in-Cards_Action-Model-300x153.png 300w\" sizes=\"(max-width: 720px) 100vw, 720px\" \/><\/p>\n<p><span class=\"TextRun BCX0 SCXW29303321\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun BCX0 SCXW29303321\">This new model<\/span><\/span>\u00a0brings the bot as the common backend for handling actions and introduces a new action type, <strong>Action.Execute<\/strong>, 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.<\/p>\n<p>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.<\/p>\n<p><strong> <img decoding=\"async\" class=\"aligncenter wp-image-6450\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/universal-actions_same-card.png\" alt=\"Image showing the same card in Microsoft Teams and Outlook\" width=\"700\" height=\"692\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/universal-actions_same-card.png 962w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/universal-actions_same-card-300x297.png 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/universal-actions_same-card-768x759.png 768w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/universal-actions_same-card-24x24.png 24w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/universal-actions_same-card-48x48.png 48w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/universal-actions_same-card-96x96.png 96w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/strong><\/p>\n<p>&nbsp;<\/p>\n<h3><strong>New features coming with the Universal Action Model<\/strong><\/h3>\n<p><strong>User Specific Views of Adaptive Cards<\/strong><\/p>\n<p>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 <a href=\"https:\/\/docs.microsoft.com\/en-us\/microsoftteams\/platform\/task-modules-and-cards\/cards\/universal-actions-for-adaptive-cards\/overview#user-specific-views\" target=\"_blank\" rel=\"noopener noreferrer\">User Specific Views powered by the refresh property of Universal Actions<\/a> 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.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-6451 size-full\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Universal-Actions_user-specific-views.png.jpg\" alt=\"Image showing User Specific Views for three different users\" width=\"720\" height=\"516\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Universal-Actions_user-specific-views.png.jpg 720w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Universal-Actions_user-specific-views.png-300x215.jpg 300w\" sizes=\"(max-width: 720px) 100vw, 720px\" \/><\/p>\n<p><strong>Sequential Workflow Support<\/strong><\/p>\n<p>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\u00a0Action.Execute\u00a0to return an Adaptive Card in response to an action. Also, any user in the chat or channel can <a href=\"https:\/\/docs.microsoft.com\/en-us\/microsoftteams\/platform\/task-modules-and-cards\/cards\/universal-actions-for-adaptive-cards\/overview#sequential-workflow-support\">progress through their workflow<\/a> 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.<\/p>\n<p><strong><img decoding=\"async\" class=\"aligncenter wp-image-6452 size-full\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Universal-Actions_sequential-workflow.gif\" alt=\"GIF showing a food ordering workflow in Teams by changing only one card\" width=\"548\" height=\"282\" \/><\/strong><\/p>\n<p><em>\u00a0<\/em><\/p>\n<p><strong><img decoding=\"async\" class=\"aligncenter wp-image-6453 size-large\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Universal-Actions_sequential-workflow-2-1024x510.png\" alt=\"Image showing the food ordering workflow for three different users on different stages\" width=\"1024\" height=\"510\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Universal-Actions_sequential-workflow-2-1024x510.png 1024w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Universal-Actions_sequential-workflow-2-300x149.png 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Universal-Actions_sequential-workflow-2-768x383.png 768w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Universal-Actions_sequential-workflow-2-1536x765.png 1536w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Universal-Actions_sequential-workflow-2.png 1650w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/strong><strong>Up to date views<\/strong><\/p>\n<p>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 <a href=\"https:\/\/docs.microsoft.com\/en-us\/microsoftteams\/platform\/task-modules-and-cards\/cards\/universal-actions-for-adaptive-cards\/overview#up-to-date-views\">up to date views helps provide the latest information<\/a> 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.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-6454\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Universal-Actions_up-to-date-views-980x1024.png\" alt=\"Image of cards in different stages of an Approval flow in Teams showcasing up to date views\" width=\"800\" height=\"836\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Universal-Actions_up-to-date-views-980x1024.png 980w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Universal-Actions_up-to-date-views-287x300.png 287w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Universal-Actions_up-to-date-views-768x803.png 768w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Universal-Actions_up-to-date-views-24x24.png 24w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Universal-Actions_up-to-date-views.png 1152w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Start updating your scenarios today!<\/strong><\/p>\n<p>You can start updating your scenarios today to utilize the Universal Action model. You can <a href=\"https:\/\/docs.microsoft.com\/en-us\/microsoftteams\/platform\/task-modules-and-cards\/cards\/universal-actions-for-adaptive-cards\/work-with-universal-actions-for-adaptive-cards#quick-start-guide-to-leverage-universal-actions-for-adaptive-cards-in-teams\">start by providing your users instantaneous feedback<\/a> on an action as shown in the below example:<\/p>\n<p><img decoding=\"async\" class=\"wp-image-6455 size-full aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2021\/06\/Universal-actions_update-scenarios.gif\" alt=\": GIF of a card on Teams where a new card acknowledges input \" width=\"472\" height=\"182\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>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 <a href=\"https:\/\/mybuild.microsoft.com\/sessions\/337ee14e-a234-4c63-95dd-117dbe05d1bc\" target=\"_blank\" rel=\"noopener noreferrer\">Build session for a quick coding demo<\/a> and some scenarios our partners are building.<\/p>\n<p>Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The new release of Universal Actions in Adaptive Cards on Microsoft Teams\u00a0brings support for user specific views, sequential workflows and up-to-date views\u00a0on Adaptive Cards!\u00a0<\/p>\n","protected":false},"author":69073,"featured_media":25159,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[8,128],"tags":[12],"class_list":["post-6387","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-adaptive-cards","category-microsoft-teams","tag-outlook"],"acf":[],"blog_post_summary":"<p>The new release of Universal Actions in Adaptive Cards on Microsoft Teams\u00a0brings support for user specific views, sequential workflows and up-to-date views\u00a0on Adaptive Cards!\u00a0<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/6387","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/users\/69073"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=6387"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/6387\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/25159"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=6387"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=6387"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=6387"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}