Skip to content

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.

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

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

  1. Once a day, ClickRuntime collects today's Square orders.

  2. It counts how many of each item were sold and ranks them.

  3. It compares today's sales with the same day last week, which it saved at the time.

  4. 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

RunsDaily
See your top Square items and how today comparestoday, 9:00Succeeded
Email · Today's top sellers1. Oat flat white: 84 2. Almond croissant: 51 Sales: $2,914.50 (+9% vs last Tuesday)

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 Square 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.
top_sellers_and_week_over_week.pyexample
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?
Sales differ across the week, so comparing a Tuesday with a Saturday would mislead. Matching weekdays gives a fair comparison, and the stored counter from a week ago makes it possible. The comparison is fair because the days match. Weekday patterns can be strong in retail and food service, so the fair comparison is worth the extra step.
How are items ranked?
By quantity sold, using the line items on completed orders. If you would rather rank by revenue, which helps when one item is expensive and another cheap, you can specify that and the list will follow. Quantity is the default.
What happens in the first week?
With no counter stored from last week, the first emails show top items without a comparison. After seven days, the stored figures exist and the percentage change appears from then on. Nothing is wrong in that case.
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 each time it runs (daily). 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 “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.