On a schedule
Post yesterday's store sales to Slack every morning
Each morning your team sees yesterday's orders, revenue and best sellers in Slack, with a warning when revenue is far above or below normal.
- Runs
- On a schedule
- Apps
- Slack, WooCommerce
- AI
- Not needed
- Access
- Woo read key; chat:write
Send this to your assistant
Create a ClickRuntime automation: every morning at 8, post yesterday's WooCommerce order count, revenue and top 3 products to #sales, and warn me if revenue is 50% above or below the 7-day average.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A small online shop owner checks the WooCommerce dashboard most mornings, but the rest of the team never does. A broken checkout or a payment gateway outage can cost a full day of sales before anyone notices the numbers are down, and a sudden spike from a mention goes uncelebrated and unstocked.
A daily snapshot in Slack makes yesterday's trading a shared fact. Comparing against the recent average turns a number into a signal: a big drop is a reason to check checkout, a big jump a reason to check stock.
What you get out of it
Problems surface the next morning
A sharp fall in revenue usually means something broke. Seeing it at 8am, not at the end of the week, limits the damage to a single day.
Everyone sees the same numbers
Marketing, fulfilment and the owner read one message instead of each pulling their own report, so conversations start from the same figures.
Spikes get acted on
When a product suddenly sells, the team knows to check stock and lean into whatever caused it while it's still working.
No admin logins needed
Staff who shouldn't have WooCommerce admin access can still follow how the shop is doing.
How it works
What happens, step by step
Every morning at 8, ClickRuntime fetches yesterday's paid orders from your WooCommerce store.
It adds up the order count and revenue and finds the three best-selling products.
It compares revenue with the average of the previous seven days, which it keeps from earlier runs.
It posts the summary to #sales in Slack, with a warning when revenue is 50% above or below that average.
Before it runs live
- Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)
- 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 Google Sheets
- Combine it with other Slack and WooCommerce steps into one automation
Under the hood
The code that runs this automation
from datetime import date, timedelta
from collections import Counter
from clickruntime import on_trigger, credentials, http, state, notify
STORE = "https://shop.example.com/wp-json/wc/v3"
@on_trigger
def run(event):
auth = (credentials.secret("WOO_KEY"), credentials.secret("WOO_SECRET"))
day = date.today() - timedelta(days=1)
orders = http.get(f"{STORE}/orders", auth=auth, params={"after": f"{day}T00:00:00", "before": f"{day}T23:59:59",
"status": "processing,completed", "per_page": 100}).json()
revenue = sum(float(o["total"]) for o in orders)
top = Counter()
for o in orders:
for item in o["line_items"]:
top[item["name"]] += item["quantity"]
history = state.get("history") or []
avg = sum(history) / len(history) if history else None
text = f"Yesterday: {len(orders)} orders, ${revenue:,.2f}. Top: " + ", ".join(f"{n} ({q})" for n, q in top.most_common(3))
if avg and abs(revenue - avg) > 0.5 * avg:
text += f"\n:warning: Revenue is {revenue / avg - 1:+.0%} vs the 7-day average (${avg:,.2f})"
notify.slack(text, channel="#sales")
state.set("history", (history + [revenue])[-7:])
return {"orders": len(orders), "revenue": revenue}FAQ
Common questions
Which orders count towards revenue?
What is the spike warning compared against?
Can I use a different threshold than 50%?
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
Get a daily Slack list of products running low
Every day your team sees which WooCommerce products have dropped below 10 in stock, so you reorder before they sell out.
See how it worksGet 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.
See how it worksFlag risky new store orders in Slack before shipping
Every new WooCommerce order is checked for warning signs, and risky ones are put on hold and posted to Slack before anything ships.
See how it worksKeep exploring
Set up “Post yesterday's store sales to Slack every morning” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.