Kisu
BigQuery alerts to SlackGoogle Sheets threshold alerts
PricingPrivacy PolicyTerms
← All articles

Commerce

Set a daily refund volume alert in BigQuery

Check completed refund counts against a review threshold and give the commerce team a prompt to investigate.

By Ranggalawe Istifajar

Created November 7, 2026Updated November 7, 2026

From a BigQuery result to a Slack message

Check every 12 or 24 hours

1. Calculate the metric1212 completed refundsOne numeric result from the example query
→
2. Check the conditionSum of completed refunds > 10?Condition met
→
3. Notify Slack if it matches
kisu alertsAPP9:00 AM
Set a daily refund volume alert in BigQueryTotal metric is 12, above your threshold of 10.BigQuery · example-projectChecked Jan 1, 2026 at 09:00 UTCView alert
Illustrative values only. The query returns one numeric result, which Sum preserves. A matching check queues a notification; delivery still needs to succeed.

A busy day of refunds is worth reviewing before the next weekly report. Count completed refunds over a rolling day, then send the result to the team that can inspect the underlying orders.

Prepare the data and define the metric

Prepare a refunds table with one row per refund, a TIMESTAMP completed_at, and a status. Decide whether partial refunds and multiple refunds for the same order each count. Exclude failed requests if you only want completed refunds.

The table and column names below are examples, not a built-in integration. Your existing process must make the data available in BigQuery and keep it current. Check permissions and remove sensitive details before sharing results. Google bills BigQuery usage separately; use partition filters where appropriate and check estimated bytes before running a query.

Run the example query

SELECT COUNT(*) AS metric
FROM `your-project.analytics.refunds`
WHERE status = 'completed'
  AND completed_at >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 24 HOUR)
  AND completed_at < CURRENT_TIMESTAMP()

Replace the project, dataset, table, columns, and status values with your own. This read-only SELECT returns one numeric row named metric. Run it against a representative test dataset and compare the result with your source system. The example uses a fixed threshold; it does not automatically compare against a previous period.

Set up the scheduled Slack check

  1. Connect BigQuery in Configuration using an account that can run jobs and read the table. An active Kisu subscription is required.
  2. Add a Slack destination and send a test. The Slack webhook guide explains how to create the webhook.
  3. Create an alert, paste the query, and load its columns. Select metric, choose Sum, and set the condition to greater than 10. Adjust the threshold to fit your team.
  4. Test the query, choose the tested destination, set a 12- or 24-hour schedule, and save. Schedule after the data is expected to arrive.

Use Sum, not Count, for this query. SQL has already calculated the number in the single returned row; counting that row would produce 1 rather than the metric. Testing the query and testing Slack delivery are separate steps.

Test the boundary and investigate a match

Try values on both sides of 10 and exactly 10 in a test dataset. The example uses a strict comparison, so the boundary itself does not match. Do not change production records just to test the alert.

Group the matching refunds by product and reason in your source reports. Check for a shared fulfillment or product issue before changing policy.

The alert counts refund transactions, not refunded dollars or a percentage of orders. A single order can contribute more than once. Check currency and deduplication before using an amount instead.

Check delivery and data health

Kisu checks every 12 or 24 hours, not in real time. A matching check queues a notification, but delivery can fail. Review the result and delivery status in History. New alerts notify when an issue starts; choose the persistent option if you need a reminder on each matching check.

A failed check or no-data result does not send a threshold notification or resolve an open incident. A numeric zero is different from no data. A successful query can still read stale or incomplete source data, so review the pipeline separately. See the daily import freshness guide and alert conditions guide for more checks.

Put your metric to work

Connect your data and set up a scheduled check. Start with 7 days free, then $12/month. See Pricing for subscription details.

Get started with Google

Keep reading

  • Find a backlog of abandoned checkouts with BigQuery
  • How to send BigQuery alerts to Slack
  • How to set up Google Sheets threshold alerts
Kisu

Kisu monitors BigQuery and Google Sheets and sends alerts when your conditions are met.

Questions? Contact [email protected].

Resources

  • BigQuery alerts to Slack
  • Google Sheets threshold alerts
  • Pricing
  • All articles

Blog

  • How to send BigQuery alerts to Slack
  • How to set up Google Sheets threshold alerts
  • KPI tracking: turn metrics into actionable alerts

© 2026 Kisu. All rights reserved.

  • Privacy Policy
  • Terms