Extend the Immersive Home with Agent Feeds

,
Agent feed introduction

Last year, Microsoft introduced a new AI-featured landing page for Microsoft Dynamics 365 F&O called Immersive Home. It is a successor to the Default dashboard from which you can start several workspaces. Where these workspaces are static, the Immersive Home is generated with the help of AI. Are you interested to learn how to extend the feed with your own AI scenarios? In this post, I show how to achieve this with an AI-based data quality check performed by a Copilot Studio Agent Flow.

Immersive Home

The Immersive Home page was introduced as of version 10.0.44, together with some out-of-the-box agents, like the Supplier Communication Agent and the Account Reconciliation Agent. When you read the information provided in the links and enable all agentic features in Feature Management, the Immersive Home looks like the below screenshot.

Out of the box, the feed is filled with cards from the new Agents as well as pending workflow items. On the right side, you can view agent activity and access the workspaces that used to fill the Default dashboard. The most recent workspaces appear on top.

The main change is that a user will get feed items presented on actionable cards. AI determines what is most important to the user. Those cards will appear on top. In case you don’t enable the out-of-the-box agents, the Immersive Home main part will only show workflow items assigned to you. Where people saw the value of the new agentic home page, there was an ask to add their own agent feed to the Immersive Home page.

Agent feed introduction

With the release of Dynamics 365 F&O version 10.0.47, an Agent feed feature is now available in preview. You can read more about the feature in the documentation: Agent feed (preview) – Finance & Operations | Dynamics 365 | Microsoft Learn.

Agent feed provides the option that allows agents and applications post work items to users in Immersive Home. Where several agents, e.g., send an email, or add a Teams message, there is now an option to post agentic feeds into Dynamics 365 Finance and Operations. The agent feed items get ranked among other existing Immersive Home feeds using AI logic.

To test out the feature, I created an Agent Flow checking for valid entered email addresses and URLs in the contact details from customers, vendors, and more entities linked to parties in the global address book. In case of an error or warning, a new feed item is created. This will be presented as part of the work items. Let’s have a look at the end result first, then I will explain how to achieve this.

While creating a new customer, I made a mistake in saving a contact record for an email address without the actual address. A second wrong entry was an obviously incorrect URL for a vendor. While posting to the feed, there are some parameters that will let the Immersive Home page determine the priority for the order of the feed items to be presented to the user. For both errors, an item was created and presented in the feed. The incorrect URL has a higher priority compared to the empty email address. So far, this looks cool. Let’s check how to achieve this and then conclude about some challenges of the feature in the current preview.

Prerequisites

The documentation starts with enabling features. There are two additional comments to make.

The feature Custom API Generation is listed as On by default, but I had to enable it in my demo environment. In addition, the feed is not working in case the feature Agent management is not enabled. In one test environment, the three features as listed in the documentation were enabled, but no custom feed showed up. So check the 4 features as per the screenshot above.
For reading feed items using a Virtual Entity, in my environment the data entity was already visible. Anyway, it is recommended to check if it is enabled before trying to use the entity in, e.g., a flow or app.

Master data communication details validation

For many years, I have been involved in projects where data quality was important. I have built and contributed to several ISV solutions for data quality and master data management at my previous two employers. One of my favorite checks to configure was with the help of regular expressions. This is a language for validating patterns in texts. For example, you can manage to start a word with a capital, set a limit on the number of characters. More value is the option to describe patterns for several purposes, like a VAT number, IBAN number, email address, URL, and dates. Initially, I learned the basics and searched on the internet for examples for more complex scenarios. When generative AI was introduced, I tried getting regular expressions from Copilot with some good and bad examples. Knowing that AI can validate the data, I thought this would be a good use case for a first example playing with the agent feed feature.

Before beginning to configure the flow, ensure that the next entities are enabled as virtual tables in Dataverse. Row version change tracking should be enabled for entities you want to use as a data event.

  • Communication details (mserp) [mserp_logisticselectronicaddressbientity]
  • Party location relationships (mserp) [mserp_dirpartylocationcdrentities]
  • Global address book (mserp) [mserp_dirpartytablebientities]

Let’s have a look at the configured Agent Flow. When creating the flow, ensure you have selected the correct environment in the title bar. I used the Agent Flow instead of an Agent, as there is a simple flow to follow. The orchestration is simply acting on a data change in Dynamics 365. The configuration is fairly similar to using Power Automate flows.

The flow is triggered when a record is added or modified in the table Communication details. This is the table storing all contact numbers/addresses for all parties in the global address book. So when editing these details on a customer, vendor, contact person, worker, or other type of party, the flow is triggered. With an additional filter, the flow runs only for type Email address and URL. The agent flow is running a-synchronously and data validation is performed after the record has been saved. In case you need a direct validation to prevent the record from being saved to the database, you can consider a customization or one of the available ISV solutions for data quality.

The contact details do not have natural information about the party, such as the party number and name. For that purpose, I added additional actions to look up the global address book record via the party location relationships.

In case we let AI decide if a contact record is created without values, this will cost credits. To prevent unnecessary costs and provide pre-defined details about a priority, I added a condition checking for a filled value or an empty value in the Contact number/address field.

In case the field is empty, the agent feed API is called with several parameters. In case the field is filled, an AI builder action is called to let AI validate the user input.

To create the feed item, you can call a Dataverse API. Using a flow, this can be done with the action Perform an unbound action part of the Dataverse connector. The API msdyn_CreateAgentFeedItemCustomApi should be called with several parameters. By reading the documentation, it is not fully clear when to enter what values. I will provide a list of the values I used with my motivation for showing a feed in case the contact number/address field is left empty.

ParameterValueMotivation
titleData validation warning | Contact number/addressFixed value without variables. I had chosen to use the word warning in the title.
subtitleParty: @{first(outputs(‘List_rows_global_address_book’)?[‘body/value’])?[‘mserp_partynumber’]}, @{first(outputs(‘List_rows_global_address_book’)?[‘body/value’])?[‘mserp_name’]}This will show the context of the validation. The party with the number and name. It is similar to a record identification on Dynamics 365 detail forms.
correlationid@{triggerOutputs()?[‘body/mserp_logisticselectronicaddressbientityid’]}The record identifier of the communication details is used to be able to find existing agent feed record(s) for future updates. E.g., the status can be maintained.
summaryA communication details record with an empty @{triggerOutputs()?[‘body’][‘_mserp_type_label’]} was provided. Please correct or delete the record.Some static text with a variable to indicate if the record was created as an email address or URL.
statusNot startedI took the first value of allowed options. For managing the status, see the details in the conclusion section of this post.
permissionscheckDirPartyTable,GlobalAddressBookListPageTo get the feed item presented, a Dynamics 365 F&O user should have access permissions to these menu items.
cardproviderDefaultAgentFeedCardProviderThe default card provider, according to the documentation. Extension options are discussed below in the blog post.
aicontext{“TaskType”:”Data validation”,”AgentSchema”:”msdyn_datavalidation”,”RecordType”:”Party”,”Priority”:”Medium”,”Category”:”Master data”,”BusinessImpact”:”Avoid incorrect data”,”SourceApp”:”FinanceAndOperations”}I filled required and optional values like the example provided in the documentation, but with some best guesses. The documentation does not talk about the exact purpose. I think the information is used for AI to determine which one should be presented on top. The Priority is provided with the value Medium, where Low and High are also options.
duedate@{addDays(triggerOutputs()?[‘body/mserp_sysmodifieddatetime’], 7)}Optional parameter. I provided a PowerFx function to add 7 days to the date when the contact details record was created or modified.
fnorecord[{“RefRecId”: @{first(outputs(‘List_rows_global_address_book’)?[‘body/value’])?[‘mserp_sourcekey’]},”RefTableId”: “DirPartyTable”}]A JSON array with a single navigation reference to the record in Dynamics 365 F&O. It has a value for the record ID and table ID of the Party record.

After performing the unbound action, I added an action to stop the flow with the succeeded status.

If a contact value was provided, an AI prompt is used to validate the data. Using the prompt builder, I added a data validation prompt that can be fed with two parameters: the contact number/address and the contact type.

The small prompt is giving magically great and consistent results. If the email or URL is valid, it returns “OK”. To limit the size of the AI result, I added an additional instruction to explain the error with a small summary of one sentence.

Using the result of the Run a prompt action, it is possible to evaluate if there was a success or if an error should be posted to the agent feed.

The condition can evaluate the OK value. In case it is different, the unbound action will be performed, similar to the warning explained above, with a few differences, as you can read in the next table.

ParameterValueMotivation
titleData validation error | Contact number/addressThe title is changed from a warning to an error.
summary@{outputs(‘Run_a_prompt_-_Data_validation’)?[‘body/responsev2/predictionOutput/text’]}The error details as response from running the AI prompt.
aicontext{“TaskType”:”Data validation”,”AgentSchema”:”msdyn_datavalidation”,”RecordType”:”Party”,”Priority”:”High”,”Category”:”Master data”,”BusinessImpact”:”Avoid incorrect data”,”SourceApp”:”FinanceAndOperations”}The data is the same, except for the Priority which is now set to High.

Working with the feed

When the agent flow is published, it is directly active. I added a wrong URL and an empty email address. An earlier provided screenshot showed the result. The first thing I noticed is that the card does not have navigation options to the record in the application. Workflow items do have options for approval, rejection, and some other actions. To have a navigation button available, you should develop a custom card provider. Unfortunately, today, that is not possible using an extension model, as there are methods and classes marked as internal use. For prototyping purposes, it is possible to relax the locked standard model and use overlayered coding in a (separate) development instance.

I also made an attempt to correct the empty email address, where I made a typo. In this case, I now have two cards for the same customer. This can be avoided by extending the agent flow and updating the agent feed using the endpoint msdyn_UpdateAgentFeedItemCustomApi. The status can then be changed to Completed, or in case of another validation error, update all other parameters. To be able to find existing agent feed records based on data events, I chose to fill the correlation ID with the Dataverse record identifier for the contact details record. This value is listed in the table above, but the screenshots were taken before I used this value. I will explain the agent flow in more detail in a next blog post. On the default card provider, there is also no option to change the status.

Unlike the workflow feed, the agent feed cards don’t have a user context option today. This means that all users will see the card if they have permissions to the menu items as provided in the permissionscheck parameter. I have tested this, and this works as intended. In this example, a user without permissions on the menu items to open the global address book will not see the cards. Other users with permissions do see the same as my default user in this environment. In a call with Microsoft, the user context was provided as feedback for improvement.

Technical details

The feed items are stored in several tables, managing the content. You can find records in the next tables:

  • AgentFeed
  • AgentFeedMenuItem
  • AgentFeedItemSourceRecord

The AgentFeed table has, next to all details, a due date and a time to live date. The due date is the field you can control, providing a deadline for users to take action on a feed item. The time to live determines the visibility of the item if it is in an active state, with a default of 90 days after the creation of the feed. In case the status is set to Completed or Canceled, the item is not visible anymore.

The AgentFeedMenuItem table has, for each feed item, a list of menu items to check the permissions of the logged-in user.

The AgentFeedItemSourceRecord contains navigation details that can be used on custom card providers to open, e.g., the Global address book details page with the party concerning the error or warning.

There is another table in the application called AgentFeedUserPreferences, but this does not seem to be used in the current version.

A data entity Agent feed (AgentFeedEntity) is provided to be able to read data. The data entity is public and allows editing data as well. The entity has the option to change the value of the time to live in case you want to use a shorter period than 90 days. There are no fields for Finance and Operations record identification details in the data entity. In case you fill the correlationid parameter with the Dataverse record identifier, it will be easy to find existing feed items to be updated, rather than creating new feed items for the same record.

Action center versus agent feed

There is some overlap between the Action Center and the agent feed. Both contain actions to be followed up by users. It is not known if there are plans to merge the features in the future. The action center has status messages, alerts, and notifications. Immersive Home has action items to be followed up on and ranked by AI-assisted logic that determines what could be most important for the user. As the future direction is not known, it is hard to give a recommendation on when to use what.

Conclusion

The Agent feed feature, which is currently in preview, is very useful for custom use cases and provides the option to present additional cards on the work to be done for the user. The preview is obviously the first release where features are missing and incomplete. I recommend start investing the options and learn how to use the agent feeds.

I do hope Microsoft will work on improving the agent feed by a focus on the next topics:

  • User context. In the example I used, it is OK to have the item listed for all users with specific permissions. All of them can take action to navigate to the record and correct the data. For specific use cases, it is required to have it assigned to a single user or a group of users.
  • The default card provider is missing an option to directly navigate to the linked record or maintain the status. However, there is an option to develop custom card providers.
  • The development option is currently not available in an extension development model. I do hope Microsoft will change this soon. Building the model gives errors like:
    • Method ‘startBuilding’ is internal and can be called only from within the same module or assembly.
    • The method ‘startBuilding’ contained in the non-public class ‘WebComponentHeaderDetail’ is inaccessible.

While thinking of use cases, I also thought of several useless scenarios, but these might be fun to make jokes with your colleagues. It is not recommended to abuse the agent feed in a production environment. For next use cases, a warning: “Don’t try this at home.”

  • Use the feed as an instant messaging application. (currently the user context is missing).
  • Use an agent who randomly selects a person with boxed instructions to get coffee for the department.

In case you have meaningful or funny use cases, feel free to share them using the contact form. I have a surprise for the person providing the most original use case. Yes, you can win something!



I do hope you liked this post and will add value for you in your daily work as a professional. If you have related questions or feedback, don’t hesitate to use the Comment feature below.


That’s all for now. Till next time!

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.