/
/
Place a WooCommerce order for a customer, right first time
For sales and support teams who want to place a phone or email order in WooCommerce by asking their AI assistant, with stock checked.
On this page
Connector
Connect WooCommerce, pick your AI tool and paste the prompt.
The problem
Phone orders that go wrong on the second try
Placing a WooCommerce order for a customer who called means finding them, matching each SKU to the right product or variation and checking stock before promising anything. A failed attempt retried carelessly gives the customer two orders.
Without PopdockAI
- Search for the customer in WooCommerce
- Find each SKU among products and variations
- Check stock before promising a date
- Retry after an error and create a duplicate
With PopdockAI
- The customer is found, or you choose to create them or use a guest order
- Each SKU is matched to a product or variation with stock checked
- You see lines, prices and paid status before anything is created
- The order is created once, read back and checked before any retry
The prompt
Use this prompt
Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.
**Objective:** Create a WooCommerce order for the customer `{customer-email}` containing `{items}` (up to three lines, each a SKU and a quantity), mark it paid only if `{set-paid}` is true (default false), and email the invoice only if `{send-invoice}` is true (default false).
**Step 1: Find the customer**
Call `woocommerce-get-customer` with `email` = `{customer-email}`. Keep `customer-id`, `first-name` and `last-name`.
If there is no match, ask the user whether to (a) create the customer with `woocommerce-add-customer`, giving at least `email` and the name, or (b) place a guest order. Do nothing until they choose.
**Step 2: Resolve every line**
Parse `{items}` into SKU and quantity pairs. More than three lines: stop, since the tool takes three. For each SKU:
1. `woocommerce-get-product` with `sku`. A `simple` product: use its product id.
2. No match: `woocommerce-get-product-variation` with `sku`. A match: use `product-variation-id`, as the order tool expects the variation's id.
3. A `variable` parent: list its variations with `woocommerce-get-product-variation` (`product-id`) and stop so the user can choose.
4. Not found, `outofstock`, or `stock-quantity` below the quantity requested: report it and stop.
**Step 3: Confirm**
Show: customer (or "guest"), each line with name, SKU, quantity, unit `price` and line amount, the estimated subtotal before tax and shipping, status `pending` unless paid, whether it is marked paid, and whether the invoice will be emailed. Say that marking it paid moves it to `processing` and reduces stock. Wait for an explicit yes.
**Step 4: Create**
If the user chose (a) in Step 1, call `woocommerce-add-customer` once and use the returned `id`.
Call `woocommerce-add-order` once with `customer-id` (empty for a guest), `billing-email` = `{customer-email}`, `billing-first-name`, `billing-last-name`, `line1-product-id` and `line1-quantity` (and lines 2 and 3 where given), and `set-paid` = true only when `{set-paid}` is true.
If `{send-invoice}` is true, call `woocommerce-send-order-details` once with the new order's `id`.
**Step 5: Verify and report**
Call `woocommerce-get-order-line` with `order-id` = the new id. Report the order number, status, total and currency, the lines as stored, and whether the invoice was sent.
**Rules & Guidelines:**
* The only write tools this prompt may call are `woocommerce-add-customer` (once, only if the user chose it), `woocommerce-add-order` (once) and `woocommerce-send-order-details` (once, only if asked).
* Do not call any other write tool (`woocommerce-update-order`, `woocommerce-add-order-note`, `woocommerce-add-refund`, `woocommerce-update-customer`, `woocommerce-add-product`, `woocommerce-update-product`, `woocommerce-update-product-variation`, `woocommerce-add-coupon`, `woocommerce-update-coupon`).
* Never retry `woocommerce-add-order` after an error without checking with `woocommerce-get-order` (`customer-email`, today's `created-date.from`) that no order was created, or the customer gets a duplicate.
**Validation:**
* If `{items}` cannot be read as SKU and quantity pairs, ask for it in the form "SKU x quantity, SKU x quantity" and stop.
* Quantities must be whole numbers of 1 or more.
* If `{set-paid}` or `{send-invoice}` is empty, treat it as false.
* If the user's confirmation is anything other than a clear yes, stop without writing.Who it's for
One answer, three teams that use it
Sales reps
Take an order over the phone
Place an order for a customer while they are on the call, with stock checked before you promise anything.
Create a WooCommerce order for priya@contoso.com: CAP-RED x 10 and BAG-GRY x 5, and send the invoice.
Customer service agents
Replace an order without duplicates
Orders are created once and checked after any error, so the customer never gets two.
Place a WooCommerce order for tom@fabrikam.com with MUG-WHT x 6 as a paid order.
Wholesale coordinators
Handle emailed orders quickly
Turn an emailed order into a WooCommerce order with the right variations, without searching the catalog.
Order TEE-NVY-M x 12 and TEE-NVY-L x 8 in WooCommerce for orders@northwindtraders.com.
How it works
What PopdockAI does when you ask
You give the customer email and the SKUs, and your AI assistant builds the order and checks stock. Nothing is created until you confirm, and a failure is checked before any retry.
01
Ask
You give the customer email and up to three SKUs with quantities.
02
Check
It finds the customer and matches each SKU to a product or variation with stock.
03
Confirm
You see lines, prices, subtotal, paid status and invoice choice.
04
Create
It creates the order once and reads the stored lines back.
What PopdockAI provides
The tools behind the answer
Ready made tools for WooCommerce and one secure connection to your AI tool. No code, no exports.
woocommerce-get-customer
woocommerce-add-customer
woocommerce-get-product
woocommerce-get-product-variation
woocommerce-add-order
woocommerce-send-order-details
woocommerce-get-order-line
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.
The outcome
Orders placed right the first time
Related use cases
More ways to put this data to work
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.

.webp)
