D365 F&O: Extending ERP Workflows with Work IQ Business Skills

Real business use cases and end-to-end solution designs combining D365 F&O with Power Platform and AI · 10 min read
TL;DR: Connect Dynamics 365 F&O to Work IQ by wrapping X++ transactional logic inside Dataverse Custom APIs and exposing them as governed business skills via Model Context Protocol.
D365 F&OArchitectureIntegrationCopilot & AISupply Chain

Enterprise automation across Dynamics 365 Finance & Supply Chain Management frequently stalls when workflows demand contextual human reasoning alongside transactional rigor. Traditional approaches force architects into rigid batch jobs or ungrounded generative AI interfaces that risk operational errors. By integrating Business Applications in Work IQ with custom business skills, you can expose governed X++ transaction logic to AI agents while preserving strict Dataverse security boundaries and execution determinism.

At a glance

  • 🔹 Applies to: Dynamics 365 Finance & Supply Chain Management (version 10.0.39 and later), Microsoft Dataverse, Power Platform admin center, Copilot Studio.
  • 🔹 Prerequisites: Power Platform admin center Environment Admin privileges, configured Dataverse Virtual Entities for F&O, and appropriate Power Platform licensing.
  • 🔹 Effort level: Medium (3–5 days to build, bind, and secure custom business skills and endpoints).
  • 🔹 Outcome: Autonomous and human-in-the-loop agents executing enterprise supply chain actions directly against F&O via Model Context Protocol (MCP) and Dataverse Custom APIs.

How it works

Business Applications in Work IQ functions as the enterprise context and intelligence layer connecting autonomous agents to Dynamics 365 operational applications. Rather than exposing raw SQL databases or unmanaged OData endpoints directly to large language models, Work IQ provides semantic understanding of operational data. It layers auto-generated semantic models and configurable business skills on top of Dataverse and Dynamics 365 ERP, allowing agents to interpret ERP concepts like vendor capacity, safety stock, and payment terms using trusted enterprise definitions.

The connection architecture hinges on whether your orchestration requires broad cross-enterprise context or targeted, environment-specific transaction execution. Work IQ exposes both a broad Work IQ MCP endpoint—aggregating Microsoft 365, Power Platform, and ERP context—and a targeted Dataverse MCP server. For deterministic supply chain automation, the Dataverse MCP server interacts directly with Dataverse Custom APIs. These Custom APIs invoke standard F&O data entities, virtual tables, or X++ custom services, ensuring that core ERP ledger validation, inventory reservations, and workflow states remain fully intact during execution.

ℹ️ Good to knowArchitectural Distinction: Work IQ MCP does not supply a retrieval-only flag to bypass model generation. When your solution demands strict, deterministic data queries without language-model interpretation, bind your agent directly to target Dataverse Custom APIs or the Dataverse Ask API.
Work IQ and D365 F&O Integration Architecture
Figure 1: End-to-end integration topology connecting AI agents to D365 F&O transactional services through Work IQ and Dataverse.
Integration Channel Primary Execution Scope Context Layer Best Use Case
Work IQ MCP Server Cross-tenant (M365 + D365) Work IQ semantic mesh Executive copilots orchestrating workflows spanning email, files, and ERP records.
Dataverse MCP Server Environment-specific Dataverse metadata & Custom APIs Operational agents executing specific supply chain or financial transactions in D365.
Dataverse Ask API Direct semantic model query Dataverse semantic models Custom application code needing grounded answers from specific entity models.
Direct F&O OData / Dual-Write Synchronous data integration Relational metadata only High-volume system-to-system integrations requiring zero conversational reasoning.

Step-by-step solution

Part 1: Platform activation and data grounding

  1. Enable Work IQ in Power Platform admin center: Navigate to Power Platform admin center > Environments > [Select Environment] > Settings > Product > Features. Locate the Work IQ section (formerly labeled Dataverse intelligence (preview)) and toggle the feature to On. This step provisions the tenant intelligence plane and permits business application context to expose tools via MCP.
  2. Expose F&O entities as Dataverse Virtual Tables: In your Dataverse environment, access the Available Finance and Operations Entities table (via Power Apps or Advanced Settings). Enable and make visible the required operational entities—specifically PurchPurchaseOrderHeaderV2Entity and PurchPurchaseOrderLineV2Entity—so Dataverse treats ERP operational tables as native entities within its relational catalog.
  3. Configure Entity Semantic Metadata: Within the Dataverse maker portal (make.powerapps.com), locate the generated virtual tables under Solutions. Ensure that table display names, attribute descriptions, and relationship lookups are explicitly populated; Work IQ relies on Dataverse schema metadata descriptions to generate accurate semantic boundaries for tool calling.

Part 2: Skill design and backend execution

  1. Construct the X++ Business Logic Controller: Create an idempotent service class in F&O decorated with SysEntryPointAttribute to handle the transactional logic, such as updating delivery dates and re-running purchase order delivery confirmations without UI dependency.
  2. Expose the Skill as a Dataverse Custom API: In your Dataverse solution, create a new Custom API named mserp_ReschedulePurchaseLine. Define the input parameters (PurchId, LineNumber, NewDeliveryDate, ReasonCode) and output parameters (ExecutionStatus, ConfirmedDate, ErrorMessage). Bind the Custom API execution to a Dataverse plugin that calls the D365 F&O Custom Service via an authenticated service-to-service endpoint.
  3. Register and Authorize the Skill in Copilot Studio: Open Microsoft Copilot Studio and access your target agent. Add an action pointing to the Dataverse MCP Server tools. Select the mserp_ReschedulePurchaseLine Custom API. Provide a concise, plain-language description explaining when the agent should trigger the tool (e.g., "Use this tool to update purchase order delivery dates when a supplier announces an unavoidable freight delay").
  4. Apply Role-Based Access Control (RBAC): Under Power Platform admin center > Environments > [Select Environment] > Settings > Users + permissions > Security roles, grant execution rights for the Custom API only to service principals and designated agent personas. Ensure the execution identity maps to an F&O user profile restricted by standard purchasing security duties (e.g., PurchOrderMaintain).
💡 Pro tipPro Tip: Avoid letting generative models pass arbitrary status strings into D365 F&O. Restrict input parameters in your Custom API schema to enumerated sets (such as F&O standard PurchStatus enums) to prevent posting failures caused by hallucinated status codes.

Worked example

Apex Industrial Solutions manufactures industrial pump systems and uses Dynamics 365 Supply Chain Management. Supply chain disruptions regularly force suppliers to communicate revised ship dates via unstructured email or vendor portals. Previously, buyers spent substantial time cross-referencing production schedule impact, verifying purchase agreement price variances, and executing purchase order amendments in the F&O client. Apex implemented an autonomous delivery exception skill orchestrated by Work IQ.

When a Tier-1 foundry notified Apex of a 14-day casting delay on Purchase Order PO-009842, the Work IQ-connected agent evaluated the semantic context across current Production Orders (identifying line item ITM-7741 as non-critical buffer inventory) and determined that updating the delivery date would not disrupt Master Planning (MRP). The agent invoked the Dataverse Custom API mserp_ReschedulePurchaseLine, which triggered the underlying X++ service shown below:

[DataContractAttribute]
class ApexPurchLineRescheduleContract
{
    private PurchId purchId;
    private LineNum lineNum;
    private TransDate newDeliveryDate;
    private str changeReason;

    [DataMemberAttribute('PurchId')]
    public PurchId parmPurchId(PurchId _purchId = purchId)
    {
        purchId = _purchId;
        return purchId;
    }

    [DataMemberAttribute('LineNum')]
    public LineNum parmLineNum(LineNum _lineNum = lineNum)
    {
        lineNum = _lineNum;
        return lineNum;
    }

    [DataMemberAttribute('NewDeliveryDate')]
    public TransDate parmNewDeliveryDate(TransDate _newDeliveryDate = newDeliveryDate)
    {
        newDeliveryDate = _newDeliveryDate;
        return newDeliveryDate;
    }

    [DataMemberAttribute('ChangeReason')]
    public str parmChangeReason(str _changeReason = changeReason)
    {
        changeReason = _changeReason;
        return changeReason;
    }
}

class ApexPurchOrderSkillService
{
    [SysEntryPointAttribute(true)]
    public ApexPurchLineRescheduleResponse reschedulePurchLine(ApexPurchLineRescheduleContract _contract)
    {
        ApexPurchLineRescheduleResponse response = new ApexPurchLineRescheduleResponse();
        PurchLine purchLine;
        PurchTable purchTable;

        ttsbegin;
        purchTable = PurchTable::find(_contract.parmPurchId(), true);
        if (!purchTable || purchTable.PurchStatus != PurchStatus::Backorder)
        {
            throw error(strFmt("@Apex:InvalidPOState", _contract.parmPurchId()));
        }

        select forupdate purchLine
            where purchLine.PurchId == _contract.parmPurchId()
               && purchLine.LineNumber == _contract.parmLineNum();

        if (purchLine.RecId)
        {
            purchLine.DeliveryDate = _contract.parmNewDeliveryDate();
            purchLine.modifiedField(fieldNum(PurchLine, DeliveryDate));
            purchLine.update();

            response.parmIsSuccess(true);
            response.parmUpdatedDate(purchLine.DeliveryDate);
        }
        else
        {
            response.parmIsSuccess(false);
            response.parmErrorMessage("@Apex:LineNotFound");
        }
        ttscommit;

        return response;
    }
}

By executing through the Work IQ MCP server, the agent validated the change, logged the vendor reason code into D365 line notes, and regenerated the purchase order confirmation automatically. The automation eliminated manual buyer intervention on standard schedule variances.

Procurement Exception Handling Metrics (Before vs After Work IQ)
Figure 3: Operational impact of automating purchase order schedule adjustments using Work IQ business skills at Apex Industrial Solutions.
4.5 min
Resolution Time
-83%
Manual Touch Reduction
88%
Stockout Rate Reduction

Automation and AI opportunities

Once your business skills are registered in the Work IQ plane, you can expand automation across adjacent business processes:

  • Fabric IQ Real-Time Telemetry Grounding: Combine Work IQ business skills with Fabric IQ semantic models. If IoT telemetry ingested into Microsoft Fabric OneLake indicates a container carrier delay, an automated agent can trigger the F&O rescheduling skill before factory lines experience material shortages.
  • Multi-Agent Accounts Payable Variance Resolution: Deploy a triage agent in Copilot Studio that detects three-way matching discrepancies. The agent evaluates unit price variations against purchasing contracts and invokes an approved F&O price variance tolerance skill to unblock automated invoice posting.
  • Credit Limit Assessment Workflows: Link Customer Service agents to finance skills that recalculate open sales order balances in real time, apply credit hold overrides based on policy documents indexed by Foundry IQ, and post unreleased picking lists without user context switching.
⚠️ Watch outExecution Boundary Warning: Never allow an agent to call financial ledger posting routines (such as LedgerJournalCheckPost) without deterministic validation gates. Agents must output proposed journals to an unposted approval batch rather than posting directly to closed financial periods.

Common pitfalls and troubleshooting

  • Symptom: The agent repeatedly calls unintended APIs or hallucinates parameters during complex ERP updates.
    Cause: Ambiguous or missing descriptions in the Dataverse Custom API schema and virtual table columns.
    Fix: Write explicit operational boundaries into the Custom API metadata. State clearly: "Only use when order status is Open Order (Backorder). Never use for Invoiced or Canceled orders."
  • Symptom: Work IQ MCP requests fail with HTTP 504 Gateway Timeout during transaction execution.
    Cause: Backend X++ operations execute synchronous inventory reservations or MRP updates that exceed the gateway or client HTTP timeout limit.
    Fix: Decouple long-running operations. Design the business skill to post tasks to the F&O Batch Framework (via SysOperationServiceController execution mode ScheduledBatch) and return an immediate correlation ID to the agent.
  • Symptom: Agent returns Principal user lacks privileges when executing virtual entity queries.
    Cause: The application registration or delegated user executing the MCP request does not possess read privileges on the underlying Dataverse virtual table entity.
    Fix: Assign an enterprise security role containing read/write privileges on mserp_* catalog entities to the agent's application user in Power Platform admin center.
  • Symptom: Record locking and DeadlockException errors in F&O when multiple autonomous skills run in parallel.
    Cause: Agents updating lines across the same PurchTable or SalesTable header concurrently without record reservation sequencing.
    Fix: Implement optimistic concurrency checks using RowVersion tracking, and ensure X++ transactions lock parent header records explicitly with select forupdate before modifying child distributions.
  • Symptom: Work IQ tools disappear from Copilot Studio interface.
    Cause: The Work IQ toggle in Power Platform admin center was disabled or reset during an environment restore or solution import.
    Fix: Re-enable the Work IQ feature in Power Platform admin center environment settings, republish the Dataverse solution containing the Custom APIs, and re-bind the MCP connection in Copilot Studio.

Best-practice checklist

  • ✅ Enable Work IQ explicitly in the Power Platform admin center for all development, sandbox, and production environments requiring agentic capabilities.
  • ✅ Ground every business skill in Dataverse Custom APIs rather than exposing direct table edit permissions to conversational agents.
  • ✅ Enforce strict data contracts with typed primitive parameters or enumerated drop-downs to prevent invalid X++ type casting.
  • ✅ Wrap all state-modifying operations inside transactional blocks (ttsbegin / ttscommit) equipped with standard F&O exception handlers.
  • ✅ Decouple long-running multi-step ERP routines into asynchronous SysOperation batch tasks.
  • ✅ Maintain explicit field and action descriptions across Dataverse solutions to provide semantic clarity for tool selection.
  • ✅ Configure audit logging across both Dataverse plugin execution logs and F&O database logging for all skill-triggered updates.

FAQ

Can Work IQ business skills bypass Dynamics 365 licensing rules?

No. When agents execute business skills against Dynamics 365 Finance or Supply Chain Management through Dataverse MCP, the underlying service principal or delegated identity must be appropriately licensed. Standard Dynamics 365 Operations Activity or Full User licenses apply depending on the business logic and tables touched by the Custom API.

How does Work IQ differ from standard Power Automate cloud flows used as Copilot plugins?

While Power Automate flows provide sequential logic, they lack native semantic models and cannot automatically adapt their execution plans based on conversational intent. Work IQ provides a dynamic intelligence layer where agents evaluate enterprise context across Dataverse, Fabric, and F&O metadata, selecting the right business skill dynamically based on user intent and business rules.

Is Dual-write mandatory to use Work IQ business skills with D365 F&O?

No. While Dual-write synchronizes physical tables to Dataverse, Work IQ business skills can operate effectively over Dataverse Virtual Entities (the mserp catalog) or direct Custom API endpoints calling F&O custom services. This avoids duplicating large transactional data footprints in Dataverse while retaining full access to ERP operational logic.

Work IQ Business Skills Architecture
Figure 2: Structural breakdown of Work IQ components, extensibility channels, and governance layers for enterprise ERP automation.

Key takeaways

  • 🎯 Work IQ bridges generative AI tools and Dynamics 365 F&O by delivering grounded semantic understanding and structured tool calling via the Dataverse MCP server.
  • 🎯 Custom business skills should encapsulate complex ERP business logic within Dataverse Custom APIs backed by X++ transactional frameworks to guarantee ledger integrity.
  • 🎯 Deterministic guardrails and schema descriptions prevent agent hallucination, ensuring reliable operational execution in mission-critical finance and supply chain processes.

Further reading

Note: written with AI assistance and reviewed by Gaurav Jadaun. Always validate in a sandbox environment before applying to production.

Comments

Popular posts from this blog

Monthly Inventory Close in Microsoft Dynamics AX 2012

Product Configuration Technology Ax2012R3

How to configure Fixed Assets Module in Ax2012