FINANCE

Real-Time Alert When a Cohort Crosses Into Unprofitable Territory

Watches BigQuery for the moment a cohort's gross margin crosses from positive to negative versus the prior period and fires an immediate Slack and PagerDuty alert so the crossing…

CategoryFinance
Enginesim
Difficultyintermediate
Triggerschedule
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerEvery 4 hours, business hours
  • ActionPull current vs prior margin snapshot from BigQueryGoogle BigQueryBigQuery
  • LogicDetect positive-to-negative crossings
  • ActionPost crossing alert to SlackSlack
  • OutputOpen finance on-call incident in PagerDutyPagerDutyPagerDuty

What it does

Detects the specific event of a customer cohort flipping from profitable to unprofitable between consecutive measurement periods. It compares the current margin snapshot against the last recorded state and alerts only on the crossing, not on every cohort that is merely low.

When to use it

Use it when you care about the inflection point. A cohort sitting at a steady 5 percent margin is known and budgeted; a cohort that just went negative is news and needs an owner today.

How it works

  1. 1A schedule runs every 4 hours during business hours.
  2. 2BigQuery returns each cohort's current margin alongside its previous snapshot value.
  3. 3A logic step isolates cohorts where the sign flipped from non-negative to negative since last check.
  4. 4If a true crossing exists, Slack posts the cohort, the before and after margin, and the suspected cost driver.
  5. 5PagerDuty raises a low-urgency incident assigned to the finance on-call so the crossing gets an owner.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect BigQueryDatasets, queries, schemas.
  2. 2
    Connect SlackChannels, DMs, threads, mentions.
  3. 3
    Connect PagerDutyIncidents, on-call, escalations.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.