Skip to content

The moment it happens

Spot customers who cross a spend milestone

You're told the moment a customer's lifetime spend passes your threshold, so you can thank them.

Runs
The moment it happens
Apps
WooCommerce
AI
Not needed
Access
read

Send this to your assistant

Create a ClickRuntime automation: when a WooCommerce order is completed, check that customer's total spend and Slack me in #vip if it has just gone past $1,000.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

Every shop has customers whose lifetime spend quietly passes the point where they deserve special treatment, such as a thank-you, early access or a direct line to the owner. WooCommerce stores each customer's total_spent, but it does not tell you when someone crosses a figure. The customer who reached 1,000 last month keeps getting the same anonymous service as a first-time buyer, and may drift away without ever feeling noticed.

When a customer is created or updated, for example after an order completes, the automation reads their total_spent value and compares it with the value it remembered. If they have crossed your threshold, it posts a message in Slack with the customer and their new total, exactly once.

It fits shops that want to treat their best buyers differently without watching a report.

What you get out of it

  • Thank people at the right moment

    A personal note right after someone passes a milestone shows the shop noticed, which builds loyalty in a way a generic newsletter cannot. The cost is a few minutes of effort for a customer worth far more than that.

  • Keep top spenders from drifting

    A customer who spent a lot is worth keeping. Knowing when they arrive lets you add them to a VIP list while the relationship is strong. Treating them as a group makes it easier to plan perks that feel genuine rather than random.

  • Reward without a loyalty platform

    A Slack message and a manual perk such as free shipping costs far less than a points system, and suits shops with a modest number of top customers. Shops with a small number of excellent customers rarely need a full points scheme.

  • Each customer is flagged once

    Because the remembered value is compared, a customer is announced only on crossing the line, not after every later order. That keeps the channel meaningful, since each message marks a real change and not noise.

  • Learn what top customers buy

    Looking at what VIPs ordered shows which products attract your best buyers, which is useful for planning stock and promotions. Insights like that guide what to stock and which products to feature in emails.

How it works

What happens, step by step

  1. When a WooCommerce order is completed, ClickRuntime checks how much that customer has spent in total.

  2. It compares this with the total it saw last time, to tell when the customer has just crossed your milestone, such as $1,000.

  3. When they do, a message goes to your #vip Slack channel with their name, email, total spend and number of orders.

Before it runs live

  • Connect WooCommerce
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Spot customers who cross a spend milestonejust nowSucceeded
Slack · #vip🌟 Dana Fox (dana@acme.example) just passed $1,000: $1,042.80 across 9 orders

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • 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

  • Act only on the items that match your own rules, and skip the rest
  • 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

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
vip_customer_detection.pyexample
from clickruntime import on_event, credentials, http, state, notify

STORE = "https://yourstore.com/wp-json/wc/v3"
VIP_LINE = 1000

@on_event
def handle(event):
    order = event.json
    if order.get("status") != "completed" or not order.get("customer_id"):
        return {"checked": False}
    auth = (credentials.secret("WC_CONSUMER_KEY"), credentials.secret("WC_CONSUMER_SECRET"))
    cid = order["customer_id"]
    orders = http.get(f"{STORE}/orders", auth=auth,
                      params={"customer": cid, "status": "completed", "per_page": 100}).json()
    spent = sum(float(o["total"]) for o in orders)
    before = state.get(f"spent:{cid}") or 0
    state.set(f"spent:{cid}", spent)
    if before < VIP_LINE <= spent:
        customer = http.get(f"{STORE}/customers/{cid}", auth=auth).json()
        notify.slack(f"🌟 {customer['first_name']} {customer['last_name']} ({customer['email']}) "
                     f"just passed ${VIP_LINE:,}: ${spent:,.2f} across {len(orders)} orders", channel="#vip")
    return {"customer": cid, "spent": spent}

FAQ

Common questions

What threshold should I use?
Pick a figure that marks a genuinely loyal customer in your business, perhaps the top five percent of spenders. If it is too low, you will be flagging many people and the recognition loses meaning.
Does it count refunded orders?
It uses the total_spent figure WooCommerce maintains for each customer. How refunds affect that number depends on your store settings, so check a known customer's value if refunds are common in your shop. Test with a customer whose spend you know.
Can I have more than one level, such as silver and gold?
Yes. You can set several thresholds, and each crossing is announced once with its label. Tell your AI assistant the levels you want and what perk goes with each. Each level is announced once as it is crossed.
What permissions does it need?
read. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Spot customers who cross a spend milestone” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.