---
name: "signal-detection-engine"
description: "Build a signal detection engine: pick the buying signals that matter (job changes, funding, hiring, web activity), capture them through webhooks or scheduled pulls into one event log, normalise and dedupe, score each account with time decay, tier them, and send a short daily list with the reason and source link. Use when outreach lacks a reason to contact now, or signals sit in separate tools."
---

# Signal detection engine

## Goal
Turn scattered events into one ranked list of accounts to act on today, each with a dated reason and a source link. Part of GTM engineering. Feeds: waterfall-enrichment-router, multi-channel-orchestrator. Fed by: tam-builder, champion-tracker, website-visitor-deanonymizer.

## When to use
- Outreach goes out without a reason to contact now.
- Job changes, funding news and hiring posts are tracked by hand or not at all.
- Sales wants a short list with the reason, not a big list.

## Inputs
- Account list with domains (from the CRM or tam-builder).
- The 3 to 5 real situations in which your best deals started.
- Access to signal sources you already have: a job-change tracker, a funding feed, job boards, your web analytics, your CRM activity.
- A place to send the result (CRM field, Slack, sheet).

## Data model
One `events` table, one row per event:
`event_id, account_domain, person (optional), signal_type, event_date, source, source_url, detail, ingested_at`
One `weights.json` config: `signal_type, source, points, half_life_days, filters`.
Scores are computed, never typed in by hand, and stored with the date they were computed.

## Step 1. Choose signals
Start from the real deals. For each, write what happened in the 60 days before the first conversation. Group into 5 to 8 signal types. Typical candidates:
- Champion or past user changed jobs and landed at a target account.
- Funding round or a new executive hire.
- Hiring for a role your product helps, or hiring several people in one function.
- Visits to pricing or comparison pages (see website-visitor-deanonymizer).
- Mentions of a competitor, a tool change or a public complaint about the problem.
Drop any signal you cannot capture with a source link.

## Step 2. Capture events
- Webhook sources: write one receiver per source. Verify the signature if the provider sends one. Return a success code fast, then process. Store the raw payload as well as the normalised row.
- Pull sources: run a scheduled job (daily is enough for most). Keep a cursor so you only fetch new items.
- Manual sources: a shared sheet with the same columns is fine at first.
- Build an idempotency key `source + account + signal_type + event_date`. Ignore repeats.

## Step 3. Normalise
Map each account to a domain and match it to your account list. Unmatched events go to a review queue, not the trash. Normalise dates to UTC dates. Keep the original text in `detail`.

## Step 4. Score with decay
For each account, for each signal type, take the newest `max_events_per_type` events inside the window. Each contributes `points * 0.5 ^ (age_days / half_life_days)`. Sum across types. Faster-moving signals (web visits) get a short half-life; slower ones (funding) a longer one. Run `scripts/signal_score.py events.csv weights.json`.

## Step 5. Tier and route
- Hot: act today. A human reads the reasons and decides the first message.
- Warm: add to a sequence that references the signal.
- Watch: no action, keep collecting.
Send the daily digest: account, tier, top 2 reasons, newest source link. Only accounts that crossed a tier line since yesterday, so people see what is new.

## Step 6. Review weekly
Once a month, join the event log to replies and meetings. For each signal type compute: events, accounts, replies, meetings. Raise weights for types that lead to conversations. Lower or remove types with many events and no outcomes. Write the change and the date in a changelog.

## Tool options
Pick tools you already pay for. Events can come from a job-change tracker, a funding database, job board search, your product or web analytics, and CRM activity. Receivers can run on a serverless function, an automation platform or a small script on a schedule. Storage can be a warehouse table, Postgres or a sheet. The logic is the same in each.

## Output
`account_scores.csv`: `account_domain, score, tier, top_signals, newest_event_date, event_count`

## Success metrics
- Share of hot accounts that get a first touch within 1 working day.
- Reply and meeting rate on signal-based touches compared with the same list without a signal (use the experiment-harness holdout).
- Share of events that are duplicates or wrong-account (should fall over time).
- Time from event to digest.

## Guardrails
- Business events about companies and professional roles only. Do not track people's private lives or personal accounts.
- Keep the source link for every event so you can show where it came from.
- Follow each source's terms. Use official APIs, exports or alerts. No login bypass.
- A score suggests priority. A human decides whether to contact.
- Respect opt-outs: suppressed contacts never enter a digest.
