Views

Link to section

Overview

Views are the recommended way to query the Reporting API. They pre-join data from multiple cubes, pre-filter to relevant records, and expose human-readable dimensions like location_name instead of raw IDs.

Note

For most reporting tasks, start with a view. Use cubes directly only when you need raw, unfiltered data or fields not exposed through any view.

Link to section

Available views

ViewMeasuresDimensionsSegmentsPrimary Use Case
Sales23237Order-level sales, revenue, tips, discounts
ItemSales37425Item-level sales with discounts, modifiers, combos
ModifierSales10182Modifier-level sales analysis
KDS22424Kitchen ticket and item prep times
SpeedOfService25218Order entry/service time + sales + KDS metrics
PeerBenchmarkHourlySales490Hourly sales distribution vs peers
PeerBenchmarkOrderValue470Average order value benchmarking vs peers
PeerBenchmarkSalesTrend1070Year-over-year sales growth vs peers
Link to section

Sales view

The Sales view is the recommended starting point for most sales reporting. It reports only on closed (fully settled) orders and includes dimensions for location, channel, customer, and employee analysis.

Note

No segment needed. The Sales view automatically filters to closed orders — you don't need to add segments: ["Orders.closed_checks"] like you would when querying the Orders cube directly.

Link to section

Measures

MeasureTypeDescription
top_line_product_salessumGross sales (default "sales" measure — use this unless you need a specific qualifier)
net_salessumTop-line sales minus discounts and itemized returns
total_collected_amountsumTotal collected from customer (includes tips, tax, gift cards, returns)
total_sales_amountsumTotal sales amount for the order
order_countcountNumber of orders
avg_net_salesavgAverage net sales per order
avg_top_line_product_salesavgAverage gross sales per order
avg_total_collectedavgAverage total collected per order
avg_total_salesavgAverage total sales per order
discounts_amountsumTotal discounts applied
comps_amountsumTotal comps applied
itemized_returnssumItemized returns (excludes refunds, discounts, comps)
refunds_by_amount_amountsumNon-itemized refunds (money given back)
tips_amountsumTotal tips (excludes cash tips and auto-gratuity)
sales_tax_amountsumSales tax collected
gift_card_sales_amountsumRevenue from Square Gift Card sales (not purchases made with gift cards)
top_line_product_sales_countsumOrders contributing to gross sales
net_sales_countsumOrders contributing to net sales
total_sales_countsumOrders contributing to total sales
location_countcountUnique locations
unique_customerscountDistinctUnique customers
customer_visit_countcountCustomer visits (purchases)
employee_countcountUnique team members
Link to section

Key dimensions

DimensionTypeDescription
location_namestringLocation display name
location_idstringLocation identifier
local_reporting_timestamptimeTimestamp in location's local timezone
local_datestringDate in YYYY-MM-dd format, local timezone
local_day_of_weekstringDay of week name, local timezone
local_hournumberHour of day (0-23), local timezone
channel_namestringSales channel display name
channel_categorystringHigh-level channel category
customer_typestringNEW or RETURNING
customer_idstringCustomer identifier
employee_full_namestringTeam member full name
order_idstringOrder identifier
merchant_idstringMerchant identifier
distinct_item_namesstringComma-separated item names on order
item_quantitiesstringItems with quantities (e.g., "Beer x 2, Burger x 1")
distinct_item_countnumberNumber of distinct line items
had_loyalty_at_purchasebooleanWhether customer had active loyalty
Link to section

Segments

SegmentDescription
in_storeIn-store sales channels
onlineOnline sales channels
has_tipOrders with tips
no_tipOrders without tips
has_customerOrders linked to a customer
new_customersFirst-time customers only
returning_customersReturning customers only
Link to section

Example: Daily sales by location

{ "measures": ["Sales.net_sales", "Sales.order_count"], "dimensions": ["Sales.location_name"], "timeDimensions": [{ "dimension": "Sales.local_reporting_timestamp", "dateRange": "last 30 days", "granularity": "day" }] }
Link to section

Example: Online vs in-store sales

{ "measures": ["Sales.net_sales", "Sales.order_count"], "timeDimensions": [{ "dimension": "Sales.local_reporting_timestamp", "dateRange": "last 7 days" }], "segments": ["Sales.online"] }
Link to section

ItemSales view

The ItemSales view provides item-level sales data with related discounts, modifiers, and order-level metrics. Like the Sales view, it reports only on closed orders.

Link to section

Key measures

MeasureTypeDescription
countcountItem transaction count
items_sold_countsumItems sold (handles fractional quantities)
items_returned_countsumItems returned
net_quantitysumNet quantity (sales minus returns)
item_net_salessumNet item sales
item_net_sales_with_taxsumNet item sales including tax
sales_gross_amountsumGross sales for sold items
returns_gross_amountsumGross return amount (negative)
avg_item_gross_salesavgAverage gross sales per item
avg_item_net_salesavgAverage net sales per item
discount_amountsumNet discount amount
unique_customerscountDistinctUnique customers
Link to section

Key dimensions

DimensionTypeDescription
item_namestringItem name
category_namestringItem category
item_variation_namestringItem variation name
item_skustringSKU
location_namestringLocation display name
local_reporting_timestamptimeLocal timestamp
local_datestringLocal date (YYYY-MM-dd)
modifier_namestringModifier name
modifier_list_namestringModifier list/group name
discount_namestringDiscount or comp name
channel_namestringSales channel
customer_typestringNEW or RETURNING
transaction_typestringSALE or RETURN
payment_methodstringPayment method
Link to section

Segments

SegmentDescription
salesSales transactions only
returnsReturn transactions only
has_customerOrders with a linked customer
new_customersFirst-time customers
returning_customersReturning customers
Link to section

Example: Top-selling items

{ "measures": ["ItemSales.items_sold_count", "ItemSales.item_net_sales"], "dimensions": ["ItemSales.item_name", "ItemSales.category_name"], "timeDimensions": [{ "dimension": "ItemSales.local_reporting_timestamp", "dateRange": "last 30 days" }], "order": { "ItemSales.item_net_sales": "desc" }, "limit": 20 }
Link to section

ModifierSales view

The ModifierSales view provides modifier-level sales data for closed orders.

Note

Important: modifier_name is not unique across modifier lists. Always group by both modifier_list_name and modifier_name when analyzing individual modifiers. For example, "Large" could exist in both a "Size" list and a "Drink Size" list.

Link to section

Measures

MeasureTypeDescription
orders_countcountDistinctUnique orders with modifiers
quantity_soldsumModifiers sold
quantity_returnedsumModifiers returned
net_quantitysumNet quantity (sales minus returns)
gross_salessumGross modifier sales
net_salessumNet modifier sales
returns_amountsumReturns amount
avg_gross_salesavgAverage gross sales per modifier
avg_net_salesavgAverage net sales per modifier
avg_modifier_priceavgAverage modifier price
Link to section

Key dimensions

DimensionTypeDescription
modifier_namestringModifier name (not unique — always pair with modifier_list_name)
modifier_list_namestringModifier list/group name (e.g., "Size", "Toppings")
item_namestringItem the modifier was applied to
location_namestringLocation display name
local_reporting_timestamptimeLocal timestamp
channel_namestringSales channel
Link to section

Example: Top modifier combinations

{ "measures": ["ModifierSales.quantity_sold", "ModifierSales.net_sales"], "dimensions": [ "ModifierSales.modifier_list_name", "ModifierSales.modifier_name", "ModifierSales.item_name" ], "timeDimensions": [{ "dimension": "ModifierSales.local_reporting_timestamp", "dateRange": "last 30 days" }], "order": { "ModifierSales.quantity_sold": "desc" }, "limit": 20 }
Link to section

Other views

Link to section

KDS (Kitchen Display System)

Kitchen ticket and item performance metrics. Measures include ticket counts, prep/completion times, on-time vs late percentages, and item-level timing.

Warning

Kitchen tickets are not the same as sales orders. Use the Sales view for sales reporting and KDS for kitchen operations analysis.

Link to section

SpeedOfService

Combines speed-of-service metrics (order entry time, service time) with sales measures and optional KDS ticket metrics. Useful for analyzing operational efficiency alongside revenue.

Link to section

PeerBenchmark views

Three views for benchmarking your sales against similar businesses in the same city and category:

  • PeerBenchmarkHourlySales — Sales distribution by hour of day vs peers
  • PeerBenchmarkOrderValue — Average order value vs peers
  • PeerBenchmarkSalesTrend — Year-over-year sales growth vs peers

Note

Not all merchants have a matching peer cohort. These views use my_ prefix for your metrics and peer_ prefix for peer-group metrics. Filter cadence to exactly one value (weekly, monthly, or yearly).

Link to section

Views vs cubes

ViewsCubes
Pre-filteredYes (e.g., Sales only includes closed orders)No — you add segments yourself
Human-readableYes (location_name, channel_name)IDs only (location_id)
Pre-joinedYes (combines data from multiple cubes)Single data domain
Recommended forStandard reportingAdvanced/raw data access
Segment needed?Optional (for further filtering)Usually required (e.g., closed_checks)