Daily
See your top Square items and how today compares
A daily email names the three best-selling items and compares the day's total with the same weekday last week.
- Runs
- Daily
- Apps
- Square
- AI
- Not needed
- Access
- read
Send this to your assistant
Create a ClickRuntime automation: every evening at 9pm, email me my top 3 Square items by quantity today and compare today's total sales with the same day last week.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A Square seller who runs a lunch counter or a gift shop wants to know two things most days: which items are selling, and whether this week is better or worse than last. The dashboard gives totals, but ranking items means exporting orders and comparing weeks takes a spreadsheet and a free hour. So menus and orders are planned by feel. The soup that no one buys stays on the menu, and the item that sells out by noon is never made in a bigger batch.
Each day, ClickRuntime searches orders, adds up line items by name and quantity, compares today's total with a counter it stored for the same weekday last week, and emails you the top items and the percentage change. Orders are read directly from Square, so the counts match your sales.
Restaurants, cafes, shops and market stalls use it to guide purchasing and menus.
What you get out of it
Menus follow what sells
When the ranking shows the same few items on top and others at the bottom, you can stop making what does not sell and prepare more of what does. Fewer unsold items means less waste and a tighter, more profitable menu.
Buying decisions are better informed
Knowing your top sellers helps size orders to suppliers, so that stock matches demand. Less is wasted on slow items, and bestsellers rarely run out during the lunch rush. Supplier orders are then based on facts and cost less over time.
Trends are clear
The week-over-week comparison shows whether sales are growing or slipping for the same weekday. A drop on Tuesdays, for example, may suggest a promotion or a change of hours. A trend you can see is one you can respond to.
Staff are scheduled with data
If Thursdays are consistently stronger than the same day last week, a manager can add a person to the rota, and avoid being short-staffed on busy days. Better rotas mean happier staff and shorter queues.
Promotions can be measured
After a special offer, the next morning's email shows whether sales rose against the same weekday a week earlier, so you learn which promotions repay their cost. Learning what works makes the next promotion better.
How it works
What happens, step by step
Once a day, ClickRuntime collects today's Square orders.
It counts how many of each item were sold and ranks them.
It compares today's sales with the same day last week, which it saved at the time.
You get an email with your top sellers and today's sales with the change against last week.
Before it runs live
- Connect Square
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 Square steps into one automation
Under the hood
The code that runs this automation
from collections import Counter
from datetime import date, timedelta
from clickruntime import on_trigger, credentials, http, state, notify
API = "https://connect.squareup.com/v2"
def square_headers():
return {"Authorization": f"Bearer {credentials.secret('SQUARE_ACCESS_TOKEN')}", "Square-Version": "2024-10-17"}
@on_trigger
def run(event):
h, today = square_headers(), date.today()
locations = [l["id"] for l in http.get(f"{API}/locations", headers=h).json()["locations"]]
orders = http.post(f"{API}/orders/search", headers=h, json={"location_ids": locations, "query": {"filter": {
"state_filter": {"states": ["COMPLETED"]},
"date_time_filter": {"closed_at": {"start_at": f"{today}T00:00:00Z", "end_at": f"{today}T23:59:59Z"}}}}}
).json().get("orders", [])
qty = Counter()
for o in orders:
for item in o.get("line_items", []):
qty[item["name"]] += float(item["quantity"])
total = sum(o["total_money"]["amount"] for o in orders) / 100
totals = state.get("daily_totals") or {}
last_week = totals.get((today - timedelta(days=7)).isoformat())
totals[today.isoformat()] = total
state.set("daily_totals", dict(sorted(totals.items())[-14:]))
top = "\n".join(f"{i + 1}. {name}: {q:g}" for i, (name, q) in enumerate(qty.most_common(3)))
vs = f" ({(total - last_week) / last_week:+.0%} vs last {today:%A})" if last_week else ""
notify.email_me(f"Square today: ${total:,.2f}{vs}", f"Top items:\n{top}\n\nSales: ${total:,.2f}{vs}")
return {"total": total}FAQ
Common questions
Why compare with the same weekday last week?
How are items ranked?
What happens in the first week?
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 each location's Square sales after closing
A nightly email breaks down the day's Square sales per location with tips, fees and card versus cash.
See how it worksList last week's new Square customers every Monday
Every Monday you get a count of the customers added last week with their names and emails.
See how it worksGet a Slack alert when Square stock runs low
When an item's count falls below 5, a Slack message names the item, location and count left.
See how it worksKeep exploring
Set up “See your top Square items and how today compares” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.