Connectors

/

WooCommerce

/

Change a WooCommerce order status
Write

Change a WooCommerce order status without side effects

For store and support teams who want an order's status changed safely, with warnings about refunds and customer emails, by asking their AI assistant.

Try PopdockAI free
Get a live demo
Change a WooCommerce order status
Mark WooCommerce order 1042 as completed, reason shipped by courier, and do not email the customer.
Order 1042 for Jordan Lee is processing and paid, so it can move to completed. - Change: processing to completed - Note: Shipped by courier - Email: WooCommerce usually sends a completed email anyway Shall I complete the order?
WooCommerce
Sample figures. Your results come from your own account.
woocommerce-get-order
woocommerce-get-order-note
woocommerce-update-order
woocommerce-add-order-note

On this page

The problem

The problem

The prompt

Who it's for

How it works

Tools used

Connector

WooCommerce

WooCommerce
Run it on your own WooCommerce data.

Connect WooCommerce, pick your AI tool and paste the prompt.

Try PopdockAI free

The problem

A status change with side effects you did not expect

Changing a WooCommerce order status has side effects: marking it refunded returns no money, cancelling a paid order keeps the money and completing it emails the customer. Getting it wrong is hard to undo.

Without PopdockAI

  • Open the order and change the status
  • Forget that completed emails the customer
  • Mark it refunded without returning the money
  • Spend time undoing the mistake

With PopdockAI

  • The order and its history are read first
  • Risky moves are refused or warned about
  • You are told when the customer will be emailed
  • It updates once after you confirm, adds a note and reads it back

The prompt

Use this prompt

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

Prompt
**Objective:** Change the status of order `{order-number}` to `{new-status}`, record the reason `{reason}` as an order note if one is given, and email the customer only if `{notify-customer}` is true (default false).

**Step 1: Find the order**

Call `woocommerce-get-order` with `order-number` = `{order-number}`. Keep `order-id`, `status`, `total`, `paid-date` and `payment-method-name`. If nothing matches, or more than one matches, say so and stop. Call `woocommerce-get-order-note` with `order-id` to see the recent history.

**Step 2: Check the move**

Valid statuses: `pending`, `processing`, `on-hold`, `completed`, `cancelled`, `failed`.

* If `{new-status}` equals the current status, say so and stop.
* `refunded`: refuse. Setting it records a refund without returning any money. Point the user to the refund-order prompt.
* `cancelled` on an order with a `paid-date`, or in `processing` or `completed`: warn that cancelling does not return the money, and ask whether to refund first with the refund-order prompt.
* `processing` or `completed` from `on-hold` or `pending` with an empty `paid-date`: ask whether payment has been received. Only if the user says yes, also pass `set-paid` true, which records the payment date and reduces stock.
* `completed` and `processing` send WooCommerce's own email to the customer. Say so.
* Anything that is not a valid status: stop and list the valid ones.

**Step 3: Confirm**

Show: order number, current status, new status, whether `set-paid` will be passed, the note text and whether it goes to the customer. Wait for the user to confirm. Do not continue without an explicit yes.

**Step 4: Update**

Call `woocommerce-update-order` once, with `order-id`, `status` and (only when agreed) `set-paid`. Pass nothing else.

If `{reason}` is not empty, call `woocommerce-add-order-note` once with `order-id`, `note` = `{reason}`, and `customer-note` = true only when `{notify-customer}` is true, otherwise false.

**Step 5: Verify and report**

Call `woocommerce-get-order` with `order-id` and report the status before and after, the note added, and any email WooCommerce will have sent.

**Rules & Guidelines:**

* The only write tools this prompt may call are `woocommerce-update-order` (once) and `woocommerce-add-order-note` (once, only with a reason).
* Do not call any other write tool (`woocommerce-add-order`, `woocommerce-send-order-details`, `woocommerce-add-refund`, `woocommerce-add-customer`, `woocommerce-update-customer`, `woocommerce-add-product`, `woocommerce-update-product`, `woocommerce-update-product-variation`, `woocommerce-add-coupon`, `woocommerce-update-coupon`).
* Never pass `customer-note`, `billing-email`, `billing-phone` or `transaction-id` to `woocommerce-update-order`; they overwrite order data.
* If the update fails, report the error and stop. Do not retry with other values.

**Validation:**

* If `{notify-customer}` 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

Fulfilment teams

Close orders as they ship

Mark orders completed with a note, and choose whether the customer gets an email.

Mark WooCommerce order 2210 completed, reason delivered by hand, and email the customer.

Customer service agents

Put an order on hold safely

Change a status with the reason recorded as a note, and see any side effects before it happens.

Put WooCommerce order 1987 on hold because the customer asked to change the address.

Store managers

Avoid accidental refunds

Refunded is refused with a pointer to a proper refund, and cancelling a paid order is warned about.

Cancel WooCommerce order 3054, the customer changed their mind. Is it paid?

How it works

What PopdockAI does when you ask

You give the order number and new status, and your AI assistant checks the move before anything changes. The status is updated only after you confirm.

01

Ask

You give the order number, new status, reason and whether to notify.

Your AI tool

02

Check

It reads the order and its history and warns about risky moves.

woocommerce-get-order
woocommerce-get-order-note

03

Confirm

You see the change and any email the customer will get.

No items found.

04

Update

It changes the status once, adds the reason as a note and reads it back.

Your AI tool

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.

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-note

Returns the notes on WooCommerce orders, including system notes for status changes and payment results. Filter by order, author, customer or private notes and date range.
run-action

woocommerce-update-order

Updates an existing WooCommerce order by id, most often to change its status. Can also mark it paid and set the transaction id, billing email and phone, or the customer note.
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 WooCommerce 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

Status changes without accidents

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