Microsoft Dynamics 365 Business Central

You can install a 30-day free trial of this connector from the Snowflake Marketplace.

Prerequisites

You will need to use Business Central to create a Connect app. This allows point-to-point connection between Dynamics 365 Business Central and Omnata Sync for Snowflake via a REST API to interchange data. Learn more at Microsoft Docs for Business Central API (v2.0)

Authentication

OAuth (Microsoft Entra ID)

Visit the Microsoft Docs for Setting up Microsoft Entra ID based authentication for Business Central.

Configure Business Central

  • Register the application in Business Central: In Business Central, navigate to "Microsoft Entra Applications" and register the application you created in Microsoft Entra ID. Assign the necessary permissions to this application

Entra ID Application Permissions

Configure API permissions: After registering, go to "API permissions" and add the following permissions for Business Central.

API Application:

  • API.ReadWrite.All

  • app_access

API Delegated:

  • Financials.ReadWrite.All

  • user_impersonation

Setting up a new connection

When setting up a new connection you have 2 options for authentication:

  • OAuth (Microsoft Entra)

  • OAuth (Plugin managed tokens)

Tokens need to be refreshed every 60 minutes. If your sync is going to take longer than 60 minutes, you will need to use the Plugin managed tokens option.

Items you will need to setup a connection:

  • Client ID

  • Client Secret

  • Tenant ID

  • Environment (eg Production)

If you plan to use a Custom API (optional), you will need to supply these additional details for the connection:

  • Custom API Publisher

  • Custom API Group

  • Custom API Version

Inbound Syncs

Supported endpoints

The connector will fetch all available streams for each endpoint:

  • API (v2.0)

  • OData Web Services

  • Custom APIs (aka. 'Advanced APIs' in PowerBI)

Unsupported Endpoints

The following endpoints are currently not supported

  • timeRegistrationEntries

  • subscriptions

  • picture

  • documentAttachment

  • pdfDocument

Optimizing performance

Fort large initial syncs, grouping objects into dedicated sync can help to improve performance:

  • General

  • Accounts

  • Customers

  • Sales

  • Purchases

  • General Ledger

  • Fixed Assets


Using a Custom Storage Location

It is recommended that you use customise the Omnata Sync Storage Location so your projects can easily access the data as necessary. The following are the recommended properties to use for the storage location:

Raw Tables
Normalized Views

Database Name

SOURCE_DATA_LOAD

SOURCE_DATA_LOAD

Schema Name

BUSINESS_CENTRAL_RAW

BUSINESS_CENTRAL

Table Name

{{stream_name}}

{{stream_name}}

It is important that the Omnata Sync Engine native application has the correct permissions to create tables in the database(s) and schema(s) you specify. The following is an example of the permissions required for the above storage location:

Capturing deletes

Webhooks is the way to get notified if an entity changes in Business Central and is the only way to get notified about deletes. Unfortunately, Snowflake doesn't currently provide the ability to use webhooks, therefore alternative strategies are required.

We recommend you use the Inbound Sync Strategy "Full Refresh" for the following entities instead:

  • accounts

  • companies

  • company_information

  • countries_regions

  • currencies

  • employees

  • payment_methods

  • payment_terms

  • tax_areas

  • tax_groups

  • units_of_measure

  • vendors

Secondary full-refresh schedule

An alternative method to capture deletes.

If you wish use the "Incremental Refresh" strategy, you can set an additional schedule when you would like a full refresh to occur by running the following Omnata stored procedure in Snowflake. This will enable eventual consistency of the reference data.

Functions

There are two direct query options available for Business Central which allows you to query the data directly in Snowflake worksheets and notebooks.

api/v2.0

This is the recommended direct query type for Business Central. It allows you to query the Business Central API directly.

Parameter
Description

connection_slug

The connection slug you have setup for Business Central

company_id

The company id you wish to query

entity_name

The name of the entity you wish to query

fields

List of fields names to return

filter

List of filter expressions to apply

expansions

List of child entities to return with the results

Count Records

To get a count of the total number of records available in a given entity, you can use the following user defined function

Parameter
Description

connection_slug

The connection slug you have setup for Business Central

company_id

The company id you wish to query

entity_name

The name of the entity you wish to query

filter

List of filter expressions to apply

Custom Endpoints

If you need to query a custom endpoint, you can use the following stored procedure to do so:

Parameter
Description

connection_slug

The connection slug you have setup for Business Central

company_id

The company id you wish to query

entity_name

The name of the entity you wish to query

fields

List of fields names to return

filter

List of filter expressions to apply

expansions

List of child entities to return with the results

Companies

To get a list of companies you can query, you can use the following stored procedure:

Parameter
Description

connection_slug

The connection slug you have setup for Business Central

Outbound Syncs

Outbound syncs are not supported for Business Central.

Last updated