How to Sync Product Categories from Business Central to WooCommerce with Power Automate

Integration Guide

Syncing Product Categories from
Business Central to WooCommerce

How to keep BC Item Categories and WooCommerce Product Categories aligned, and automate category assignment during your product sync.

You’ve connected Business Central to WooCommerce. Products are syncing. But they’re all landing in WooCommerce without categories, or in the wrong ones. Your shop’s navigation is a mess, and customers can’t find anything. Let’s sort this out.

This guide explains how product categories work in both systems, how to map them to each other, and how to build a Power Automate flow that keeps categories in sync alongside your product data.

How Categories Work in Each System

Before syncing anything, it helps to understand how each platform handles product organization. They’re similar in concept but different in structure.

Business Central: Item Categories

  • Flat or hierarchical (each category can have a Parent Category)
  • Each item belongs to exactly one Item Category
  • Has a Code (short ID like “CHAIRS”) and a Description (“Office Chairs”)
  • Accessible via the BC connector’s “Find records (V3)” action on the itemCategories table

WooCommerce: Product Categories

  • Also hierarchical (parent/child relationships)
  • A product can belong to multiple categories
  • Has a name, slug (URL-friendly), and optional parent
  • Drives your store’s navigation, filtering, and URL structure

The Mapping Challenge

The core challenge is straightforward: you need a reliable way to match BC Item Category Codes to WooCommerce Product Category IDs. There are two common approaches:

Option A: Mirror categories 1:1

Create a WooCommerce Product Category for every BC Item Category, keeping the names and hierarchy identical. This is the simplest approach and works well when your BC category structure is already customer-friendly.

Option B: Custom mapping table

If your BC categories are internal-facing (codes like “RAW-MAT”, “FIN-GOODS”) and your store needs consumer-friendly names (“Raw Materials”, “Finished Products”), maintain a mapping in a SharePoint list, Dataverse table, or Excel file in OneDrive.

Recommended

Strategy 1: Automated Category Sync Flow

The most robust solution is a dedicated Power Automate flow that syncs your BC Item Categories to WooCommerce Product Categories before your product sync runs. This way, all the categories already exist in WooCommerce when products are assigned to them.

Dynamics 365 Business Central

Step 1: Fetch BC Item Categories

Use the “Find records (V3)” action from the Business Central connector. Configure it to query the item categories table:

  • Table name: itemCategories
  • Select columns: code,description,parentCategory

This returns all item categories with their codes, display names, and parent relationships. A category like “Chairs” would come back with its code (e.g., CHAIRS), its description, and its parent category code (e.g., FURNITURE). Top-level categories have an empty parent value.

WooCommerce (Power Automate for WooCommerce)

Step 2: Fetch Existing WooCommerce Categories

Use the “Find a list of the selected item type” action from the WooCommerce connector. Set the resource type to product_categories.

This returns all existing product categories from your store with their IDs, names, slugs, and parent references. Store these in a variable so you can check which categories already exist and avoid creating duplicates.

Power Automate

Step 3: Sync Categories with Hierarchy (Two-Pass Approach)

This is the part that requires careful ordering. You need to create parent categories before their children, because WooCommerce requires the parent’s ID when creating a child category.

First pass – Top-level categories:

  • Filter the BC results to categories where parentCategory is empty
  • For each one, check if a matching WooCommerce category already exists (match by slug derived from the BC code)
  • If not, use the “Create a new item of the specified type” action (resource: product_categories) to create it. Set the name from BC’s description.
  • Store the new WooCommerce category ID for use in the second pass

Second pass – Child categories:

  • Filter to categories that have a parentCategory value
  • Look up the parent’s WooCommerce category ID from the first pass results
  • Use “Create a new item of the specified type” (resource: product_categories) with the parent field set to the parent’s WooCommerce ID

For deeper hierarchies (three or more levels), extend this to additional passes. Most BC implementations use two levels at most.

Power Automate

Step 4: Store the Category Mapping

After syncing, you have a mapping of BC Item Category Codes to WooCommerce Category IDs. You’ll need this during the product sync to assign the correct category to each product.

Options for storing the mapping:

  • SharePoint list: Simple list with columns for BC Category Code and WooCommerce Category ID. Easy to view and manually adjust.
  • Dataverse table: If you’re already using Dataverse in your Power Platform environment, add a small table for the mapping.
  • WooCommerce category meta: Store the BC Category Code as metadata on each WooCommerce category. Keeps the mapping inside WooCommerce itself.
Strategy 2

Assign Categories During Product Sync

If you prefer not to build a separate category sync flow, you can handle category assignment directly inside your existing product sync flow. This works well when your category structure is simple and doesn’t change often.

Power Automate

Inline category assignment

  1. Pre-create your WooCommerce Product Categories manually (matching your BC Item Categories).
  2. At the top of your product sync flow, initialize a variable (type: Object) with the mapping of BC codes to WooCommerce IDs.
  3. During the product sync loop, read each item’s itemCategoryCode from BC, look up the corresponding WooCommerce Category ID, and include it in the product update.

Mapping variable example:

{ "FURNITURE": 10, "CHAIRS": 15, "DESKS": 16, "LIGHTING": 22 }

Lookup expression:

variables('categoryMapping')?[items('Apply_to_each')?['itemCategoryCode']]

Then in the “Update an item of the specified type” action (resource: products), include the category assignment in the product data. Since WooCommerce supports multiple categories per product, you can assign both a parent and child category if needed.

Handling Category Differences Between BC and WooCommerce

In practice, your BC and WooCommerce category structures rarely match perfectly. Here are common scenarios:

BC has more categories than you need in the store

BC Item Categories often serve internal purposes (purchasing, reporting, costing) that aren’t relevant to your customer-facing store. For example, “RAW-MATERIALS” and “PACKAGING” categories shouldn’t appear in WooCommerce.

Solution: Add a filter to your sync flow. Only sync categories (and products in those categories) that have a corresponding WooCommerce mapping. Categories without a mapping entry are simply skipped.

WooCommerce needs categories that don’t exist in BC

Your web store might organize products by use case (“Home Office”, “Gaming”, “Professional”) while BC organizes by product type (“Desks”, “Chairs”, “Monitors”). A desk could be in “Home Office” and “Professional” simultaneously in WooCommerce.

Solution: Use a mapping table that supports many-to-many relationships. One BC category can map to multiple WooCommerce categories. A SharePoint list with columns for BC Code, WooCommerce Category ID, and Category Name makes this easy. Alternatively, add custom fields in BC that indicate which web categories each item should appear in.

Category names differ between systems

BC might call a category “OFFICE-FURN” while WooCommerce should display “Office Furniture.” This is handled naturally by the mapping approach: the BC code is the lookup key, and the WooCommerce category has whatever customer-friendly name you want.

Keeping Categories in Sync Over Time

Categories don’t change as frequently as stock levels or prices, so a real-time sync is usually overkill. Pragmatic options:

  • Manual trigger: Run your category sync flow on demand whenever someone adds or renames categories in BC.
  • Scheduled weekly run: Set the flow to run once a week. It checks for new or changed categories in BC and creates/updates them in WooCommerce.
  • Run before product sync: Chain the category sync flow to run immediately before the product sync, ensuring categories are always current before products are assigned.

Preserve manually-added content in WooCommerce categories

WooCommerce Product Categories support images and descriptions that appear on category archive pages. BC Item Categories don’t have these. If your web team adds photos and descriptions to WooCommerce categories, make sure your sync flow updates existing categories (by matching on slug or a stored mapping) rather than deleting and re-creating them. This preserves the manually-added content.

Summary: The Complete Flow Pattern

Category Sync Flow: Action Sequence

  1. Trigger: Manual button or scheduled (run before product sync)
  2. BC > Find records (V3): Get all item categories (table: itemCategories)
  3. WooCommerce > Find a list of the selected item type: Get existing product categories (resource: product_categories)
  4. Apply to each (first pass – top-level categories):
    1. Condition: Does parentCategory equal empty?
    2. If yes > Condition: Does this category already exist in WooCommerce?
    3. If no > WooCommerce > Create a new item of the specified type: Create category (resource: product_categories)
    4. Store new category ID in mapping variable
  5. Apply to each (second pass – child categories):
    1. Look up parent’s WooCommerce ID from mapping
    2. WooCommerce > Create a new item of the specified type: Create child category with parent field set
  6. Store mapping (SharePoint / Dataverse / WooCommerce meta) for product sync

Getting Started

The category sync flow is a custom addition to the BC + WooCommerce Starter Kit. The starter kit gives you the foundation for product, inventory, customer, and order sync. Adding a category sync flow on top of that uses the same connectors and the same patterns.

You’ll need Power Automate for WooCommerce installed on your store to make the WooCommerce connector available in Power Automate. From there, creating the category sync flow is a matter of following the steps above in the flow designer.

If your category structure is complex or you need help with many-to-many mappings, reach out. We can help you design a mapping strategy that fits your specific BC setup and store requirements.

Ready to get started?

Get the starter kit for the base product sync, then add category sync using this guide.