Integrate WooCommerce and Dynamics 365 Business Central (BC) using a combination of bulk and scheduled processes to keep your BC and WooCommerce data in sync. These templates are a two-way integration solution, allowing data to flow in both directions between the two systems. You are not required to use all of the templates provided and can decide which components meet your needs and adapt them to your specific scenario. The integration includes the following record types:
- BC Items and WooCommerce Products
- BC Customers and WooCommerce Customers
- BC Sales Invoices and WooCommerce Orders
- BC Sales Credit Memos and WooCommerce Refunds
The following integration processes are available in these templates and can be used as downloaded or as a starting point to customize further:
- WOO CUSTOMERS TO BC
- WOO PRODUCTS TO BC
- WOO ORDERS TO BC
- WOO REFUNDS TO BC
- BC ITEMS TO WOO
- BC ITEM INVENTORY TO WOO
- BC CREDIT MEMOS TO WOO
Multiple Stores
These templates are configured for one WooCommerce Store and can be modified to integrate with multiple WooCommerce Stores. Each WooCommerce Store will require a separate Connection and a copy of each integration used.
These templates do require that the latest version of the WooCommerce Connection is installed and setup within SmartConnect.com. The WooCommerce Connection is included in the download file with these templates.
For every integration, a bulk version and ongoing/change option is available. The set of bulk maps is intended for an initial synchronization of the data between the two systems. After the initial bulk maps are run, the ongoing/change maps are designed to be scheduled as an ongoing process to keep the two systems in sync.
All the mappings can be modified and configured to meet your specific needs after they are imported to SmartConnect. Feel free to add additional fields or logic required.
The definition of the WooCommerce REST Connection focuses on four Resources in WooCommerce: Customers, Orders, Refunds, and Products. The existing endpoint definitions can be modified and new endpoints can be defined using the WooCommerce API documentation.
Prerequisites:
- SmartConnect.com subscription
- Configured Business Central Odata Connection
- SmartConnect eCommerce Extension
- WooCommerce website
Files Included:
- WooCommerce REST Definition
- A unique integration file for each integration process (11 total)
The process for integrating WooCommerce and Microsoft Dynamics 365 Business Central:
- Install the eOne Solutions SmartConnect eCommerce Extension
- Import and customize the Connection methods. The WooCommerce API will have fields related to authorization and access that are specific to your system.
- Configure the Business Central Odata Connection
- Import and Configure the WooCommerce – Microsoft Dynamics 365 Business Central Maps.
- Run bulk maps to synchronize historical data and set up ongoing maps to keep the systems in sync.
This integration will work with Online, On-premise, and hosted Business Central deployments.
Some of the integrations will require customizations to Business Central to hold unique identifiers from WooCommerce. Documentation of the extension components can be found here.
The .app file included in the downloaded zip folder will make the changes required. You can choose to either install the extension directly into your system, or you can use the code located here to create your own extension with the needed components.
The extension will automatically publish the below web services for use by the integrations:
Object Type | Object Id | Service Name | Custom |
Page | 30 | ItemCard | False |
Page | 21 | CustomerCard | False |
Page | 43 | SalesInvoice | False |
Page | 44 | SalesCreditMemo | False |
Page | 132 | PostedSalesInvoice | False |
Page | 5733 | ItemCategoryCard | False |
Page | 63000 | SCShippingAddress | True |
Query | 63000 | SCCreditMemosQuery | True |
Guest Checkouts
If your WooCommerce website allows guest checkouts, then you will need to decide how to handle them. This sample integration scenario requires you to manually create a new Customer with a No of “WC0”. Then all Orders that aren’t assigned to an existing customer will automatically be assigned to this customer.
Multiple Stores
If you need to integrate with multiple WooCommerce stores, you will need to add a second WooCommerce Connection that points to the other WooCommerce website base URL. This will allow you to integrate multiple WooCommerce Stores with one or more Business Central companies.
Filtering WooCommerce Sources
To add filters to WooCommerce data sources, you will need to modify the parameters on the Service Entity used by the Data Source. You can modify these by going to SmartConnect > Maintenance > REST Services > WooCommerce > Service Entities > “Your Service Entity” > Parameters
Check the WooCommerce documentation for a list of available query parameters.
Import and setup the connection and integration processes
Install the SmartConnect eCommerce Extension
The first step is to install the “eOne Solutions_SmartConnect eCommerce Extension_1.0.0.1.app” as an extension in Business Central using the steps outlined here.
Importing WooCommerce REST methods
The REST settings define how SmartConnect.com makes calls to the WooCommerce API. After the methods are imported, the Connection needs to be added.
Steps to Import
- Click on the “Maintenance” tab within SmartConnect.com
- Click the “REST Services” button within the REST Connection section
- Click the “Import REST Service” button at the top-right section
- Browse to and select the “WooCommerce_1.0.0.0.json” file for the import
- Click the “Process Import” button to bring in the definition
Configuring the WooCommerce Connection
- Click on the “Connections” tab within SmartConnect.com
- Click on the “Create Connection” button
- Select the WooCommerce option from the list
- Follow the steps outlined in the Instructions section of the connection
- Click Save to complete the connection
Configuring the Microsoft Dynamics 365 Business Central Odata Connection
- Click on the “Connections” tab within SmartConnect.com
- Click on the “Create Connection” button
- Select the “Dynamics 365 Business Central Odata” option from the list
- Configure the connection
- Click Save to complete the connection
Setup the Global Variables
There are 2 global variables included in the integration. Before importing the maps, create the two variables.
- Click Maintenance > Global Variables > Create Global Variables
- Create the two variables shown below.
Importing the SmartConnect Maps
- Click on the “System” tab within SmartConnect
- Click the “Import” button within the SmartConnect Maintenance section
- Select each integration file and import its contents
Running Maps
It is likely all the integrations included are not required for your scenario. Below are two possible deployment options.
Existing WooCommerce to new BC deployment
If the BC deployment is new and you just need to import starting Items, Customers, and orders then the processes can be run in this order:
- BULK WOO CUSTOMERS TO BC
- BULK WOO PRODUCTS TO BC
- BULK WOO ORDERS TO BC
- ONGOING WOO CUSTOMERS TO BC
- ONGOING WOO PRODUCTS TO BC
- ONGOING COMPLETED WOO ORDERS TO BC
- ONGOING WOO REFUNDS TO BC CREDIT MEMOS
Existing BC to new WooCommerce deployment
If setting up a new WooCommerce store with items from BC you can run the processes in this order:
- BULK BC ITEMS TO WOO
- ONGOING WOO CUSTOMERS TO BC
- ONGOING COMPLETED WOO ORDERS TO BC
- ONGOING WOO REFUNDS TO BC CREDIT MEMOS