Advertising Automation at Scale
Owned the architecture end to end: rules engine, near-real-time ingestion, an automation system that translates a business philosophy into tiered bid rules, and an AI analyst that generates reports without leaking data across tenants.
Key Decisions
- Replaced manual bid work with a rule engine using custom formulas, scheduling, and dayparting. The system now runs 4,300 rules on its own.
- Cut dashboard load from timeout to sub-second using 25 materialized views refreshed via shadow-swap (build temp view, atomic RENAME) with only a brief lock window during swap.
- Traded 24 to 48 hour batch reports for near-real-time SQS ingestion with hourly aggregation. Same-day bid optimization became possible.
- Built a two-column bid state machine with row-level locking to stop silent drift between dayparting and rule execution.
- Shipped an AI analyst on a Guard / Router / Responder pipeline (input filter, intent classifier, generator) with per-tenant data scoping, streaming HTML, PPTX, and XLSX.
Outcome
A two-person team now operates a multi-tenant platform that previously required manual bid management across thousands of campaigns. Campaign teams shifted from spreadsheet ops to strategy work. Reporting decisions that used to wait two days happen the same hour.