# Demand-Driven Vendor Activation

> **CURRENT STATE — audit 2026-04-21** (see `10_audit_2026-04-21.md` for full report)
>
> Core loop `RFQ → acquisition → seed → email → claim → pay`:
>
> | Step | Status |
> |---|---|
> | RFQ create | WORKING |
> | → acquisition trigger | **MISSING** — no event, no listener, no `MarketCoverageService` |
> | → seed | PARTIAL — service exists, no auto-caller (manual from tenant admin only) |
> | → email | PARTIAL — service exists, no auto-caller; demand-driven template not built |
> | → claim | WORKING — but missing subscription gate (`ClaimListingService::claimFromToken` lets anyone claim without a plan) |
> | → pay | WORKING — Phases 3 + 5 complete |
>
> The manual pipeline (the "What exists today" table below) is **correct and still works**. The automated pipeline (the "What needs to be built" table below) has **0 of 7 items built**: no `RfqCreated` event, no `MarketCoverageService`, no `DemandDrivenAcquisitionJob`, no `TriggerDemandAcquisition` listener, no `DemandDrivenClaimMail`, no cooldown tracking, no RFQ→batch attribution.

## What this is

When a buyer posts an RFQ, the system automatically finds, qualifies, and contacts vendors who can fulfill it — without any manual admin intervention.

Instead of cold-blasting vendors and hoping they care, every outreach email says: **"A real buyer is looking for your service right now."**

## The core loop

```
Buyer posts RFQ (Plumbing, Atlanta GA)
        |
        v
System checks: enough qualified vendors in this market?
        |
        v  (if below threshold)
Auto-acquire vendors for [Plumbing] + [Atlanta, GA]
        |
        v
Scrape --> Enrich --> Qualify --> Seed --> Email
        |
        v
Vendor receives: "A buyer needs Plumbing in Atlanta - claim your listing"
        |
        v
Vendor claims --> pays for plan --> receives RFQ --> negotiates with buyer
```

## Why this matters

- **For buyers**: more vendors respond to their RFQ, better competition, better pricing
- **For vendors**: they're contacted because there's real demand, not spam
- **For the platform**: every acquisition dollar is tied to actual revenue opportunity
- **For conversion**: "a buyer is looking for you" has dramatically higher open/claim rates than cold outreach

## What exists today (manual)

| Step | Status | Where |
|------|--------|-------|
| Scrape by category + location | Built | `/tenant/acquisition` |
| Enrich (website crawl for email) | Built | `/tenant/acquisition` |
| Qualify (5-field gate) | Built | Auto during scrape |
| Score (conversion scoring) | Built | `/tenant/acquisition` |
| Seed (create vendor + draft listing) | Built | `/platform/acquisition/leads` only |
| Email claim invitation | Built | `/tenant/acquisition` (requires seed first) |
| Claim flow | Built | Vendor clicks email link |
| Payment / activation | Built | Stripe checkout |

## What needs to be built (automated)

| Step | Description |
|------|-------------|
| RFQ trigger | Detect new RFQ, check market coverage |
| Threshold check | How many qualified vendors exist for this category + location? |
| Auto-acquisition | Run scrape + enrich + qualify for the gap |
| Auto-seed | Promote qualified leads to vendor + listing (currently manual) |
| Auto-email | Send demand-driven claim invitations |
| Throttling | Don't re-acquire same market within cooldown period |
| Audit trail | Track which RFQ triggered which acquisition |

## Key design decisions to make

See `01_design_decisions.md`
