Skip to content

Monthly

Find good customers who stopped ordering

Each month you get repeat customers who haven't ordered in 90 days, highest spenders first.

Runs
Monthly
Apps
Shopify
AI
Not needed
Access
read_customers, read_orders

Send this to your assistant

Create a ClickRuntime automation: on the 1st of each month, email me Shopify customers with 2 or more orders whose last order was over 90 days ago, sorted by total spent.

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

Repeat buyers are usually a small share of a Shopify store's customers and a large share of its revenue. When one of them goes quiet there is no event to react to: nobody cancels, nothing fails, the orders just stop. A customer who bought four times in a year and then disappears for ninety days is worth a message, but nobody is looking at a list of customers sorted by last order date, so the chance passes.

Once a month, ClickRuntime queries customers with more than one order, checks the date of their most recent order, keeps those who have not ordered in 90 days, sorts them by lifetime spend and emails you the list. Each row has the customer's name, email, order count, total spent and last order date, ready to paste into a win-back campaign.

Stores with consumables, such as coffee, skincare or pet food, tend to get the most from it, because the natural reorder window is predictable.

What you get out of it

  • Win-back effort goes to the best customers

    The list is ordered by total spent, so a handful of emails or a personal discount offer can be aimed at the people whose return matters most, rather than at everyone who ever bought once.

  • Churn becomes visible in numbers

    A monthly list shows whether the lapsed group is growing. If forty names appear this month and ten appeared last quarter, something changed in product, price or service that deserves attention.

  • Marketing gets a ready audience

    Instead of building a segment by hand in Shopify each time, your email tool gets a clean list of repeat customers with last-order dates, so the campaign can mention what they bought and when.

  • Replenishment timing can be tested

    Seeing how long loyal customers typically wait before lapsing helps you pick the right moment for a reminder, whether that is sixty days for soap or a hundred and twenty for a mattress topper.

  • Revenue loss is measured, not guessed

    Adding up the lifetime spend on the list tells you how much recurring revenue is at risk, which is a far stronger case for investing in retention than a general feeling that repeat sales are slowing.

How it works

What happens, step by step

  1. Once a month, ClickRuntime finds Shopify customers who have ordered more than once.

  2. It keeps the ones whose last order was more than 90 days ago.

  3. They are sorted by how much they have spent, highest first.

  4. You get an email with each customer's name, email, order count, total spent and last order date.

Before it runs live

  • Connect Shopify

What you get

RunsMonthly
Find good customers who stopped orderingtoday, 9:00Succeeded
Email · 18 repeat customers gone quiet 90+ daysDana Ruiz <dana@northwind.example> 7 orders 1,240.00 last 2026-06-03

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

  • 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 Shopify 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.
lapsed_customer_churn_risk_report.pyexample
from datetime import date, timedelta
from clickruntime import on_trigger, credentials, http, notify

STORE = "your-store.myshopify.com"

def gql(query, variables=None):
    resp = http.post(f"https://{STORE}/admin/api/2025-07/graphql.json",
                     headers={"X-Shopify-Access-Token": credentials.connection("shopify", "store")},
                     json={"query": query, "variables": variables or {}})
    resp.raise_for_status()
    return resp.json()["data"]

QUERY = """query($q: String!, $after: String) { customers(first: 100, query: $q, after: $after) {
  pageInfo { hasNextPage endCursor }
  nodes { displayName email numberOfOrders amountSpent { amount currencyCode } lastOrder { createdAt } } } }"""

@on_trigger
def run(event):
    cutoff = (date.today() - timedelta(days=90)).isoformat()
    lapsed, after = [], None
    while True:
        page = gql(QUERY, {"q": "orders_count:>1", "after": after})["customers"]
        lapsed += [c for c in page["nodes"] if c["lastOrder"] and c["lastOrder"]["createdAt"][:10] < cutoff]
        if not page["pageInfo"]["hasNextPage"]:
            break
        after = page["pageInfo"]["endCursor"]
    lapsed.sort(key=lambda c: -float(c["amountSpent"]["amount"]))
    lines = [f"{c['displayName']} <{c['email']}>  {c['numberOfOrders']} orders  "
             f"{float(c['amountSpent']['amount']):,.2f}  last {c['lastOrder']['createdAt'][:10]}" for c in lapsed]
    notify.email_me(f"{len(lapsed)} repeat customers gone quiet 90+ days", "\n".join(lines) or "None this month.")
    return {"lapsed": len(lapsed)}

FAQ

Common questions

How is a repeat customer defined?
A customer counts as repeat when Shopify shows more than one order on their record, using the orders count field. One-time buyers are left out on purpose, since the point is to catch people who showed loyalty and then stopped, not to chase every first purchase.
Can I use 60 or 180 days instead of 90?
Yes. Ninety days is a common default, but a store selling monthly refills may want 45 and one selling furniture may want a year. State the number you prefer and the report will use that window going forward.
Does the report email customers directly?
No. It only sends the list to you or your team. Nothing is sent to the customers themselves, so you decide what offer or wording to use and which tool to use for it, and nobody receives a message you have not approved.
What permissions does it need?
read_customers, read_orders. 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 each time it runs (monthly). Checks that find nothing to do and stop right away aren't counted.
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 “Find good customers who stopped ordering” from your assistant

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