> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsoft Dynamics 365 integration

[Back to list of enterprise systems](https://koreai.mintlify.site/agent-platform/integrations/enterprise-systems.md)

Use the Microsoft Dynamics 365 Business Central integration to create, retrieve, update, delete, and search records, and to call Business Central API endpoints through Action Tools. It also provides a trigger for new or updated records.

| Authentication | Actions | Triggers |
| - | - | - |
| Client Credentials | ([6](#supported-actions)) | ([1](#triggers)) |

## Supported actions

| Action | Use it to |
| - | - |
| [Create Record](#create-record) | Creates a new record. |
| [Delete Record](#delete-record) | Deletes an existing record. |
| [Get Record](#get-record) | Retrieves the details of a record by it's ID. |
| [Update Record](#update-record) | Updates an existing record. |
| [Search Records](#search-records) | Retrieves a list of records. |
| [Custom API Call](#custom-api-call) | Make a custom API call to a specific endpoint |

## Triggers

| Trigger | Fires when |
| - | - |
| [New or Updated Record](#new-or-updated-record) | A record is added or modified in a selected company and record type. |

## Prerequisites

* A Microsoft Dynamics 365 Business Central environment with access to the companies and records your tools will use.
* An Entra ID application and Client Credentials profile with permission to access the Business Central API.

## Set up the integration

**1. Connect Business Central**

In **Integrations**, select **Microsoft Dynamics 365 Business Central** > **Connect**. Create a **Client Creds** integration profile with your Entra ID application details and authorize access to the Business Central environment.

**2. Create an action tool**

In **Tools**, select **New Tool** > **Action** > **Microsoft Dynamics 365 Business Central** > **Continue**. Select the action and auth profile, configure its inputs, and create the tool. Then [assign the tool to an agent](https://koreai.mintlify.site/agent-platform/tools/actions.md#assign-an-action-to-an-agent).

## Action reference

The parameters below include required and optional inputs shown in the Studio action builder. Dropdown choices are populated from the connected Business Central account where applicable.

> [accordion] Create Record
>
> | Parameter | Type | Required | Description |
> | - | - | - | - |
> | `company_id` | dropdown | Yes | Company to create the record in. |
> | `record_type` | dropdown | Yes | Record type to create. |
> | `record_fields` | object | Yes | Field names and values for the new record. |

> [accordion] Delete Record
>
> | Parameter | Type | Required | Description |
> | - | - | - | - |
> | `company_id` | dropdown | Yes | Company containing the record. |
> | `record_type` | dropdown | Yes | Record type. |
> | `record_id` | string | Yes | ID of the record to delete. |

> [accordion] Get Record
>
> | Parameter | Type | Required | Description |
> | - | - | - | - |
> | `company_id` | dropdown | Yes | Company containing the record. |
> | `record_type` | dropdown | Yes | Record type. |
> | `record_id` | string | Yes | ID of the record to retrieve. |

> [accordion] Update Record
>
> | Parameter | Type | Required | Description |
> | - | - | - | - |
> | `company_id` | dropdown | Yes | Company containing the record. |
> | `record_type` | dropdown | Yes | Record type. |
> | `record_id` | string | Yes | ID of the record to update. |
> | `record_fields` | object | Yes | Field names and values to update. |

> [accordion] Search Records
>
> | Parameter | Type | Required | Description |
> | - | - | - | - |
> | `company_id` | dropdown | Yes | Company to search. |
> | `record_type` | dropdown | Yes | Record type to search. |
> | `markdown` | string | No | Optional connector-provided parameter. |
> | `record_filter_fields` | object | Yes | Fields and values used to filter records. |

> [accordion] Custom API Call
>
> | Parameter | Type | Required | Description |
> | - | - | - | - |
> | `url` | object | Yes | API endpoint URL or path. |
> | `method` | dropdown | Yes | HTTP method. |
> | `headers` | object | Yes | Request headers. |
> | `queryParams` | object | Yes | Query string parameters. |
> | `body_type` | dropdown | No | Request body format. |
> | `body` | object | No | Request body. |
> | `response_is_binary` | boolean | No | Whether the response is binary. |
> | `failsafe` | boolean | No | Whether to return a failsafe response. |
> | `timeout` | number | No | Request timeout. |
> | `followRedirects` | boolean | No | Whether to follow redirects. |

## Trigger reference

> [accordion] New or Updated Record
>
> | Parameter | Type | Required | Description |
> | - | - | - | - |
> | `company_id` | dropdown | Yes | Business Central company to monitor. |
> | `record_type` | dropdown | Yes | Record type to monitor. Available choices: Bank Accounts, Contacts, Currencies, Customers, Dispute Status, Employees, Item Categories, Items, Item Variants, Journals, Locations, Payment Methods, Payment Terms, Projects, Sales Invoices, Sales Orders, Sales Quotes, Shipment Methods, Vendors. |

## Troubleshoot common issues

| Issue | Resolution |
| - | - |
| Authentication fails | Verify the Entra ID application details and confirm the Client Credentials profile has access to Business Central. |
| A company or record type is unavailable | Confirm the selected environment and company, then check that the connected application can access that company and record type. |
| An action cannot find or update a record | Verify the company, record type, record ID, and field names for the selected record. |
| A custom API call fails | Check the endpoint, HTTP method, headers, query parameters, and request body against the Business Central API. |

## Related articles

* [Auth profiles](https://koreai.mintlify.site/agent-platform/administration/integrations-settings.md#auth-profiles)
* [Action Tools](https://koreai.mintlify.site/agent-platform/tools/actions.md)
* [Microsoft Dynamics 365 Business Central documentation](https://learn.microsoft.com/dynamics365/business-central/)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.