Connectors

/

Microsoft Dynamics 365 Business Central

/

Create a Dynamics 365 Business Central sales order from a WooCommerce order
Write
Cross-Connector

Enter WooCommerce orders in Business Central completely, once

For operations teams who want web orders entered in Business Central with every line matched, by asking their AI assistant.

Try PopdockAI free
Get a live demo
Create a Dynamics 365 Business Central sales order from a WooCommerce order
Enter WooCommerce order 1042 in Business Central.
WooCommerce order 1042 is processing and not yet in Business Central. - Customer: Contoso, matched by email - Lines: 2 of 2 mapped by SKU, plus shipping 12.00 - Total: 486.00, matches WooCommerce - After: a private note with the new order number goes on the web order Shall I create the sales order?
Microsoft Dynamics 365 Business Central
Sample figures. Your results come from your own account.
woocommerce-get-order
woocommerce-get-order-line
woocommerce-get-customer
woocommerce-add-order-note

On this page

The problem

The problem

The prompt

Who it's for

How it works

Tools used

Connector

Microsoft Dynamics 365 Business Central

Microsoft Dynamics 365 Business Central
Run it on your own Microsoft Dynamics 365 Business Central data.

Connect Microsoft Dynamics 365 Business Central, pick your AI tool and paste the prompt.

Try PopdockAI free

The problem

Enter a web order twice or miss a line and fulfilment goes wrong

Entering a WooCommerce order in Business Central means checking it is not already there, finding or creating the customer, matching every line by SKU and handling shipping. Enter it twice or miss a line and fulfilment and invoicing go wrong.

Without PopdockAI

  • Check the order status and search for a duplicate
  • Find or create the customer by hand
  • Match each line by SKU
  • Leave no record on the web order of where it went

With PopdockAI

  • Pending, failed, canceled and refunded orders stop by default
  • A duplicate in Business Central stops the job
  • The customer is matched by email, created only if you confirm
  • After you confirm, the total is checked and a private note added

The prompt

Use this prompt

Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.

Prompt
**Objective:** Enter WooCommerce order {order-number} in Business Central as a sales order, with the WooCommerce order number as the external document number, then note the Business Central order number on the WooCommerce order. Use Business Central company {company} (if blank, leave `company` off).

**Step 1: Read the order in WooCommerce**

Call `woocommerce-get-order` with `order-number` set to {order-number}. If nothing comes back, report that and stop. If its status is pending, failed, cancelled or refunded, report the status and stop unless the user explicitly says to continue. Note order-id, created-date, customer-email, billing-first-name, billing-last-name, currency, total and shipping-total.

Call `woocommerce-get-order-line` with the same `order-number` for each line's line-sku, line-name, line-quantity and line-total.

**Step 2: Make sure it is not already in Business Central**

Call `business-central-get-sales-transaction` and `business-central-get-posted-sales-invoice`, each with `external-document-number` set to {order-number}. If either finds a document, report its type and number and stop. Never enter the same web order twice.

**Step 3: Match the customer**

Call `business-central-get-customer` with `email` set to the order's customer-email.

* One match: use its customer-number. If it is blocked, report that and stop.
* Several matches: list them with number and name and ask the user which to use.
* No match: call `woocommerce-get-customer` with the same `email` for billing-company, billing-city, billing-state, billing-postal-code, billing-country and billing-phone (for a guest checkout, use the names on the order). Propose a new customer with those details, and create it with `business-central-create-customer` only after the user confirms. Use its returned number.

**Step 4: Match every line**

For each line-sku, call `business-central-get-item` with `item-number` set to the SKU, then with `gtin` set to the SKU if the first finds nothing. If any line has no SKU, no matching item, or a blocked item, list those lines and stop. Do not create a partial order.

The unit price for each line is line-total divided by line-quantity (excluding tax). If shipping-total is above zero, ask the user which G/L account to charge shipping to; if they give none, leave shipping off and say so.

**Step 5: Confirm**

Show the planned order: customer number and name, order date (the WooCommerce created-date), external document number, currency, and a table of item number, description, quantity and unit price, with the resulting total next to the WooCommerce total. Wait for the user to confirm. If the WooCommerce currency is not the company's local currency, ask for the currency code to use.

**Step 6: Create**

Call `business-central-create-sales-order` once, with `customer-number` and `bill-to-customer-number` set to the customer, `external-document-number` set to {order-number}, `order-date` set to the created date, and `currency-code` only if the user supplied one. Then call `business-central-create-sales-order-line` once per line, with `document-number` set to the new order's number, the Item line type, `number-on-line` set to the item number, `quantity` and `unit-price`. Add the shipping line with the G/L account line type if the user gave an account.

**Step 7: Record and confirm**

Call `woocommerce-add-order-note` with `order-id`, `customer-note` false (private), and a note saying the order was entered in Business Central, with the new sales order number. Then call `business-central-get-sales-transaction-line` with `document-number` set to the new order's number and compare the lines and total with WooCommerce.

**Report:** the Business Central sales order number, customer, lines created, the Business Central total against the WooCommerce total, and whether a customer was created.

**Rules & Guidelines:**

* Tools whose names start with woocommerce- are on the woocommerce server; tools whose names start with business-central- are on the business-central server.
* The only writes allowed are: `business-central-create-customer` (only when Step 3 found no match, and after confirmation), `business-central-create-sales-order` (once), `business-central-create-sales-order-line` (once per line), and `woocommerce-add-order-note` (once, private).
* Do not call `business-central-create-sales-invoice`, `woocommerce-update-order`, `woocommerce-send-order-details` or `business-central-update-customer`. Do not change the WooCommerce order status.

**Validation:**

* If a line create fails partway, stop. Report the sales order number and which lines were and were not created. Do not create the order header again.
* If the Business Central total differs from the WooCommerce total by more than 0.01 after creation, report the difference (tax or rounding is the usual cause) rather than editing the order.

Who it's for

One answer, three teams that use it

Online store managers

Move web orders into Business Central

Each order arrives complete and checked against the store total, without retyping.

Enter WooCommerce order 2290 in Business Central.

Order processing

Skip orders that should not ship

Pending, failed, canceled and refunded orders are stopped, so you only enter orders ready to fulfil.

Create a Business Central sales order for WooCommerce order 2301 if it is paid and not already entered.

Customer service

See where a web order went

A private note with the Business Central number is added to the web order, so you can answer order questions fast.

Enter WooCommerce order 2315 for dana@northwindtraders.com in Business Central and note the order number on it.

How it works

What PopdockAI does when you ask

You give the WooCommerce order number and your AI assistant checks it, maps every line and shows you the plan. Nothing is written until you confirm.

01

Ask

You give the WooCommerce order number.

Your AI tool

02

Check

It stops on bad statuses or duplicates and matches the customer by email.

woocommerce-get-order
woocommerce-get-order-line
woocommerce-get-customer

03

Confirm

Every line is mapped by SKU or barcode and you review the plan.

No items found.

04

Create

It creates the order, checks the total and adds a private note to the web order.

Your AI tool

What PopdockAI provides

The tools behind the answer

Ready made tools for Microsoft Dynamics 365 Business Central and one secure connection to your AI tool. No code, no exports.

get-data

woocommerce-get-order

Returns WooCommerce orders with status, totals, discounts, shipping, payment method and paid date. Filter by status, customer email or id, order number, created date range, total range or billing last name.
get-data

woocommerce-get-order-line

Returns the product lines on WooCommerce orders: product, SKU, quantity, price, line total and tax. Filter by order, customer, SKU or product id, order status and date range.
get-data

woocommerce-get-customer

Returns WooCommerce customer accounts with name, billing address, role and whether they have paid for an order. Filter by email, id, last name, billing country or state, role and created date range.
run-action

woocommerce-add-order-note

Adds a note to a WooCommerce order by id, either private to store staff or emailed to the customer.
Read only.Nothing in Microsoft Dynamics 365 Business Central Changes

This report is built from Get data tools only. PopdockAI applies the row, field and parameter rules your admin sets, and every query is written to the audit trail.

How Popdock AI secures your data

The outcome

Every web order entered once and completely

Try PopdockAI free
Get a live demo

Related use cases

More ways to put this data to work

All Ramp use cases

One prompt template with infinite possibilities.

‍

Your AI assistant adapts its approach, tone, and capabilities to match each unique context while you maintain a single, manageable workflow.

Join forward-thinking companies that are transforming their operations with intelligent, secure AI automation.

Try PopdockAI Free
See Documentation