Preparing your data and integration landscape
An AI agent is only as good as the data and context it has. Poorly configured integrations and messy master data will lead to confusing, inaccurate or even harmful suggestions. Before building an agent, take a hard look at your data quality and system connectivity.
- Clean up master records: Duplicate customers and vendors, inconsistent item numbers and mismatched units of measure are common in midโmarket ERPs. Agents trained on messy data will propagate those mistakes. Standardise naming conventions, reconcile duplicate entities and ensure that identifiers match across ERP, CRM and eโcommerce systems.
- Align data models: If your eโcommerce platform uses variants and options that donโt map cleanly to Business Centralโs items and attributes, define a mapping layer. Without it, agents may create orders that exclude required options or generate invalid combinations. Similar mismatches occur when CRM and ERP handle leads, contacts and accounts differently. Align these models before expecting an agent to move data between them.
- Expose relevant tables: Business Central exposes data to agents through the Model Context Protocol. Make sure the tables and fields your agent needs are available. If an agent must look up average order value or last purchase date, expose those fields via MCP. If the agent touches external systems, such as Shopify or Dynamics 365 Sales, ensure those integrations are stable and return complete data sets.
- Define approval flows: Agents can draft documents and propose transactions, but they often need a human to approve before posting. Map out who will review the agentโs output and how youโll handle exceptions. Without an agreed approval path, agents can create a backlog of drafts that nobody owns.
Stepโbyโstep guide to designing a custom AI agent
Deploy and monitor. Export the agent definition as a JSON file and store it in source control. Import it into your production environment once you are satisfied. Monitor its behaviour using the new task pane, which displays all agent tasks and suggestions in one place. Track credit consumption and adjust as necessary. Establish a regular review cadence to refine instructions as business conditions change.Common integration pitfalls and lessons learned
Even with a well designed agent, integrations can undermine success. Here are common issues observed in real implementations:
- Inventory synchronisation failures: When ERP and eโcommerce systems use different availability rules, agents may create orders based on inaccurate stock. For example, Shopify counts units on hand while Business Central reserves inventory for open orders. If the agent doesnโt account for reserved stock, it may oversell. To avoid this, sync availability calculations and include reserved quantities in your prompts.
- Duplicate records and mismatched identities: Agents that create or update contacts in CRM systems often generate duplicates because customer identity models differ across platforms. Unify your customer IDs and set up crossโreference tables. Otherwise, an agent might log a support ticket against a duplicate contact and miss prior interactions.
- Asynchronous timing issues: Many systems sync periodically. If your agent triggers a purchase based on data that hasnโt yet synced, it may order too late or too early. A returns workflow described in previous posts highlighted how asynchronous updates cause partial shipments and duplicate approvals. Define in your agent instructions whether it should wait for confirmation that the latest data is available or proceed with the best information at the time.
- Mapping mismatches: Fields sometimes mean different things in different systems. A โstatusโ field in ERP might represent a financial posting state, while in eโcommerce it could denote shipping progress. Agents will misinterpret these if you donโt map them carefully. Create translation tables or unify definitions before using those fields in agent logic.
- Approval bottlenecks: Automation can create hidden work when exception handling and approvals arenโt designed up front. Agents may generate dozens of draft documents that require manager review. Without clear ownership, these drafts languish and frustrate users. Define who approves which outputs and build the approval flow into your agent instructions or surrounding processes.
Governance and security considerations
AI agents touch business data and can execute actions with financial impact. Proper governance is essential.
- Role based access control: Assign the minimum permissions needed for the agent to read and write data. Use service accounts where possible instead of giving agents full user privileges. Monitor changes made by the agent separately from human activity.
- Audit trails and traceability: Business Centralโs diagnostic tools capture the reasoning and steps an agent takes. Enable logging so you can reconstruct why a transaction was created and what data the agent used. Audit logs are invaluable during financial reviews and when troubleshooting.
- Credit budgets and cost controls: Copilot credits are a consumable resource. Set budgets and alerts so that runaway agents donโt consume an unexpected number of credits. Review your consumption patterns regularly and adjust scheduling or logic to be more efficient.
- Compliance and data privacy: If your agent processes personal data or interacts with systems subject to regulations (GDPR, HIPAA, industry specific standards), ensure that your prompts and data exposures comply with those rules. For example, an agent drafting customer communications should not include sensitive information in its output.
Next steps
Designing custom AI agents in Dynamics 365 Business Central is no longer a futuristic concept reserved for developers. With the 2026 release wave, business and operations teams can build tailored assistants that reflect their workflows, reason over their data and deliver actionable suggestions. Start by cleaning up your data and aligning your integrations. Define a narrow, measurable business goal, write clear instructions and iterate in a sandbox until your stakeholders trust the agentโs output. Pay attention to exceptions, mapping mismatches and approval flows; these details make the difference between a helpful assistant and a source of frustration.
As you deploy agents, maintain governance through role based access, auditing and credit budgeting. Monitor and refine your agents as your business evolves. If you need help navigating the technical aspects of Model Context Protocol, data mapping, or ERP and eโcommerce integration, partner with consultants who understand both the technology and the operational realities. Custom agents have the potential to relieve teams of routine tasks and surface insights that improve decisions. With careful planning and execution, they will become an integral part of your business process automation strategy.Introduction
Define the business goal. Start by articulating what outcome you want. Be specific. For instance, โdraft purchase orders for items with less than two weeks of stock, taking supplier lead time into accountโ is clearer than โoptimise purchasing.โ Identify key data points and constraints the agent must consider.
Write and refine instructions. Open the agent designer and enter your goals in plain language. Include examples of what a correct output looks like. For purchasing, you might instruct the agent to suggest quantities based on safety stock levels, supplier minimum order quantities and open sales orders. Avoid ambiguous language; the agent will follow exactly what you provide. Use Copilot suggestions, but always review and adjust them to reflect your processes.
Set up a sandbox. Install the 2026 release update and ensure the AI Development Toolkit is available. Create a sandbox environment with realistic data. Do not test against production; agents may alter data. Populate the sandbox with representative records, including edge cases like discontinued items or customers with multiple shipping addresses.
Map data sources and permissions. Use the Model Context Protocol to expose the tables and fields the agent will need. Grant the agent appropriate permissions; too few and the agent will fail, too many and you risk accidental changes. Pay attention to naming. Similar entities (such as โItemโ vs. โInventory Itemโ) may confuse the agent. Standardise names and provide descriptions in the MCP model to avoid ambiguity.
Trigger and observe. Create a manual task in the sandbox and run the agent. Add any additional context that might be present in a real scenario, such as a vendor email or a specific customer. Watch the diagnostics. If the agent pulls the wrong records or misinterprets an instruction, adjust your prompts or expose additional data.
Handle exceptions and edge cases. Agents often struggle with exceptions that humans handle instinctively. For example, returns may have partial shipments, credit memos or restock fees. Include instructions on how to treat returns differently from new orders. If your agent creates sales documents, tell it how to handle multiโcurrency orders and different tax regimes. Be explicit about when to stop and ask for human approval.
Iterate and validate with stakeholders. Share the agentโs draft outputs with the teams who will use them. Finance might spot an incorrect account assignment; operations might notice that a suggested purchase ignores inbound transfers. Incorporate this feedback and run another cycle. Continue until stakeholders trust the agentโs output.
Microsoft has been steadily weaving generative AI into Dynamics 365 Business Central. 2026โs release wave brings this work to a new level with the introduction of a builtโin agent designer. Previously, users were limited to a handful of predefined agents, such as sales order or payables assistants. These outโofโtheโbox helpers automate common tasks but can only follow the workflows they were designed for. Businesses with unique processes were often left to shoehorn their requirements into generic agents or write custom extensions from scratch. The new agent designer closes that gap by letting organisations build agents that follow their own rules, context and data.
Custom AI agents interpret high level goals, reason over transactional data and suggest or execute actions on your behalf. They may summarise a backlog of purchase orders, draft follow up emails, propose an order based on current inventory and forecasted demand, or reconcile transactions. Because they sit inside Business Central, these agents can access the same data that finance, sales and operations teams use every day. That proximity makes them extremely powerful and potentially dangerous if not designed carefully. The rest of this article explains why custom agents matter, what the 2026 update provides and how to design and deploy your own agent while avoiding common integration traps.
Why design custom AI agents?
Generic agents are helpful, but every company has quirks that are hard to codify in standard templates. A wholesale distributor might need an agent that flags customers who repeatedly request split shipments, while a manufacturer may want an agent that proposes purchase orders only when supplier lead times align with production runs. A service business might want an agent that drafts renewal quotes based on current labour utilisation. In each case, the logic depends on data structures, approval rules and operational timing unique to that business. Building a custom agent allows you to embed that logic directly into Business Central without waiting for Microsoft or an ISV to address your scenario.
Custom agents also help connect disconnected systems. Businesses often run separate ERP, CRM and eโcommerce platforms. Without a tailored process, agents struggle when customer records differ across systems, when inventory definitions donโt match between ERP and a web store, or when financial documents use different currencies. Designing your own agent makes it easier to include the additional context needed to handle these discrepancies. For example, your agent could fetch Shopify order data, compare it to ERP stock levels and then apply your companyโs specific backโorder rules before creating a sales order.
Whatโs new in Business Central 2026 for AI agents?
The 2026 release wave introduces a full agent designer that lowers the barrier to entry for creating AI assistants. Here are the key additions.
Natural language prompts and instruction editor
Every custom agent is defined by a set of goals and instructions written in plain language. You no longer need to write complex AL code to get started. The agent designer includes a simple editor where you describe what the agent should accomplish and provide examples of the desired outputs. Copilot can suggest improvements to your instructions. Because the designer uses plain language, subject matter experts can participate directly instead of relaying requirements through developers.
Sandboxing and diagnostic tools
Before you unleash an agent on production data, you can test it in a sandbox environment. The designer provides detailed diagnostics showing the agentโs inputs, reasoning steps and outputs at each stage. If the agent misinterprets a rule or pulls the wrong records, you can see exactly where it went astray and adjust your instructions. Being able to test and diagnose behaviour without affecting live transactions reduces risk and shortens iteration cycles.
Manual task triggers and environment portability
Initial versions of custom agents start with manual triggers. You create a task, optionally add extra instructions or context, and run the agent. This manual kickโoff simulates event based triggers such as receiving an email or posting a shipment while Microsoft refines the framework. Once the agent definition works as expected, you can export it as a JSON file and import it into another sandbox or production environment. This portability allows you to keep agent definitions under version control in GitHub and move them through development, testing and production just like any other Business Central extension.
Cost considerations
Custom agents consume Copilot credits as they progress through each step of their reasoning. Credits can be provisioned using preโpaid blocks or a payโasโyouโgo model. When designing agents, keep an eye on how often they run and how many steps they take, as this will affect your budget. Exporting agent definitions into version control also helps track changes that may impact credit consumption.

Leave a Reply
You must be logged in to post a comment.