User Guide: WooCommerce Setup and Import
Overview
This extension imports WooCommerce orders into Third Party Transactions in Business Central.
Main components:
- Setup fields on Third Party Setup Card under the WooCommerce group.
- Action: Import WooCommerce Web Data.
- Import scope: completed orders, or completed + processing orders (based on setup).
Before You Start
Complete these prerequisites before importing:
- Create or open the relevant Third Party Setup record.
- Enter WooCommerce tenant and API credentials.
- Confirm Last Trans. Date is set.
- Decide whether to use source filtering and duplicate checks.
- Decide how fee lines should be created.
Setup Fields Explained
WooCommerce Tenant
- Type: Text (50)
- Purpose: Domain used to build the API URL.
- What it does:
- Builds requests to
https://<tenant>/wp-json/wc/v3/orders. - Is validated before import.
- What it does not do:
- Does not validate whether the domain is reachable.
- Does not auto-correct protocols or trailing paths.
WooCommerce Client Key
- Type: Text (50)
- Purpose: API username part of Basic Auth.
- What it does:
- Is sent in the Authorization header with Client Secret.
- What it does not do:
- Does not test key permissions until an import call is made.
WooCommerce Client Secret
- Type: Text (50), masked on page
- Purpose: API password part of Basic Auth.
- What it does:
- Is combined with Client Key to authenticate API requests.
- What it does not do:
- Does not encrypt outbound traffic by itself (HTTPS does that).
WooCommerce Last Trans. Date
- Type: Date
- Purpose: Lower boundary for order retrieval (
afterfilter in API URL). - What it does:
- Sends orders after the selected date/time boundary.
- Is required by setup validation.
- Is updated to Today during URL build for the setup record.
- What it does not do:
- Does not guarantee deduplication on its own.
- Does not backfill older orders unless you manually set an older date.
WooCommerce Include Processing Orders
- Type: Boolean (default false)
- Purpose: Controls status filter used in WooCommerce request.
- What it does:
- False: imports
completedorders. - True: imports
completed,processingorders. - What it does not do:
- Does not import cancelled/refunded/failed statuses.
WooCommerce Source Filter
- Type: Enum (blank, Mobile App, Website)
- Purpose: Filters orders by header metadata key
_wc_order_attribution_source_type. - What it does:
- Blank: no source filtering.
- Mobile App: imports only
mobile_appsource type. - Website: imports
utm,typein,organic,referral,null. - If filter is not blank and source metadata is missing, import throws an error for that order.
- What it does not do:
- Does not infer source from referrer URL or user agent.
- Does not map custom source values unless code is changed.
WooCommerce Check Duplicate Doc. No.
- Type: Boolean (default true)
- Purpose: Prevent duplicate imports using document number.
- What it does:
- Checks both active Third Party Transactions and Archive tables.
- Skips duplicate document numbers when enabled.
- What it does not do:
- Does not merge or update existing transactions.
- Does not detect duplicates by other criteria (amount/customer/date).
WooCommerce Default Account No.
- Type: Code (20)
- Purpose: Account assignment override.
- What it does:
- If populated, uses this account for imported lines.
- If blank, falls back to WooCommerce
customer_id. - What it does not do:
- Does not validate customer/account mapping against WooCommerce.
WooCommerce Use ImportPayment Method
- Type: Boolean
- Purpose: Controls payment method transfer.
- What it does:
- If enabled, sets Payment Method Code from WooCommerce
payment_method. - What it does not do:
- Does not map values to BC payment methods beyond direct text assignment.
- Does not set a payment method when disabled.
WooCommerce Fee Line Type
- Type: Option (blank, G/L Account, Item)
- Purpose: Defines line type for fee-related imported lines.
- What it does:
- If blank: fee lines are not imported.
- If set: fee lines are created with chosen line type.
- Also affects shipping lines created by import.
- What it does not do:
- Does not automatically choose line type from mappings.
WooCommerce Use Generic Fees
- Type: Boolean
- Purpose: Controls fee line identifier behavior.
- What it does:
- False: uses incoming fee
nameas Line Type No. - True: uses WooCommerce Generic Fees Description value.
- What it does not do:
- Does not change fee Description field (description still uses incoming fee name).
WooCommerce Generic Fees Description
- Type: Text (250)
- Purpose: Static Line Type No. value for fee lines when generic mode is enabled.
- What it does:
- Required when Use Generic Fees is enabled.
- Becomes Line Type No. for fee lines.
- What it does not do:
- Does not auto-populate from WooCommerce fee metadata.
- Does not apply when Use Generic Fees is disabled.
Running the Import
- Open Third Party Setup Card.
- Configure WooCommerce fields.
- Use action: Import WooCommerce Web Data.
- Review imported records in Third Party Transactions.
Import Behavior Notes
- Order number logic prefers
_order_numberin ordermeta_data; falls back to orderid. - Shipping lines are imported when shipping total is not zero.
- Product line discount percent may be derived from
_wdr_discountsmetadata when present. - Fee import requires WooCommerce Fee Line Type to be selected.
Troubleshooting
- Authentication failures:
- Recheck tenant, client key, and client secret.
- Missing source type errors:
- If Source Filter is not blank, ensure order metadata includes
_wc_order_attribution_source_type. - No fees imported:
- Set WooCommerce Fee Line Type to G/L Account or Item.
- Duplicate records skipped:
- Expected when duplicate check is enabled and document already exists.