Dynamics 365 Business Central
The Dynamics 365 Business Central connector lets you perform insert, delete, update, and read operations on Dynamics 365 Business Central Data.
Supported versions
This connector supports the following versions:
Before you begin
Before using the Dynamics365 connector, do the following tasks:
- In your Google Cloud project:
- Ensure that network connectivity is set up. For information about network patterns, see Network connectivity.
- Enable the following services:
secretmanager.googleapis.com
(Secret Manager API)connectors.googleapis.com
(Connectors API)
To understand how to enable services, see Enabling services.
If these services or permissions have not been enabled for your project previously, you are prompted to enable them when configuring the connector.
Configure the connector
A connection is specific to a data source. It means that if you have many data sources, you must create a separate connection for each data source. To create a connection, do the following:
- In the Cloud console, go to the Integration Connectors > Connections page and then select or create a Google Cloud project.
- Click + Create new to open the Create Connection page.
- In the Location section, choose the location for the connection.
- Region: Select a location from the drop-down list.
Supported regions for connectors include:
For the list of all the supported regions, see Locations.
- Click Next.
- Region: Select a location from the drop-down list.
- In the Connection Details section, complete the following:
- Connector: Select Dynamics 365 Business Central from the drop down list of available Connectors.
- Connector version: Select the Connector version from the drop down list of available versions.
- In the Connection Name field, enter a name for the Connection instance.
Connection names must meet the following criteria:
- Connection names can use letters, numbers, or hyphens.
- Letters must be lower-case.
- Connection names must begin with a letter and end with a letter or number.
- Connection names cannot exceed 49 characters.
- Optionally, enter a Description for the connection instance.
- Optionally, enable Cloud logging,
and then select a log level. By default, the log level is set to
Error
. - Service Account: Select a service account that has the required roles.
- (Optional) Configure the Connection node settings.
- Minimum number of nodes: Enter the minimum number of connection nodes.
- Maximum number of nodes: Enter the maximum number of connection nodes.
- Azure Tenant: Specify the Microsoft Online tenant being used to access data. If not specified, your default tenant will be used.
- Company: Specify the company name that you have set up in Dynamics 365. You can find this information in the Company Information page on Dynamics 365 Business Central.
- Endpoint type: Specify the type of endpoint the OrganizationUrl must resolve to.
- Include Navigation Properties: Specify whether the column listing must include navigation properties. Navigation properties provide a way to navigate an association between two entity types.
- Use Sandbox: Specify whether a sandbox is used.
- User Defined Views: Specify a filepath to a JSON configuration file that defines custom views.
- Click + Add label to add a label to the Connection in the form of a key/value pair.
- (Optional) If you want to use SSL, select Enable SSL. This displays the SSL configuration details.
- Select a trust store type. It can be either Public, Private, or Insecure Connection.
- Select the certificates as displayed based on your trust store selection.
- If you are using mTLS, select the key store certificates in the Key Store section.
- Click Next.
A node is a unit (or replica) of a connection that processes transactions. More nodes are required to process more transactions for a connection and conversely, fewer nodes are required to process fewer transactions. To understand how the nodes affect your connector pricing, see Pricing for connection nodes. If you don't enter any values, by default the minimum nodes are set to 2 (for better availability) and the maximum nodes are set to 50.
- Select an Authentication type and enter the relevant details.
The following authentication types are supported by the Dynamics 365 Business Central connection:
- Access Key
- OAuth 2.0 - Client credentials
- Azure AD
- Click Next.
To understand how to configure these authentication types, see Configure authentication.
Configure authentication
Enter the details based on the authentication you want to use.
-
Access Key
- Username: Specify the username of the Dynamics 365 OnPremise account used to authenticate to the Microsoft Dynamics 365 Business Central server.
- Password:Select secret containing the password of the Dynamics 365 OnPremise account.
- Secret version: Select the version of the secret.
- Access Key: Specify the access key used to authenticate to Microsoft Dynamics 365 Business Central.
-
OAuth 2.0 Client Credentials
- Client ID: Specify the client ID of the app you created.
- Client Secret: Specify the Secret Manager Secret containing the client secret for the connected app you created.
- Secret version: The version of the client secret.
- Client ID: Specify the client ID used for requesting access tokens. This can be found in the overview of the connected app created in the Azure portal.
- Scope:Specify a comma-separated list of desired scopes.
- Client Secret: Specify the Secret Manager Secret containing the account access key.
- Authorization URL: Enter the authorization URL generated when creating the client.
Connection configuration samples
This section lists the sample values for the various fields that you configure when creating the connection.
OAuth 2.0 - Client credentials connection type
Field name | Details |
---|---|
Location | europe-west1 |
Connector | Dynamics365BusinessCentral |
Connector version | 1 |
Connection Name | dynamics-businesscentral-conn |
Enable Cloud Logging | Yes |
Service Account | SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com |
Azure Tenant | c9f472d9-7d8a-44cf-8ee0-458d32e26bce |
Company | Organization_Name |
Minimum number of nodes | 2 |
Maximum number of nodes | 50 |
Organization URL | https://api.businesscentral.dynamics.com/v2.0/c9f472d9-7d8a-44cf-8ee0-458d32e26bce/production/api/v2.0 |
Authentication | OAuth 2.0 - Client credentials |
Client ID | fd04bae4-c30c-4faf-bbae-9263d4d96d61 |
Client Secret | projects/617888503870/secrets/businesscentral-client-secret |
Secret version | 1 |
Access key connection type
Field name | Details |
---|---|
Location | europe-west1 |
Connector | Dynamics365BusinessCentral |
Connector version | 1 |
Connection Name | dynamics-businesscentral-on-prem-conn |
Enable Cloud Logging | Yes |
Service Account | SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com |
Azure Tenant | BC250 |
Company | Altostart Ltd. |
Minimum number of nodes | 2 |
Maximum number of nodes | 50 |
Organization URL | http://10.128.0.78:7059/BC250/ODataV4 |
Authentication | Access Key |
Username | businesscentral |
Password | PASSWORD |
Secret version | 1 |
Access Key | OQq9qggeWxt9iZPSWrs8wgfNjsAq06PT2uls7Luhbp8= |
Secret version | 1 |
For information about how to create a Dynamics 365 Business Central Workspace, see Welcome to Dynamics 365 Business Central.
For information about the Dynamics 365 Business Central API, see Dynamics365BusinessCentral API Reference.
System limitations
The Dynamics 365 Business Central connector can process a maximum of 25 transactions per second, per node, and throttles any transactions beyond this limit. By default, Integration Connectors allocates 2 nodes (for better availability) for a connection.
For information on the limits applicable to Integration Connectors, see Limits.
Use the Dynamics 365 Business Central connection in an integration
After you create the connection, it becomes available in both Apigee Integration and Application Integration. You can use the connection in an integration through the Connectors task.
- To understand how to create and use the Connectors task in Apigee Integration, see Connectors task.
- To understand how to create and use the Connectors task in Application Integration, see Connectors task.
Entity operation examples
This section shows how to perform some of the entity operations in this connector.
Example - List all sales orders
- In the
Configure connector task
dialog, clickEntities
. - Select
salesOrders
from theEntity
list. - Select the
List
operation, and then click Done. - In the Task Input section of the Connectors task, you can set the filterClause.
You must use single quotes (') to enclose the value for a filter clause. You can use the filter clause to filter records based on the columns.
Example - Get a sales order
- In the
Configure connector task
dialog, clickEntities
. - Select
salesOrders
from theEntity
list. - Select the
Get
operation, and then click Done. - Set the entity ID to "841c04f9-3391-ef11-8a6b-002248d4e29e", which is the key to be passed. To set the entity ID, in
the Data Mapper section of the Data Mapping, click Open Data Mapping Editor and
then enter
"841c04f9-3391-ef11-8a6b-002248d4e29e"
in the Input Value field and choose the EntityId as the local variable.Value for Entity Id should be passed directly, such as "841c04f9-3391-ef11-8a6b-002248d4e29e". Here, "841c04f9-3391-ef11-8a6b-002248d4e29e" is the unique primary key value.
If passing a single Entity ID throws an error due to the presence of two composite keys, you can use the filter clause to pass the value.
Example - Delete a sales order
- In the
Configure connector task
dialog, clickEntities
. - Select
salesOrders
from theEntity
list. - Select the
DELETE
operation, and then click Done. - Set the entity ID to "841c04f9-3391-ef11-8a6b-002248d4e29e", which is the key to be passed. To set the entity ID, in
the Data Mapper section of the Data Mapping, click Open Data Mapping Editor and
then enter
"841c04f9-3391-ef11-8a6b-002248d4e29e"
in the Input Value field and choose the EntityId as the local variable.If the entity has two composite business or primary keys instead of specifying the entityId, you can also set the filterClause to
id='841c04f9-3391-ef11-8a6b-002248d4e29e'
.
Example - Create a sales order
- In the
Configure connector task
dialog, clickEntities
. - Select
salesOrders
from theEntity
list. - Select the
Create
operation, and then click Done. - In the Data Mapper section of the Data Mapping task, click
Open Data Mapping Editor
and then enter a value similar to the following in theInput Value
field and choose the EntityId/ConnectorInputPayload as the local variable.{ "orderDate": "2024-10-30", "customerNumber": "10000", "currencyCode": "INR", "paymentTermsId": "590d75c5-f26e-ef11-a678-6045bdc89b07" }
If the integration is successful, the
salesOrders
task'sconnectorOutputPayload
response parameter will have a value similar to the following:{ "id": "2e048d8a-a796-ef11-8a6b-6045bdae882d" }
Example - Create a sales order line
- In the
Configure connector task
dialog, clickEntities
. - Select
salesOrderLines
from theEntity
list. - Select the
Create
operation, and then click Done. - In the Data Mapper section of the Data Mapping task, click
Open Data Mapping Editor
and then enter a value similar to the following in theInput Value
field and choose the EntityId/ConnectorInputPayload as the local variable.{ "documentId": "b747cc93-c37f-ef11-ac23-7c1e523b4365", "sequence": 10014, "itemId": "8b0f75c5-f26e-ef11-a678-6045bdc89b07", "lineType": "Item", "lineObjectNumber": "1996-S" }
If the integration is successful, the
salesOrderLines
task'sconnectorOutputPayload
response parameter will have a value similar to the following:{ "id": "35535130-d09d-ef11-8a6b-002248d4cc93" }
Example - Create a sales quote
- In the
Configure connector task
dialog, clickEntities
. - Select
salesQuotes
from theEntity
list. - Select the
Create
operation, and then click Done. - In the Data Mapper section of the Data Mapping task, click
Open Data Mapping Editor
and then enter a value similar to the following in theInput Value
field and choose the EntityId/ConnectorInputPayload as the local variable.{ "paymentTermsId": "590d75c5-f26e-ef11-a678-6045bdc89b07", "currencyCode": "INR", "customerNumber": "30000" }
If the integration is successful, the
salesQuotes
task'sconnectorOutputPayload
response parameter will have a value similar to the following:{ "id": "2116bd4e-3ba3-ef11-8a6b-6045bdacfb5e" }
Example - Create a purchase order
- In the
Configure connector task
dialog, clickEntities
. - Select
purchaseOrders
from theEntity
list. - Select the
Create
operation, and then click Done. - In the Data Mapper section of the Data Mapping task, click
Open Data Mapping Editor
and then enter a value similar to the following in theInput Value
field and choose the EntityId/ConnectorInputPayload as the local variable.{ "vendorId": "7e0f75c5-f26e-ef11-a678-6045bdc89b07", "vendorNumber": "10000" }
If the integration is successful, the
purchaseOrders
task'sconnectorOutputPayload
response parameter will have a value similar to the following:{ "id": "53389ee7-a796-ef11-8a6b-6045bdae882d" }
Example - Create an item
- In the
Configure connector task
dialog, clickEntities
. - Select
items
from theEntity
list. - Select the
Create
operation, and then click Done. - In the Data Mapper section of the Data Mapping task, click
Open Data Mapping Editor
and then enter a value similar to the following in theInput Value
field and choose the EntityId/ConnectorInputPayload as the local variable.{ "number": "4000-D", "displayName": "Charlie Altostrat", "type": "Inventory", "itemCategoryId": "d61672cb-f26e-ef11-a678-6045bdc89b07", "baseUnitOfMeasureCode": "PCS" }
If the integration is successful, the
items
task'sconnectorOutputPayload
response parameter will have a value similar to the following:{ "id": "fad09437-8d9e-ef11-8a6b-000d3af0e092" }
Example - Update a sales order
- In the
Configure connector task
dialog, clickEntities
. - Select
salesOrders
from theEntity
list. - Select the
Update
operation, and then click Done. - In the Data Mapper section of the Data Mapping task, click
Open Data Mapping Editor
and then enter a value similar to the following in theInput Value
field and choose the EntityId/ConnectorInputPayload/FilterClause as the local variable.{ "phoneNumber": "7764872993" }
- Set the entity ID in Data Mapper to the entity of the salesOrders. To set the entity ID, click
Open Data Mapping Editor
and then enter a value similar to the following in theInput Value
field and choose the EntityId/ConnectorInputPayload/FilterClause as the local variable.Instead of specifying the entityId, you can also set the filterClause to
id ='5e9226d3-1c7b-ef11-a671-6045bdaef76c'
.
Example - Update a sales order line
- In the
Configure connector task
dialog, clickEntities
. - Select
salesOrderLines
from theEntity
list. - Select the
Update
operation, and then click Done. - In the Data Mapper section of the Data Mapping task, click
Open Data Mapping Editor
and then enter a value similar to the following in theInput Value
field and choose the EntityId/ConnectorInputPayload/FilterClause as the local variable.{ "description": "Test from Altostrat" }
- Set the entity ID in Data Mapper to the entity of the salesOrderLines To set the entity ID, click
Open Data Mapping Editor
and then enter a value similar to the following in theInput Value
field and choose the EntityId/ConnectorInputPayload/FilterClause as the local variable.Instead of specifying the entityId, you can also set the filterClause to
id ='35535130-d09d-ef11-8a6b-002248d4cc93'
.
Example - Update a sales quote
- In the
Configure connector task
dialog, clickEntities
. - Select
salesQuotes
from theEntity
list. - Select the
Update
operation, and then click Done. - In the Data Mapper section of the Data Mapping task, click
Open Data Mapping Editor
and then enter a value similar to the following in theInput Value
field and choose the EntityId/ConnectorInputPayload/FilterClause as the local variable.{ "currencyCode": "USD" }
- Set the entity ID in Data Mapper to the entity of the salesQuotes To set the entity ID, click
Open Data Mapping Editor
and then enter a value similar to the following in theInput Value
field and choose the EntityId/ConnectorInputPayload/FilterClause as the local variable.Instead of specifying the entityId, you can also set the filterClause to
id='2116bd4e-3ba3-ef11-8a6b-6045bdacfb5e'
.
Example - Update a purchase order
- In the
Configure connector task
dialog, clickEntities
. - Select
purchaseOrders
from theEntity
list. - Select the
Update
operation, and then click Done. - In the Data Mapper section of the Data Mapping task, click
Open Data Mapping Editor
and then enter a value similar to the following in theInput Value
field and choose the EntityId/ConnectorInputPayload/FilterClause as the local variable.{ "shipToName": "Charlie Cruz" }
- Set the entity ID in Data Mapper to the entity of the purchaseOrders To set the entity ID, click
Open Data Mapping Editor
and then enter a value similar to the following in theInput Value
field and choose the EntityId/ConnectorInputPayload/FilterClause as the local variable.Instead of specifying the entityId, you can also set the filterClause to
id ='6b88738e-3891-ef11-8a6b-002248d4e29e'
.
Example - Update an item
- In the
Configure connector task
dialog, clickEntities
. - Select
items
from theEntity
list. - Select the
Update
operation, and then click Done. - In the Data Mapper section of the Data Mapping task, click
Open Data Mapping Editor
and then enter a value similar to the following in theInput Value
field and choose the EntityId/ConnectorInputPayload/FilterClause as the local variable.{ "displayName": "Updates Altostrat name" }
- Set the entity ID in Data Mapper to the entity of the items To set the entity ID, click
Open Data Mapping Editor
and then enter a value similar to the following in theInput Value
field and choose the EntityId/ConnectorInputPayload/FilterClause as the local variable.Instead of specifying the entityId, you can also set the filterClause to
id ='fad09437-8d9e-ef11-8a6b-000d3af0e092'
.
Get help from the Google Cloud community
You can post your questions and discuss this connector in the Google Cloud community at Cloud Forums.What's next
- Understand how to suspend and resume a connection.
- Understand how to monitor connector usage.
- Understand how to view connector logs.