Architecture Note · Operations & RevOps

Deterministic B2B Attribution & PLG Upgrade Scoring: Rolling 14-Day PQA Signals and Conflict-Safe AE Handoffs

Why prompting an LLM over raw product logs breaks RevOps trust—and how explicit scoring rules, local SQLite persistence, and HTTP 409 handoff gates keep pipeline math auditable.

The Problem: High-Intent Self-Serve Accounts Lost in Noise and Double-Touches

Product-led growth teams track thousands of free and trial workspaces across seat invites, SAML/SSO setup, API key creation, quota warnings, and executive signups. Yet VP Growth, Demand Gen, and Product-Led Sales leads still argue over two basic questions: which workspaces are genuinely ready for an enterprise upgrade, and which marketing touchpoints—LinkedIn, Search, Events, or Docs—earned the pipeline credit. Without unified scoring and handoff suppression, high-value trials stall in self-serve limbo or get pinged twice by overlapping Account Executives.

Why Naive AI Wrappers Fail in Revenue Operations

Dropping product telemetry and CRM touchpoints into a generic LLM prompt fails production RevOps along four concrete fault lines:

  • Nondeterministic scoring and silent drift: Asking a model to rank account readiness produces shifting scores on identical event streams as weights, context truncation, or prompt phrasing vary—making quarterly conversion comparisons impossible.
  • Hallucinated attribution math: Language models approximate positional credit splits unevenly when journeys vary in length, breaking exact sum-to-one revenue reconciliation across multi-touch deals.
  • Data egress from raw telemetry uploads: Shipping customer actor emails, workspace domains, and commercial ARR figures to external endpoints creates unnecessary privacy exposure when deterministic computation can stay local.
  • Uncontrolled outbound routing and zero auditability: Auto-dispatching sales tasks without cooldown checks, domain-level conflict detection, or tamper-evident logs causes duplicate AE outreach and unattributable overrides.

The Deterministic Architecture That Fixes It

Our shipped architecture separates deterministic telemetry math, multi-touch credit allocation, and human-gated sales routing inside an isolated FastAPI and SQLite WAL-mode service verified by 12 pytest tests across five test modules, protected by tenant-scoped SHA-256/HMAC invite tokens and a 60-second sliding-window rate limiter in auth.py:

  1. Rolling 14-day PQA scoring with stale-event exclusion: POST /api/events/product accepts JSON batches or CSV/JSON uploads, storing ephemeral files with 0600 permissions and an automated 1-hour (3600s) wipe loop while keeping only SHA-256 digests. In pqa_scoring.py, events older than 14 days are strictly excluded (included_in_window = 0), and active signals receive a bounded recency factor across seat velocity, SSO/API setup, quota saturation, executive domain signups, and feature adoption to output reproducible activation, expansion propensity, and composite tier scores.
  2. Reproducible multi-touch attribution with zero-key local execution: POST /api/attribution/compute sorts touchpoints chronologically and applies exact positional weights for first_touch, linear, u_shaped, and w_shaped (30/30/30/10) models in attribution.py, correcting rounding drift so channel shares sum to 1.0. Executive summaries default to OfflineDeterministicAdapter, requiring zero external API keys or outbound telemetry egress unless an OpenAI-compatible endpoint is explicitly configured.
  3. Cohort expansion lift and formula-safe CSV export: GET /api/funnels/cohorts aggregates conversion rates, CAC payback months by channel, and milestone expansion multipliers—flagging activation milestones that deliver at least 2.0x 90-day expansion lift—while export_cohorts_csv neutralizes OWASP CSV formula prefixes (=, +, -, @) in RFC 4180 output.
  4. HTTP 409 duplicate-outreach suppression and SHA-256 audit chain: POST /api/pqa/{id}/handoff checks active AE owners, cooldown windows, and sibling workspaces sharing the same normalized domain. Any duplicate or cooldown conflict fails closed with HTTP 409 Conflict until a Sales-Ops or AE lead supplies explicit human_signoff_by and override_reason fields. Every ingestion, attribution run, suppression, and override appends to an immutable SHA-256 hash-chained audit_logs table verifiable via GET /api/audit/logs.

Operational Takeaway

Revenue and growth teams do not need probabilistic guesswork to score upgrades or allocate channel budgets. By binding rolling 14-day telemetry rules, exact attribution splits, OWASP-safe exports, and HTTP 409 human sign-off gates to a hash-chained local store, PLG organizations get fast sales-assist routing without sacrificing reconciliation or governance.

Benchmark PQA scoring and attribution on your own telemetry

Start with a free 30-minute workflow check. Bring one self-serve funnel or attribution workflow and leave with one concrete recommendation in writing within one business day.