Order Sync Overview
Orders sync one-way from WooCommerce to ERPNext. When a WooCommerce order is created or its status changes, WooSync creates or updates an ERPNext Sales Order.
Store Configuration for Orders
In your Caz Woo Store record, under Order Sync Settings:
- Create Sales Orders from WooCommerce — Enable to create ERPNext SOs for incoming WC orders.
- Auto-Submit Sales Orders — If enabled, Sales Orders are automatically submitted (not left as drafts).
- Shipping Item Code — The ERPNext Item code used for shipping line items (e.g., SHIPPING). If not set, a “Shipping” item is auto-created.
- SO Naming Series — Optional custom naming series for Sales Orders (e.g., WOO-.YYYY.-).
What Gets Synced
- Order ID, creation date, currency
- Line items — quantity, rate, amount (mapped to ERPNext Items via Caz Woo Item Mapping)
- Shipping total — added as a separate line item using the configured shipping item code
- Tax total — added as a tax row
- Billing details — used to find or create the Customer record
- Order status — mapped to ERPNext delivery status
WooCommerce Order Status → ERPNext Sales Order
| WooCommerce Status | ERPNext Status |
|---|---|
| Pending / Processing / On-Hold | To Deliver and Bill |
| Completed | Completed |
| Cancelled / Refunded / Failed | Cancelled |
Order Mapping
The Caz Woo Order Mapping DocType links each WooCommerce order ID to its ERPNext Sales Order name. This mapping is used by the accounting module to find the right SO when creating invoices, and by the refund module to issue credit notes against the correct invoice.
Idempotency
WooSync checks WooCommerce order metadata before creating a new Sales Order to prevent duplicate documents if the same webhook fires more than once. Re-processing the same order ID will update the existing SO, not create a new one.
Cancelled Orders
Cancelled orders received before any mapping exists are silently skipped — there is nothing to cancel. If an order is cancelled after a Sales Order has been created, WooSync cancels the SO (and linked Invoice if applicable).