Create a Custom Agent in Dynamics 365 Business Central
Agents:
In Microsoft Dynamics 365 Business Central, an agent is an AI-powered digital assistant designed to automate complex, multi-step business processes using natural language instructions.
Type of Agents in BC:
1. Built-in Microsoft Agents:
> Sales Order Agent
> Payables Agent
2. Custom Agents (Preview)
3. Power Platform / Copilot Studio
> They are built outside BC
What Custom Agent Can:
1) Data Operations
> Read Customers, Sales Orders, Vendors
> Filter records
2) Transactions
> Create Sales Order
> Approve Documents
3) Automation
> Run when a task is created
> Response to business events
> Execute multi-step workflows
Create Custom Agent:
Prerequisites:
Configure Copilot and agent capabilities. Click the Gear Icon and click Assisted Setup
Click Set up Copilot & agent capabilities
Agent Creation:
Step 1 : Click the Agent Icon in the Home Page.
Step2: Click Create Button.
Step3 : Click Create Agent From Scratch
Step4: Enter the Agent Name, Description, etc.
Step5 : Once entered, click > button to go to the next screen
Step 6: Configure agents by setting the instructions and the agent user permissions, Profile.
> Setup profile : It will show all the available roles and you can select any role from that.
> Click Manage Permissions and give all the permissions needed for that agent instructions.
> Edit Instructions will show the Rich text box in which we need to provide the instructions that the agent has to do.
For Example:
Prepare a report in Pdf for all the sales order with more than 20000.
Instructions:
Report — All sales open sales orders with more than 20k. To Do this :
- Get all open Sales Orders
- Filter By Balance Amount > 20000
- Prepare a Pdf
Step 7: Click the Home and Click Run Task
- This will lead to a Create Task Screen
- Enter the Title for the task and press OK.
Once the task is created. It will process step by step execution.
- Once all steps are completed, It will ask to review the results. Once you reviewed, the task set as Completed.
- You can download the pdf in the attachment section.
- Agents can run only when
> Task is created
> User triggers it
> A workflow/ extension creates a task
Limitations:
- From current BC 28.1 behaviour:
> Agents depend heavily on UI visibility
> They cannot access hidden fields
> Permissions often block execution
> Task-based execution is async (not instant)
