Sales report
sales_reportGenerates sales for a date range grouped by day, week, month, product, or customer, reporting gross, refunds, and net totals in cents while excluding pending and cancelled orders that never captured money.
Instructions
Sales for a date range (by order placed date), grouped by day, ISO week, month, product, or customer. Reports gross, refunds and net (gross minus refunds issued against those orders), all in cents. Pending and cancelled orders are excluded because no money was captured.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Last day included (YYYY-MM-DD). | |
| from | Yes | First day included (YYYY-MM-DD, by order placed date). | |
| group_by | No | day | week (ISO, Monday start) | month | product | customer | month |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | ||
| from | Yes | ||
| rows | Yes | ||
| basis | Yes | order_totals: gross = order totals incl. shipping. line_items (product view): gross = item revenue excl. shipping, refunds allocated pro-rata. | |
| totals | Yes | ||
| group_by | Yes |