Connectors

/

WooCommerce

/

WooCommerce win-back coupon for lapsed customers
Write

Find lapsed WooCommerce customers and a safe coupon to win them back

For store owners and marketers who want lapsed customers ranked and a single-use win-back coupon created by their AI assistant.

Try PopdockAI free
Get a live demo
WooCommerce win-back coupon for lapsed customers
Find WooCommerce customers who have not ordered in 90 days and set up a 10 percent win-back coupon.
142 customers have not ordered in 90 days, led by Contoso Pharma with 2,840.00 spent. - Coupon: WINBACK10, 10 percent off, code is free - Limits: one use per customer, not stackable, expires in 30 days - Note: it cannot be limited to these customers' emails Shall I create the coupon? Sending it happens outside the store.
WooCommerce
Sample figures. Your results come from your own account.
woocommerce-get-order
woocommerce-get-customer
woocommerce-get-coupon
woocommerce-add-coupon

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

Lapsed customers and a coupon that can be abused

Customers who stop buying are worth a nudge, but finding them means grouping a year of orders by email and ranking by spend. Then a win-back code has to be set up so it cannot be abused.

Without PopdockAI

  • Group a year of orders by email
  • Rank lapsed customers by spend
  • Create a coupon and guess at the limits
  • Reuse a code that already exists

With PopdockAI

  • Customers whose last order is older than the lapse period are found
  • Small one-off buyers are dropped and the rest ranked by spend
  • The code is checked as free and a safe coupon proposed
  • The coupon is created once after you confirm and read 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:** Find customers whose last order was more than `{lapsed-days}` days ago (default 90), rank them by past spend, and after confirmation create one win-back coupon `{coupon-code}` (default WINBACK followed by the discount, e.g. WINBACK10) at `{discount-percent}`% off (default 10).

**Step 1: Pull order history**

Call `woocommerce-get-order` with `created-date.from` = today minus (`{lapsed-days}` + 365) days and `max-records` 5000. Keep `completed` and `processing` orders only.

**Step 2: Find the lapsed customers**

Group by `customer-email`. For each: order count, total spend, last order date. A customer is lapsed when their last order is older than today minus `{lapsed-days}` days. Drop customers with a single order under 20, as they are unlikely to be worth winning back.

For the top 25 by spend, call `woocommerce-get-customer` with `email` to confirm they still have an account and note `billing-country`.

**Step 3: Report the audience**

A table ranked by spend: name, email, orders, total spend, last order date, days since. Then the count and total past spend of all lapsed customers.

**Step 4: Propose the coupon**

Call `woocommerce-get-coupon` with `code` = the coupon code. If it exists, stop and ask for another code.

Propose: `discount-type` `percent`, `amount` = `{discount-percent}`, `usage-limit-per-user` 1, `individual-use` true, `expiry-date` 30 days from today, `description` "Win-back campaign" with today's date. Say that these tools cannot restrict the coupon to these customers' emails, so anyone with the code can use it once, and that sending it to customers happens outside this prompt. Wait for an explicit yes.

**Step 5: Create and verify**

Call `woocommerce-add-coupon` once with the confirmed values. Then call `woocommerce-get-coupon` with `code` and report the stored coupon.

**Rules & Guidelines:**

* The only write tool this prompt may call is `woocommerce-add-coupon`, once.
* Do not call any other write tool (`woocommerce-add-order`, `woocommerce-update-order`, `woocommerce-add-order-note`, `woocommerce-send-order-details`, `woocommerce-add-refund`, `woocommerce-add-customer`, `woocommerce-update-customer`, `woocommerce-add-product`, `woocommerce-update-product`, `woocommerce-update-product-variation`, `woocommerce-update-coupon`). In particular never use order notes to message customers.
* Pass `max-records` explicitly (500 unless stated otherwise). If a read returns exactly that many rows, say the result may be truncated and that totals are a lower bound.
* If the rows carry more than one `currency`, report each currency separately. Never add amounts across currencies.

**Validation:**

* If `{lapsed-days}` or `{discount-percent}` is empty or not a number, use 90 and 10. `{discount-percent}` must be from 1 to 50.
* If no customers are lapsed, report that and do not create a coupon.
* 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

Ecommerce marketers

Start a win-back campaign

Get a ranked list of lapsed customers and a single-use coupon for your email.

Find WooCommerce customers who have not ordered in 120 days and create a 15 percent coupon COMEBACK15.

Store owners

Offer a discount that cannot be abused

One use per customer, not stackable and a 30 day expiry, explained before it is created.

Set up a 10 percent win-back coupon for customers lapsed 6 months.

Retention managers

Focus on your best lapsed buyers

Lapsed customers are ranked by spend, so outreach starts with the most valuable.

Who are our highest spending WooCommerce customers that have not ordered in a year?

How it works

What PopdockAI does when you ask

You set a lapse period and a discount, and your AI assistant finds who to win back and proposes a safe coupon. Nothing is created until you confirm, and sending happens outside the store.

01

Ask

You set a lapse period, a discount and an optional code.

Your AI tool

02

Find

It finds customers whose last order is older than that, ranked by spend.

woocommerce-get-order
woocommerce-get-customer

03

Propose

It suggests a one-use, non-stackable coupon expiring in 30 days.

woocommerce-get-coupon

04

Confirm

You say yes, then the coupon is created once and read 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-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.
get-data

woocommerce-get-coupon

Returns WooCommerce coupons with discount type, amount, usage limits, times used and expiry. Filter by code, discount type, times used, created date and expiry date ranges.
run-action

woocommerce-add-coupon

Creates a WooCommerce discount coupon with its code, discount type and amount, expiry date, minimum spend, usage limits and whether it can be combined with other coupons.
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

Who to win back, and a safe coupon ready

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