Mark a WooCommerce order shipped and send the tracking number with AI
Send the customer their tracking number and mark the order Completed in one step, with the note shown to you before anything is emailed.
Prerequisites
A connected site running WooCommerce 10.9 or newer on WordPress 6.9 or newer, an order in Processing, the customer's email, and the carrier and tracking number.
Close out a shipped WooCommerce order. - Order number: [1234] - Customer email: [customer email] - Carrier: [USPS] - Tracking number: [tracking number] Find that order with the woocommerce/orders-query ability, using the order number as the id, with include_line_items true. If nothing comes back, or the billing email is not the customer email above, search by billing_email instead and show me what you find, then stop. If the order's status is not processing, stop and tell me. Show me the order: number, customer email, items and status. Then write the customer a short, friendly note: the order has shipped, the carrier and the tracking number. Do not add a tracking link unless I give you one. Show me the note exactly, tell me that my yes sends two emails (this note, and WooCommerce's Completed order email if it is turned on), and wait for my yes. On my yes, run each step once. If a step fails or times out, stop and tell me; do not repeat it. 1. Add the note to that order with the woocommerce/order-add-note ability and customer_note true. This emails it to the customer. 2. Set that order to completed with the woocommerce/order-update-status ability, with the note "Shipped" followed by the carrier and the tracking number. Only touch this one order. When you are done, read that order's notes from the WooCommerce REST API (GET /wc/v3/orders/ followed by the order id and /notes) and tell me which emails WooCommerce logged as sent.
Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:
Run the “Mark a WooCommerce order shipped and send the tracking number with AI” recipe from the WPVibe cookbook on my connected site.
The parcel is out the door, and now the order needs closing: find it in WooCommerce, paste the tracking number into a note to the customer, and switch the status to Completed. Skip the note and the customer emails you to ask where it is. Forget the status and the order sits in Processing for weeks, mixed in with the ones that still need packing.
The AI finds the order through WooCommerce's own order abilities, checks that it belongs to the customer email you gave and is still in Processing, and stops if either check fails. It writes a short note with the carrier and the tracking number, and shows it to you before anything is saved. On your yes it adds the note as a customer note, which WooCommerce emails to the customer, sets the order to Completed with a private note recording the shipment, and reads the order notes back so you see which emails WooCommerce logged as sent.
Fill in the order number, the customer's email, the carrier and the tracking number, and paste the prompt. It changes one order at a time on purpose: the yes sends two emails to a real customer, the note and WooCommerce's usual Completed order email if that email is turned on under WooCommerce > Settings > Emails. If your store uses a plugin that renumbers orders, the email check is what keeps the note from going to the wrong customer.
Outcome
The customer has their tracking number by email, the order is Completed, and the order notes show what was sent.