As an experienced Business Intelligence specialist, Dynamics 365 finance architect and a CPA I have worked with many prospects and customers that are looking for answers to not only understand their data, but to put systems in place to gather and work with the data. This blog shares information on features, benefits, tips and thoughts around the Microsoft Power Platform and Dynamics 365 applications.
The third article in my Finance Agent series In the first two articles, I wrote about building my first finance agent and then splitting one overloaded agent into three focused ones. In this article, I will cover the feature that got the biggest reaction for users. It was not a chat experience. It was a card in Teams. When a sales order went on credit hold in Dynamics 365 Finance. A few moments later, the credit team had a concise summary, a recommendation, and links to investigate. It looked simple . That simplicity took some design to work properly. Quick Video It Starts with a Finance Event The process begins when Dynamics 365 Finance raises the configured credit-hold event. Unfortunately there is not an exposed business event for a sales order being placed on credit hold, so I had to look for another approach. Fortunately, virtual entities provided a good option. The virtual table - Credit Management (mserp_creditmantablebientity) adds a row when a new credit hold is placed. ...
Get link
Facebook
X
Pinterest
Email
Other Apps
When One Agent Tried to DO Everything
Get link
Facebook
X
Pinterest
Email
Other Apps
-
When One Agent Tried to DO Everything
The second article in my Finance Agent series
My first Collection Manager Agent worked well - until I kept giving it more jobs. What started as a customer-review assistant grew to hanle automated credit-hold analysis, collection-call preparation, and customer email drafting. Each addition made sense. Together, they created a problem.
In my first article, I mentioned the importance of narrower scope. This time, I want to show you what happened when I ignored that lesson.
Watch: Why I Split One Agent Into Three
What the First Version Was Asked to Do
The first Collection Manager Agent started with a simple job.
Review a customer. Pull the aging, the credit limit, the open invoices. Tell me what to do next.
It did that well.
Then I started adding to it.
•I wanted it to react automatically when a sales order was placed on credit hold.
•I wanted it to prepare me for a collection call.
•I wanted it to review disputes and promises to pay.
•I wanted it to create a follow-up activity in Dynamics 365 Finance.
•I wanted it to draft the customer email.
•Every one of those was a good idea.
That was the problem.
The Moment I Knew Something Was Wrong
The Sales Order Hold alert was where it showed up first.
That alert runs automatically. A flow calls the agent, the agent returns the analysis, and a card appears in Teams. Nobody is chatting. Nobody is waiting to be greeted.
But the agent didn't know that.
It had been built to be conversational, so it behaved that way. Parts of the chat experience kept leaking into the automated alert:
•Welcome menus
•Working notes
•Its own Customer Review layout, instead of the structure the flow needed
Here's one real example.
Prompt sent by the automated flow
Review credit hold 000978 for sales order 010104 in legal entity USMF. Retrieve the relevant customer credit and collections information, determine whether the order should remain on hold, and return the result in the structure required for the Teams credit-hold alert.
Response from the original all-purpose agent
Welcome to the Collection Manager Agent.
I can help you with:
1.Customer account review
2.Credit-hold analysis
3.Collection-call preparation
4.Disputes and promises to pay
5.Collection activities
6.Customer communications
I’ll begin by reviewing the customer account, open invoices, aging, credit limit, disputes, promises to pay, collection activities, and related sales orders.
Working notes: I found the customer and am reviewing the account information. Next, I will check the Collections page and related transactions.
Customer Review [The agent then returned its normal conversational Customer Review format rather than the exact fields and structure required by the flow.]
The agent wasn't broken. It was doing exactly what I had told it to do.
I had given it two jobs that wanted opposite things.
The flow needed a predictable response it could turn into a Teams alert. Instead, it received a conversation.
Why More Instructions Didn't Fix It
My first reaction was to add more instructions.
Don't show the menu during an alert. Don't include working notes. Use this layout, not that one.
Each fix helped a little. Each fix also made the instructions longer, and the instructions already had a lot to carry.
The 8,000-character instruction limit also forces the issue. It wasn't why I split the agent, but it made the problem impossible to ignore: the final Collection Manager instructions came in at nearly 7,900 characters, while the alert agent needed roughly 6,700 characters of its own.
What I finally understood was this.
A fast, automated alert and a thoughtful, interactive conversation need different instructions.
When they share one set, each pulls the other off course.
The Decision to Split
After trying roughly five sets of instructions and several different approaches, I realized I needed to split the responsibilities across multiple agents.
I stopped trying to make one agent handle both the automated alert and the interactive conversation.
The Sales Order Hold Agent handles the automated alert. It is read-only, never chats, and returns one structured analysis that the flow can turn into a Teams card.
The Collection Manager Agent handles the interactive conversation: customer reviews, collection-call preparation, and follow-up questions.
Later, I added a third agent just for drafting customer emails. It runs as a subagent of the Collection Manager Agent.
Three agents. One job each.
The change was immediate.
The alert got faster. The responses got more consistent. And when something went wrong, I knew where to look.
What I Learned
Prompt engineering isn't only about writing better instructions.
It's about drawing boundaries.
If you can't describe an agent's job in a single sentence, it probably has too many jobs.
Here's the test I use now:
•Does it have one audience, a person in a chat or a flow waiting for data?
•Does it have one kind of output?
•Would a change to one feature risk breaking another?
If the answer to the last question is yes, it's probably time to split.
What's Next
The feature that got the biggest reaction wasn't the three-agent architecture.
It was the Sales Order Hold alert.
In my next article, I'll follow one credit hold from the moment it happens in Dynamics 365 Finance to the card that lands in Teams. I'll also explain why I kept the alert so narrow and what happens when the agent's response fails.
Until then, I'm curious.
Have you ever built something that tried to do everything? What made you finally split it up?
When working with financial and sales data, clients often ask for charts showing the last 12 months of data. This is actually very simple using relative date filtering. In addition, they might ask to compare to the same month last year. With a simple DAX calculation (SAMEPERIODLASTYEAR) it is possible to add this measure. Here is the formula: Same Month Last Year = CALCULATE(Sum(Sales[SalesAmount]),SAMEPERIODLASTYEAR('Date'[Datekey])) For many users this is all they need. The chart will update each month and they will always be able to see the last 12 months. However, this chart will not work with date slicers. If the client adds a date slicer to the page and selects just one month, the chart will be limited to one month. The reason the chart is limited to one month is because the date dimension relates to the sales fact table and it filters the data for the selected month. Howe...
MCP Servers Arrive in Preview for Dynamics 365 Finance and Supply Chain Recently, Microsoft has introduced MCP servers in preview for Dynamics 365 Finance and Supply Chain, marking a significant leap in the ERP ecosystem. This new capability means that organizations using Dynamics 365 can now leverage MCP servers to supercharge their interactions and analytics—all while maintaining the compliance and security standards expected from a modern cloud service. What Is an MCP Server? An MCP server is a specialized, cloud-managed platform designed to handle advanced analytics workloads for enterprise applications. By offloading data processing and analytical computations from the core operational databases, MCP servers enable faster, scalable, and more secure reporting and analysis. These servers are optimized for handling large datasets, real-time queries, and complex analytics scenarios, providing organizations with the agility to adapt to dynamic business needs. You can learn more abo...
As Microsoft continues to grow, expand and improve Dynamics 365 Finance and Supply, one of the most powerful features released has been Dual-write. Dual-write is an out-of-box infrastructure the provides near-real-time interaction between customer engagement apps and Finance and Supply Chain apps. In summary, it is a tightly coupled, bidirectional integration between Finance and Supply Chain applications and Dataverse (formally known as Common Data Service). Dual-write makes integration with Dynamics 365 Sales and other CE application very straight forward. It also opens up the opportunities to use PowerApps, Power Portal and Power Virtual Agent with Dynamics 365 Finance and Supply Chain apps by connecting through the Dataverse. There is already documentation from Microsoft as well as many blogs already available on setting up Dataverse. Here are a few links: Microsoft Documentation Dynagile Consulting Sandeep Chaudhury ERP Coder Blog Instead...
Comments
Post a Comment