Skip to content

On a schedule

Get a weekly Slack report of rising and slowing products

Every Monday your team sees which categories and SKUs sold more or less than usual last week, with the ones at risk called out.

Runs
On a schedule
Apps
Slack, WooCommerce
AI
Optional
Access
Woo read; chat:write

Send this to your assistant

Create a ClickRuntime automation: every Monday, compare last week's WooCommerce sales by category and SKU with the previous four weeks and post what's rising, what's slowing and any risky SKUs to #sales.

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

Total revenue can look steady while a once-reliable product quietly fades and a new one takes off. A store owner glancing at weekly totals misses both, and ends up overstocked on the fading line and short on the rising one.

A weekly trend report breaks sales down by category and SKU against the recent average, so buying, promotion and listing decisions follow what customers are actually doing.

What you get out of it

  • Spot slow decline early

    A product selling 30% less each week is easy to miss in a total. Seeing it by name gives time to discount, promote or stop reordering.

  • Back the winners

    Rising SKUs are visible within a week, so you can increase stock and ad spend while demand is growing.

  • Smarter buying

    Purchase orders can follow four-week trends instead of gut feel, which reduces both dead stock and sell-outs.

  • A short written read

    Optional AI commentary turns the table into two or three plain sentences the whole team can follow.

How it works

What happens, step by step

  1. Every Monday morning, ClickRuntime fetches last week's paid WooCommerce orders.

  2. It adds up units sold for each product and category.

  3. It compares each figure with the average of the previous four weeks, which it keeps from earlier reports.

  4. If AI is available, it writes a two-sentence summary of what changed.

  5. It posts the rising and slowing products, and any at-risk SKUs, to #sales in Slack.

Before it runs live

  • Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)
  • Connect WooCommerce

What you get

RunsOn a schedule
Get a weekly Slack report of rising and slowing productstoday, 9:00Succeeded
Slack · #salesRising: NW-MUG-BLU 38 (avg 21). At risk: ACME-TOTE-L 4 (avg 15)

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
  • Change what the AI looks for, or how it writes the result
  • Add another app, for example also send it to Google Sheets
  • Combine it with other Slack and 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.
category_and_sku_sales_trend_report.pyexample
from datetime import date, timedelta
from collections import Counter
from clickruntime import on_trigger, credentials, http, state, notify, ai

STORE = "https://shop.example.com/wp-json/wc/v3"

@on_trigger
def run(event):
    auth = (credentials.secret("WOO_KEY"), credentials.secret("WOO_SECRET"))
    end = date.today() - timedelta(days=date.today().weekday())
    orders = http.get(f"{STORE}/orders", auth=auth, params={"after": f"{end - timedelta(days=7)}T00:00:00",
                      "before": f"{end}T00:00:00", "status": "processing,completed", "per_page": 100}).json()
    week = Counter()
    for o in orders:
        for li in o["line_items"]:
            week[li.get("sku") or li["name"]] += li["quantity"]
    past = state.get("weeks") or []
    avg = {k: sum(w.get(k, 0) for w in past) / len(past) for k in set(week).union(*past)} if past else {}
    rising = [f"{k} {week[k]} (avg {a:.0f})" for k, a in avg.items() if a and week[k] > 1.3 * a]
    risky = [f"{k} {week[k]} (avg {a:.0f})" for k, a in avg.items() if a >= 3 and week[k] < 0.6 * a]
    text = f"Last week: {sum(week.values())} units\nRising: {', '.join(rising) or 'none'}\nAt risk: {', '.join(risky) or 'none'}"
    try:
        text += "\n" + ai.generate(f"Summarise these sales trends in two plain sentences:\n{text}", max_output_tokens=120).text
    except ai.AIError:
        pass
    notify.slack(text, channel="#sales")
    state.set("weeks", (past + [dict(week)])[-4:])
    return {"skus": len(week)}

FAQ

Common questions

How is a trend calculated?
Last week's units for each SKU are compared with its average over the previous four weeks, which the automation stores after each run.
What makes a SKU risky?
By default, a drop of more than 40% against its average, or a SKU that sold nothing after selling steadily. You can set your own rules.
Does it need AI?
No. The figures and lists come from plain calculation. AI only adds a short written summary when your workspace has AI available.
What permissions does it need?
Woo read; chat:write. Nothing else in your accounts is used.
Does it need AI?
No, but you can ask for an AI step (for example a summary). It then uses ClickRuntime's built-in AI allowance.
How many runs does it use?
One run each time it runs (on a schedule). 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 “Get a weekly Slack report of rising and slowing products” from your assistant

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