FINANCE

Nightly Statistical Anomaly Scan on the Day's Expense Submissions

Runs once a night, scores every report submitted that day against each employee's historical spend baseline in Snowflake.

CategoryFinance
Enginesim
Difficultyadvanced
Triggerschedule
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerNightly schedule after submission cutoff
  • ActionQuery day's reports + 12-month baselinesSnowflakeSnowflake
  • LogicCompute per-report z-score and tag outliers
  • LogicRank by anomaly score, collapse clean reports
  • ActionPost ranked anomaly digest to finance SlackSlack
  • OutputWrite scored results to Snowflake audit tableSnowflakeSnowflake

What it does

Replaces gut-feel spot checks with a statistical sweep. Each night it pulls the day's submissions, compares every employee's totals and category mix against their own rolling baseline, and computes an outlier score. The result is a single ranked digest that tells finance exactly which handful of reports to actually open.

When to use it

Use this when you cannot review every report in real time but want a reliable daily triage of the unusual ones — sudden spend spikes, new merchant categories, or end-of-quarter dumps. Best for finance teams that batch their review.

How it works

  1. 1A nightly schedule triggers after the submission cutoff.
  2. 2A Snowflake query returns the day's reports plus each submitter's 12-month spend baseline by category.
  3. 3A logic step computes a per-report z-score and tags spikes, off-pattern categories, and round-number clusters.
  4. 4Reports are ranked by outlier score and the clean majority is collapsed into a count.
  5. 5A Slack message posts the ranked digest to the finance channel with deep links to the top flagged reports.
  6. 6The full scored result set is written back to a Snowflake audit table.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect SnowflakeWarehouses, queries, shares.
  2. 2
    Connect SlackChannels, DMs, threads, mentions.
  3. 3
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  4. 4
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  5. 5
    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.