Fulfil WooCommerce orders with CJ Dropshipping and 17TRACK tracking
Quick overview
Creates and tracks CJ Dropshipping orders from WooCommerce, using configured margin and cost thresholds to choose automatic payment or owner approval. It is for store owners who want a reviewed fulfilment process with shipment updates and exception handling.
How it works
Triggers when a WooCommerce order is updated, on a 2-hour schedule to poll CJ shipment status, or when 17TRACK sends a tracking webhook event.
For new WooCommerce orders in the configured status, it checks for a previously logged order in an n8n Data Table, maps line items to CJ variants (SKU or _cj_vid meta), and logs orders that need attention when products are unmapped.
Creates the order in CJ Dropshipping, then runs CJ’s checkout steps to retrieve the exact payable amount and converts the WooCommerce order total to USD using the Frankfurter FX API. The request continues on error; the code uses the configured fallback rate when no USD rate is returned. Confirm that this fallback fits the currencies your store accepts.
Applies the profit guard rules to either auto-pay CJ from your balance, request owner approval by email (approve to pay, decline to put the WooCommerce order on hold), or alert/log when CJ blocks checkout.
Every 2 hours, polls CJ Dropshipping in batches for orders marked as paid, detects tracking numbers or cancellations, registers new tracking numbers with the 17TRACK API, saves tracking metadata back to WooCommerce, and notifies the customer with an order note.
Receives 17TRACK webhook updates, validates a shared token, updates tracking stage in the Data Table, posts customer-facing notes for out-for-delivery/pickup, completes the WooCommerce order on delivery, and emails you on delivery exceptions.
Setup
Create an n8n Data Table (for example cj_order_tracking) with the workflow’s required columns and select it in all Data Table steps.
Add credentials for WooCommerce (REST API read/write), CJ Dropshipping (HTTP Custom Auth to fetch access tokens), 17TRACK (HTTP Header Auth API key), and an SMTP/Email account for alerts and approval emails.
Update the Config values (store URL, shop and email addresses, target WooCommerce status, margin and auto-pay limits, IOSS settings, and webhook token) and check cjSandbox for your CJ account. This flag is passed to CJ during order creation; it is not a local dry-run switch, and payment and notification nodes remain reachable. Use isolated test accounts and recipients before enabling those paths.
In 17TRACK, configure a v2.2 webhook pointing to the workflow’s 17TRACK webhook URL and append ?token= with your configured webhookToken.
Ensure WooCommerce products can be mapped to CJ variants by setting SKUs to match CJ variant SKUs or by adding _cj_vid line-item metadata. Configure a unique webhook path and confirm its production URL. Set the addresses in Alert: workflow error and assign production error handling in n8n Settings; an Error Trigger node alone does not enable it.
With a test order, verify creation, payable cost, owner approval/decline/timeout and tracking transitions before enabling automatic payment or customer notices. The existence check and row insertion are separate, so simultaneous deliveries are not protected by an atomic duplicate lock. Reconcile CJ payment state and the Data Table checkpoint before retrying an uncertain action.
Requirements
WooCommerce store with REST API access
CJ Dropshipping account with API key and balance
17TRACK API access with the registration and webhook capabilities used by the workflow
Woo product SKUs matching CJ variant SKUs, or _cj_vid meta on line items