Alpha Insights webhooks send one JSON payload per run. The run is scheduled (daily, weekly, or monthly at ~1am) and always uses the same structure; only the date range and data change. Below is a simplified payload example and practical ways to use it with Zapier, Make, Slack, or your own endpoint.
The body is a single JSON object. This example shows the top-level shape and representative fields. Your actual payload will include more metrics and full order/expense rows.
{
"date_from": "2024-01-01",
"date_to": "2024-01-31",
"sales_data_summary": {
"total_order_count": 142,
"total_order_revenue": 28450.00,
"total_order_revenue_ex_tax": 25863.64,
"total_order_cost": 11200.00,
"total_order_profit": 14663.64,
"average_order_value": 200.35,
"average_order_margin": 56.67,
"total_freight_recovery": 1200.00,
"total_freight_cost": 800.00,
"total_payment_gateway_costs": 450.00
},
"expense_data_summary": {
"total_amount": 3200.00,
"total_amount_paid": 3000.00,
"average_expenses_per_day": 103.23
},
"store_profit_summary": {
"total_store_profit": 11463.64,
"average_store_margin": 44.28,
"daily_average_store_profit": 369.79
},
"orders": {
"12345": {
"order_id": 12345,
"date_created": 1704067200,
"total_order_revenue": 199.00,
"total_order_cost": 85.00,
"total_order_profit": 114.00,
"order_status": "wc-completed",
"payment_gateway": "stripe",
"billing_email": "customer@example.com"
}
},
"expenses": [
{
"title": "Office supplies",
"date_created": "2024-01-15",
"date_paid": "2024-01-20",
"amount_paid": 150.00,
"expense_type": "General",
"recurring_expense": 0,
"is_paid": 1
}
]
}
sales_data_summary, expense_data_summary, and store_profit_summary are the same totals you see in Alpha Insights reports for that date range. orders is an object keyed by order ID; expenses is an array of expense records. Field names and nesting match the data warehouse; use the “Webhook Test Data Output” on the webhook settings page to see the exact structure for your store.
date_from and date_to are both yesterday.date_from is Monday of last week, date_to is Sunday of last week.date_from is the first day of last month, date_to is the last day of last month.There are no per-order or per-event webhooks; every run is a batch for the chosen period.
Goal: Add one row per week with store profit and order totals.
date_from, date_to, store_profit_summary.total_store_profit, sales_data_summary.total_order_count, sales_data_summary.total_order_revenue, sales_data_summary.total_order_profit.Goal: Post a short daily summary to a Slack channel.
Goal: Send last month’s full order and expense data to your own API for archiving or BI.
orders (all orders in the range), expenses, and the three summaries.Goal: Add a row to a sheet (or CRM) for each order in the webhook payload.
The webhook does not fire once per order; it fires once per schedule with an orders object. In Zapier, after the webhook trigger:
orders into an array of order objects (e.g. iterate over the object keys and use each order as an item).order_id, total_order_revenue, total_order_profit, billing_email, etc.For a Daily webhook, that gives you one run per day with all of yesterday’s orders; you then loop and create one row per order.