Daily
Make follow-up coupons for unfinished orders
Each evening, customers with pending orders get a unique coupon and you get the list to follow up.
- Runs
- Daily
- Apps
- WooCommerce
- AI
- Not needed
- Access
- read+write
Send this to your assistant
Create a ClickRuntime automation: every evening at 7pm, find WooCommerce orders left pending for more than 2 hours, create a single-use 10% coupon for each customer, and email me the names, emails and codes.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
In a WooCommerce shop many customers get as far as checkout, then leave. Some orders sit as pending or failed, because the card was declined or the person got distracted. Each is a customer who wanted the product. Without follow-up that money is gone, and writing to each person by hand with a custom discount is more admin than a small shop can keep up with.
Each day the automation lists orders still in a pending or failed status, skips any it has already handled, creates a unique coupon code for each one in WooCommerce, and emails you the list with the customer's details and the code. You then send a short personal note offering the discount.
It fits shops with fewer than a few dozen incomplete checkouts a day, where a personal message still pays.
What you get out of it
Recover sales that were nearly made
These customers already chose products and entered details. A small incentive and a nudge convert a share of them, which is cheaper than winning a new buyer through ads. Even a modest recovery rate adds up over a month.
Unique codes prevent leaks
Each coupon is unique to one customer, so it cannot be shared on a deal site. You give the discount only to the person who earned it. Without that, a code posted on a coupon site can eat margin on sales that would have happened anyway.
One list instead of hunting through orders
The email collects everyone to contact in one place, so following up takes minutes rather than scanning the order list for failed payments. That alone can save a quarter of an hour each day for a small team with several other jobs.
No repeat contact
Orders already handled are skipped on later runs, so a customer does not receive three coupons for the same abandoned order. Otherwise the same unfinished order could be flagged day after day, and the customer would be written to repeatedly.
Learn why people drop off
If many failed orders share a payment method or a shipping country, you spot a real problem to fix, rather than just a discount to offer. A shared cause is more valuable than any single recovered sale, since fixing it helps every future buyer.
How it works
What happens, step by step
Once a day, ClickRuntime looks in WooCommerce for orders left pending or failed for more than two hours.
It skips any order it has already made a coupon for.
For each new one it creates a single-use 10% coupon that only works for that customer's email address.
You get an email listing each customer and their coupon code, ready to send in a follow-up.
Before it runs live
- Connect WooCommerce
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Run it at a different time, more or less often, or only on weekdays
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other WooCommerce steps into one automation
Under the hood
The code that runs this automation
import secrets
from datetime import datetime, timedelta, timezone
from clickruntime import on_trigger, credentials, http, state, notify
STORE = "https://yourstore.com/wp-json/wc/v3"
@on_trigger
def run(event):
auth = (credentials.secret("WC_CONSUMER_KEY"), credentials.secret("WC_CONSUMER_SECRET"))
cutoff = (datetime.now(timezone.utc) - timedelta(hours=2)).strftime("%Y-%m-%dT%H:%M:%S")
orders = http.get(f"{STORE}/orders", auth=auth,
params={"status": "pending,failed", "before": cutoff, "per_page": 100}).json()
handled = set(state.get("handled") or [])
lines = []
for o in orders:
email = o["billing"]["email"]
if o["id"] in handled or not email:
continue
code = f"COMEBACK-{secrets.token_hex(3).upper()}"
http.post(f"{STORE}/coupons", auth=auth, json={
"code": code, "discount_type": "percent", "amount": "10",
"usage_limit": 1, "email_restrictions": [email]}).raise_for_status()
lines.append(f"- {o['billing']['first_name']} {o['billing']['last_name']} <{email}>: {code}")
handled.add(o["id"])
state.set("handled", sorted(handled)[-1000:])
if lines:
notify.email_me(f"{len(lines)} abandoned-order coupons created", "\n".join(lines))
return {"coupons": len(lines)}FAQ
Common questions
Does it email the customer automatically?
What discount value does the coupon carry?
Which orders count as abandoned?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Sort customers into champions, loyal, at-risk and lost
Once a month you see which customers buy often and recently, and which have drifted away.
See how it worksGet a morning list of low-stock products
Products dropping under your threshold are emailed to you each morning, without repeats of ones already flagged.
See how it worksCatch orders stuck in processing
A daily email names orders that have sat in processing too long, so none get forgotten.
See how it worksKeep exploring
Set up “Make follow-up coupons for unfinished orders” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.