Sync for Dynamics 365 Business Central
Sync for Dynamics 365 Business Central
Description
Sync for Dynamics 365 Business Central provides seamless synchronization between your WooCommerce store and Dynamics 365 Business Central ERP system. This powerful plugin helps you manage your business operations efficiently by keeping your e-commerce and ERP data in perfect sync.
Key Features
- OAuth 2.0 Authentication: Secure authentication using Microsoft Azure AD
- API Integration: Connect to Dynamics 365 Business Central API
- Comprehensive Logging: Detailed logs with status tracking
- HPOS Compatible: Fully compatible with WooCommerce High-Performance Order Storage
Authentication
The plugin uses the OAuth 2.0 client credentials flow to authenticate with Dynamics 365 Business Central, following Microsoft’s documented service-to-service authentication approach.
OAuth2 Implementation:
– Implemented with the WordPress HTTP API; no third-party HTTP libraries are bundled
– Client credentials flow for server-to-server authentication
– Automatic token caching and refresh
– Token expiration handling with 5-minute safety buffer
– Secure token storage in WordPress options
– Automatic retry on 401 Unauthorized errors
Required Azure AD Configuration:
– Azure AD Tenant ID
– Azure AD Application (Client) ID
– Azure AD Application Client Secret
– Proper API permissions for Dynamics 365 Business Central
References:
– https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/automation-apis-using-s2s-authentication
– https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/
Requirements
- WordPress 6.2+
- WooCommerce 5.0+ (HPOS supported); tested up to WooCommerce 10.9.4
- PHP 7.4+ (tested up to PHP 8.3)
- Dynamics 365 Business Central instance with API access
- Azure AD App Registration with appropriate permissions
HPOS Compatibility
This plugin is fully compatible with WooCommerce’s High-Performance Order Storage (HPOS) feature.
HPOS Support:
* ✅ Fully compatible with HPOS-enabled stores
* ✅ Works with traditional post-based order storage
* ✅ Automatic detection of HPOS status
* ✅ Seamless migration support
* ✅ No data loss during HPOS migration
Pricing
The plugin itself is free and open source. Syncing with Dynamics 365 Business
Central additionally requires an ERP7 subscription from Techmarbles, priced at
USD 20 per month.
The subscription covers access to the ERP7 sync service and the Techmarbles
API-setup extension for Business Central. You also need your own Microsoft
Dynamics 365 Business Central tenant, which is licensed separately by Microsoft
and is not included.
Details and sign-up: https://techmarbles.com/products/
Terms and conditions: https://techmarbles.com/terms-conditions/
Privacy policy: https://techmarbles.com/privacy-policy/
External services
This plugin connects your WooCommerce store to Microsoft Dynamics 365 Business Central so that
products, customers, orders and inventory can be kept in sync with your own Business Central
tenant. The plugin is not usable without such a tenant, which you provide, and an ERP7
subscription from Techmarbles (see the Pricing section above).
Nothing is transmitted until you enter your own Azure AD and Business Central credentials and
switch on the sync options you want. Each category below is sent only if you enable that sync.
Microsoft Azure AD (Microsoft Entra ID)
Used to obtain and refresh the OAuth 2.0 access token that authorises every request to Business
Central. The plugin sends your Azure AD tenant ID, client ID and client secret to
login.microsoftonline.com to request a token. This happens the first time the plugin contacts
Business Central, and again each time the token expires.
This service is provided by Microsoft: terms of use https://www.microsoft.com/licensing/terms/ ,
privacy policy https://privacy.microsoft.com/privacystatement .
Microsoft Dynamics 365 Business Central
Your store data is sent to api.businesscentral.dynamics.com so it can be created and updated in
your Business Central company. The plugin sends:
- Products – item number, product name, price, stock quantity and unit of measure. Sent when a
product is published, edited, ordered, or included in a bulk or automatic sync, depending on
which triggers you enable. - Customers – name, email address, billing address (address lines, city, state, postal code,
country), phone number and company. Sent when an order is synced or a customer account is
created or updated. Shipping details are used as a fallback when billing details are absent. - Orders – order number, line items (item reference, quantity, unit price), shipping cost, tax
totals, currency, payment terms and any order notes you choose to sync. Sent when an order
reaches a status you have configured for syncing. - Inventory – stock quantities per product and per variation.
The plugin also reads product, price, inventory and sales order records back from Business
Central when the corresponding import options are enabled.
This service is provided by Microsoft: terms of use https://www.microsoft.com/licensing/terms/ ,
privacy policy https://privacy.microsoft.com/privacystatement .
Configuration
API Settings
- Enter your Dynamics 365 Business Central API URL
- Enter your Azure AD Tenant ID
- Enter your Azure AD Application (Client) ID
- Enter your Azure AD Application Client Secret
- Select your environment (Production or Sandbox)
- Test the connection
Azure AD Setup
To use this plugin, you need to register an application in Azure AD:
- Go to Azure Portal > Azure Active Directory > App registrations
- Create a new registration
- Note the Application (client) ID and Directory (tenant) ID
- Create a client secret in Certificates & secrets
- Grant API permissions for Dynamics 365 Business Central
Support
For support, feature requests, or bug reports, please contact Techmarbles via the website.
Documentation
Detailed documentation: https://techmarbles.com/products/
Contributing
This plugin is open source. Contributions are welcome.
License
This plugin is free software, licensed under the GPL-2.0-or-later. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. See the License URI above for details. © Techmarbles.
Installation
- In WordPress go to Plugins > Add New, search for “Sync for Dynamics 365 Business Central”,
and click Install Now. Alternatively, upload the plugin ZIP via Plugins > Add New > Upload Plugin. - Activate the plugin through the ‘Plugins’ screen in WordPress
- Make sure WooCommerce is installed and activated
- Go to WooCommerce > D365 Integration to configure the plugin
- Enter your Dynamics 365 Business Central API credentials and configure settings
- Install the Business Central companion extension, available from
https://techmarbles.com/products/ – the plugin shows a setup banner with the steps
The plugin has no third-party dependencies to install; all HTTP requests use the
WordPress HTTP API.
Faq
This plugin is compatible with Dynamics 365 Business Central API v2.0 and later versions.
You need to register an application in Azure AD and grant it permissions to access Dynamics 365 Business Central API. See the Configuration section for details.
The plugin uses the OAuth 2.0 client credentials flow (application permissions) for server-to-server authentication against Microsoft Entra ID, including token caching, automatic refresh, and error handling.
Reference: https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/automation-apis-using-s2s-authentication
Yes, all API communications use HTTPS with OAuth 2.0 token-based authentication.
Reviews
Changelog
1.0.0
- Initial release.
- OAuth 2.0 authentication with Azure AD (client-credentials); automatic token caching, refresh, and expiry handling.
- Connection test and token-status display in settings.
- Sync products and variations to Business Central items, including per-variant inventory.
- Sync customers from orders and accounts, with billing-detail preference, duplicate detection, and payment term/method mapping.
- Push orders as Business Central sales orders, then post to a linked Invoice + Shipment.
- Sync order notes into the Business Central order comments.
- Automatic Product Sync with selectable frequency (15 minutes / hourly / twice daily / daily).
- Bulk sync with per-product selection.
- Guided setup for the Techmarbles API-setup Business Central extension, with a first-run install banner.
- One-click creation of Business Central Configuration Templates, with posting groups and units of measure loaded from Business Central.
- WooCommerce System Status Report panel; never exposes the client secret or access token.
- Shopify-style save bar (Save on edit, Discard, saved confirmation) and clearer settings labels/tooltips.
- Comprehensive logging.
- WooCommerce HPOS (High-Performance Order Storage) compatible.
- Webhook notifications from Business Central are queued and retried, so a temporary connection problem does not discard them.
- Duplicate-sync protection prevents the same order being sent to Business Central twice, including after a retry.
- Connection problems are recorded separately from sync errors, so the dashboard health figures reflect genuine failures.
- Stock imported from Business Central is not exported straight back, so inventory does not loop between the two systems.
- Uninstall removes all options, metadata and the plugin’s log table.
- WordPress Plugin Check compliant: all output escaped, every database query prepared, and debug logging gated behind WP_DEBUG.
- Requires WordPress 6.2 or later and PHP 7.4 or later; tested up to WordPress 7.1.