Toast Analytics model

Daily sales

Toast's daily sales KPIs per restaurant: orders, guests, gross and net sales, discounts, refunds, voids, average order value and sales per labor hour.

Grain
business date x restaurant
Built from
  1. 1
    Raw tables
  2. 1
    Staging
  3. 1
    Core
  4. 1
    Analytics
Reads from Toast Analytics
analytics_aggregated_sales
Ships as
Weld and dbt SQL, open source on GitHub
core.toast_analytics.daily_sales
1-- core.toast_analytics.daily_sales
2-- Toast's daily sales KPIs per restaurant: orders, guests, gross and net sales,
3-- discounts, refunds, voids, average order value and sales per labor hour.
4-- Grain: business date x restaurant.
5--
6-- The amounts are Toast's own, from its reporting API, so they match the Toast web
7-- reports by construction. The ratios are recomputed from the sums on each row
8-- rather than taken from Toast, so they re-aggregate correctly: to roll up, sum the
9-- numerators and denominators and divide again.
10--
11-- The labor columns here cover hourly jobs only, as Toast reports them in this
12-- endpoint. core.toast_analytics.labor_by_job has all jobs.
13
14SELECT
15    business_date,
16    restaurant_id,
17    restaurant_name,
18    orders,
19    closed_orders,
20    voided_orders,
21    discounted_orders,
22    guests,
23    gross_sales,
24    discounts,
25    net_sales,
26    refunds,
27    voided_amount,
28    SAFE_DIVIDE(net_sales, orders)                  AS avg_order_value,
29    SAFE_DIVIDE(net_sales, guests)                  AS net_sales_per_guest,
30    hourly_labor_hours,
31    hourly_labor_cost,
32    SAFE_DIVIDE(net_sales, hourly_labor_hours)      AS net_sales_per_hourly_labor_hour,
33    SAFE_DIVIDE(hourly_labor_cost, net_sales)       AS hourly_labor_pct_of_net_sales
34FROM {{staging.toast_analytics.aggregated_sales}}

This model and the 2 it depends on. Deploy them together; refs like {{staging.…}} resolve to the matching folders in Weld, and the dbt view uses source() and ref().

Notes

How it counts. And where it stops.

The amounts are Toast's own, from its reporting API, so they match the Toast web reports by construction. The ratios are recomputed from the sums on each row rather than taken from Toast, so they re-aggregate correctly: to roll up, sum the numerators and denominators and divide again. The labor columns here cover hourly jobs only, as Toast reports them in this endpoint. core.toast_analytics.labor_by_job has all jobs.

Raw tables it reads

  • raw.toast_analytics.analytics_aggregated_sales

Put Toast Analytics in front
of your agents.

Connect Toast Analytics, deploy the models, and ask questions in Claude, Cursor or ChatGPT. Free for 14 days, no credit card.