Loop CRM-2 · Sales & CRM · reports to 4 BU leads + Rajiv

The first pipeline visibility the BU leads have ever had.

Every Monday: what moved in each business unit's pipeline last week — what advanced, what stalled, what was won and lost, and the five biggest moves narrated in plain language.

Built & tested — pilotWave 3🕐 Weekly Monday⚙️ Hermes bizops (planned)
Part 1 — the plain-english view

Week-over-week movement, one screen per business unit.

What it watches
  • Each BU's open pipeline: deal counts and value per stage
  • Week-over-week movement: new, advanced, won, lost, value deltas
  • The five biggest moves of the week, told as one-liners
When & how it speaks

Monday morning: a short message per BU lead, plus (as the company feed rolls out) one card per business unit with a stacked pipeline chart.

Why it exists

Odoo keeps no history of aggregates — nobody can answer “is our pipeline growing?” The loop builds that memory itself, one weekly snapshot at a time. Baseline captured: AED 382M open pipeline across 635 deals — junk-inflated today, which is exactly why CRM-1 runs first.

AED 382M
open pipeline at baseline — before CRM-1's cleanup makes the number honest
4 BUs
each lead sees their own unit's pulse — nobody is ranked against anyone
5 moves
narrated per week — the human-readable version of the deltas

Monday 08:00

Before the week's pipeline reviews

👀

Reads the CRM

Every open deal, per team and stage

📸

Snapshots

Appends this week's counts/values to its own history table

📊

Diffs vs last week

New, advanced, won, lost — per team

💬

One brief per BU

Numbers + the five biggest moves in plain words

What it will never doNever ranks salespeople against each other — each lead sees their own BU only.
Where it stands today · July 2026Built and tested; baseline snapshot captured. Deliberately waiting for two weeks of CRM-1 cleanup plus two weeks of its own snapshots before the first week-over-week digest ships — we won't report numbers we don't trust.
Part 2 — under the hood

How it's wired: systems, models, and the path a number takes.

For implementers and the technically curious. The full build sheet — verified queries, thresholds, and build notes — lives on the specs page.

ReadsOdoo CRM (read-only)
Open deals per team, stage, value
Stepcrm2_pulse.py
Snapshot + week-over-week diff per team
Statecrm2 snapshots
Weekly history table in the loops schema — the memory Odoo doesn't keep
StepNarration
The five biggest moves turned into one-liners
DeliversMonday brief ×4
Per-BU email; feed cards when the feed rolls out
System we read Automated step State / memory Human decision
SystemRole in this loop
Odoo 19 CRMread-only connectionThe live CRM. The loop reads deals, activities and teams through a read-only connection — writes are technically impossible on this credential.
Postgres “loops” schemareporting databaseA small dedicated schema where loops keep snapshots and history that need SQL (week-over-week diffs, mirrors for drill-down links). Scoped role; Metabase can read it for the clickable aggregate links.
Company feedfeed.huxapps.comTarget surface for the four sales-* cards (headline: open pipeline; tiles: WoW delta, won-this-week; stacked bar by stage).
Hermesagent runtime on our serverThe scheduler that wakes the loop up. Each loop is a cron job under a Hermes profile; the planned bizops profile will host the business digests (IT loops run under vpsops).
Healthcheckshealthchecks.huxapps.comThe dead-man's switch. The loop pings it only after a clean run — if the loop dies or errors, the ping stops and Healthchecks raises the alarm independently. This is how 'never silent' is enforced by machinery, not promises.
Email renderer + gwsrender_email.pyAll digests pass through one shared renderer: Huxberry-branded HTML, tables for repeated rows, a coral 'needs your response' box when the loop has questions, and an arrow link on every record. Sent from the loops mailbox via the Google Workspace CLI.
Loop chassisloop_common.pyShared plumbing every loop reuses instead of reinventing: state files, run-over-run diffing, Metabase drill-down link building, quiet-on-green notify logic.
Model / brainWhat it does here
None at run timedeterministic scriptA normal cycle is a plain Python script — no AI tokens are spent unless a diagnosis or judgment step is actually needed. AI wrote the script; the script does the rounds.
GPT-5.5 via Codexthe bulk-work modelWrote and maintains the mechanical parts — SQL, diffing, digest assembly. Effectively free on our existing subscription, so routine cycles cost almost nothing.
Claude Opusthe judgment modelReviews alert wording, thresholds, and anything a human will read and act on. Post-Fable, Opus owns everything that ships.
State & memory

A weekly snapshot table (run date × team × stage × count × value) in the loops schema. Two snapshots minimum before the first WoW digest.

Delivery

Monday email per BU lead; later one feed card per BU. Same numbers, same plain language on both surfaces.

Safety rails

Read-only. Reports team aggregates, not individuals. Won't publish its first digest until the underlying data has been cleaned enough to mean something.

Before it can run for real
  • ≥2 weeks of CRM-1 cleanup so the pipeline numbers are honest
  • ≥2 weekly snapshots of its own for the first week-over-week comparison
Full build sheet →