Kay Abraham

Local time in Prague:

Machines01 / 07

Expansion Engine

Reads six live signal feeds, scores every account and hands each Product Advocate a ranked desk twice a day.

Status
Running
Since
Running since July 2026
Built with
Python · Apify · Slack · HubSpot · Snowflake
Proof
780+ tests · nightly CI
01

The miss

The signals sat in six places and nobody saw them together. A growing account looked quiet. A follow-up went to someone who had already said no. A data feed went dark for two months, and nothing noticed.

Corrected Expansion Engine K.A.

02

The machine

An Apify Actor in Python. Six feeds come in: billing alerts, subscriptions, ending rentals, won deals, support asks and the CRM. Every account gets a score. Every Product Advocate gets a ranked desk, twice a day, as a Slack digest, a web page and a report tab.

03

How it runs

  1. How Expansion Engine runs, step by step:
  2. Billing alerts to Match
  3. Subscriptions to Match
  4. Ending rentals to Match
  5. Won deals to Match
  6. Support asks to Match
  7. CRM to Match
  8. Match to Score
  9. Score to Rank
  10. Rank to Slack digest
  11. Rank to Web page
  12. Rank to Report tab
  13. Match to Missing feed (a guard)
  14. Score to Refused terms (a guard)
Made-up item
04

Under the hood

  1. Runs as an Apify Actor in Standby mode, so the desk is a live web page.
  2. 786 tests, run every night in GitHub Actions.
  3. Desks for 7 Product Advocates, twice each weekday.
  4. Holds back any account already in a live deal or contacted in the last week, and gives one play per account.
  5. Tags every account with its owner, so one instance serves the whole team.
  6. State between runs lives in a named store, so a crash can't double-post or drop a window.
  7. Two guards: terms a customer refused are blocked from future offers, and a missing feed fails open and says so on the desk.
  8. The report tab started as a colleague's request and was built for the company all-hands.
  9. Each card carries its owner, why the account ranked, the play, a folded deal record and the sources behind it.
  10. When an account is stuck at its usage limit, the card opens on that limit, and only after the warehouse confirms it that day.
  11. The desk works on a phone, with one-row controls and tap targets sized for a thumb.
  12. Account dossiers are in pilot: one file per account with every fact sourced and dated, read by each agent before it digs.
  13. A quote preview is in progress, pricing an account's last full month at the calculator's options next to its current bill.
desk.pySketch
FEEDS = ("billing_alerts", "subscriptions", "ending_rentals",         "won_deals", "support_asks", "crm") def build_desks(accounts, advocates):    health = {}    for feed in FEEDS:        signals = read(feed)        if signals is None:              # fail open, never silent            health[feed] = "missing"     # the desk says so out loud            continue        attach(accounts, signals)        # each signal to its account     for account in accounts:        account.score = score(account)        account.offers = [o for o in offers(account)                          if o not in account.refused]  # never twice     desks = {pa: ranked(owned_by(pa, accounts)) for pa in advocates}    return desks, health

Written for this page to show the logic. The production code stays in a company repo.

05

What changed

  • Quietly growing accounts now show up on the desk.
  • Every card now shows why it ranked and the sources behind it.
  • Refused terms are blocked from future offers.
  • If a source goes missing, the desk says so.
06

What I can show

The repo is private and the data is company data, so this page describes the machine. The desk on the front page runs on made-up accounts for that reason.

Back to the machines