Product Sync Overview
Product synchronisation is bidirectional. WooSync maps WooCommerce products to ERPNext Items, supporting both simple products and variable products with attributes and variations.
Store Configuration for Products
In your Caz Woo Store record, under Item Sync Settings:
- Item Matching Field — How WooSync identifies existing items: by SKU (recommended) or by item name.
- Create Items from WooCommerce — If enabled, new WooCommerce products without an ERPNext match will be created as Items automatically.
- Update Items from WooCommerce — If enabled, WooCommerce product changes update existing ERPNext Items.
- Item Price List — The ERPNext price list to use for regular prices synced from WooCommerce.
WooCommerce → ERPNext
When a product is created or updated in WooCommerce (via webhook or polling), WooSync:
- Checks the Caz Woo Item Mapping table for an existing link by WooCommerce product ID
- If no mapping, searches for an existing Item by SKU or name
- Creates or updates the ERPNext Item with: name, description, item group, stock UOM, weight, and status (published = enabled)
- Creates or updates an Item Price record with the regular price
- For variable products: creates an Item Template with Item Attributes and a child Item Variant for each WooCommerce variation
ERPNext → WooCommerce
When an ERPNext Item is saved, WooSync queues a sync job that:
- Looks up the Caz Woo Item Mapping to find the linked WooCommerce product ID
- Builds a WooCommerce API payload from the Item fields (name, description, SKU, weight, item group as category)
- POSTs an update to the WooCommerce Products API — creating the product if no WooCommerce ID is mapped yet
- For Item Templates with variants: syncs as WooCommerce variable products with attribute options
Item Mapping
The Caz Woo Item Mapping DocType tracks the relationship between ERPNext items and WooCommerce product IDs. You can view and edit mappings at CAZ WooSync > Caz Woo Item Mapping. This is useful for manually linking existing products that WooSync could not auto-match.
Placeholder Items
When a WooCommerce order arrives for a product that has no ERPNext Item mapping, WooSync creates a placeholder Item with the code WOO-{woocommerce_product_id}. This ensures the order is not blocked. You can then rename and enrich the placeholder item and add a proper mapping.