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 site connected to WPVibe running WooCommerce 11.3 or newer (tested on 11.3.0, free) on WordPress 6.9 or newer, with an administrator account, 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] If any [bracketed] item above is still unfilled, ask me for it first. 1. Run discover_abilities with category woocommerce. If woocommerce/order-notes-query is not there, stop and tell me to update the free WooCommerce plugin to 11.3 or newer (on WordPress 6.9 or newer). 2. Find the order with woocommerce/orders-query, with id set to the order number and include_line_items true. If nothing comes back, or its billing_email is not the customer email above, run woocommerce/orders-query with billing_email set to the customer email instead, show me what you find, and stop. If the order's status is not processing, tell me its status and stop. 3. Run woocommerce/order-notes-query with the order's id. If a customer note (customer_note true) already has a tracking number, show it to me and ask whether to send another before going on. 4. 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. 5. On my yes, run each step once. If a step fails or times out, stop and tell me; do not repeat it. - Add the note with woocommerce/order-add-note, the order's id and customer_note true. This emails it to the customer. - Set the order to completed with woocommerce/order-update-status, with the note "Shipped" followed by the carrier and the tracking number. 6. Only touch this one order. When you are done, run woocommerce/order-notes-query with the order's id again and tell me which emails WooCommerce logged (notes such as Email "Completed order" sent.) and whether any failed to send.
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 reads its notes so a tracking number you already sent isn’t sent twice. 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 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.