# Sales Agent Skill

> Generate leads, manage deals, create outreach, and close sales.

## Overview

The Sales Agent handles the Sell phase of the Symph Agency pipeline. It integrates with Apollo MCP for lead generation, uses context from Discovery and Marketing phases, and maintains a filesystem-based deal pipeline.

## Apollo MCP Integration

**Server:** `https://apollo-mcp.server4.symph.app/sse`

### Available Tools

| Tool | Cost | Purpose |
|------|------|---------|
| `apollo_search_people` | FREE | Search leads by title, location, company |
| `apollo_enrich_people` | CREDITS | Get email/phone for specific leads |
| `apollo_search_people_enriched` | CREDITS | Search + enrich in one call |
| `apollo_test_connection` | FREE | Verify API connection |

### Lead Generation Rules

1. **Always start with 20 leads** (configurable later)
2. **Use Discovery context** - Pull target personas from `discovery/target-market.md`
3. **Search parameters** from target market:
   - Job titles (decision makers for the product)
   - Industries/verticals
   - Company size
   - Location (Philippines-first for Symph products)
4. **Do NOT auto-enrich** - Costs credits. Only enrich when user requests.

## File Structure

```
agency/products/{slug}/sell/
├── workflow.json          # Phase status
├── progress.md            # Step-by-step progress log
├── leads.yaml             # Raw leads from Apollo
├── deals.yaml             # Active deals (main data source)
├── pipeline-summary.yaml  # "At a Glance" metrics
├── activities.yaml        # Activity timeline (all deals)
├── templates/
│   ├── outreach-email.md  # Generated outreach templates
│   └── proposal.md        # Generated proposals
└── chat.yaml              # AI agent chat history
```

## Data Schemas

### leads.yaml
```yaml
generated_at: "2026-02-05T00:00:00Z"
source: apollo
search_criteria:
  titles: ["Clinic Owner", "Practice Manager"]
  locations: ["Philippines"]
  industries: ["Healthcare", "Wellness"]
total_count: 20
leads:
  - id: "apollo_123"
    name: "Maria Santos"
    title: "Clinic Owner"
    company: "Santos Wellness Clinic"
    location: "Manila, Philippines"
    industry: "Healthcare"
    company_size: "11-50"
    linkedin_url: "https://linkedin.com/in/..."
    enriched: false
    email: null  # Only populated after enrichment
    phone: null
    added_to_deals: false
```

### deals.yaml
```yaml
updated_at: "2026-02-05T00:00:00Z"
deals:
  - id: "deal_001"
    name: "Santos Wellness Clinic"
    contact_name: "Maria Santos"
    contact_title: "Clinic Owner"
    type: "B2B SMB"  # B2B Ent, B2B SMB, B2C
    value: 280000  # In PHP
    value_type: "one-time"  # one-time, monthly, annual
    currency: "PHP"
    bant:
      budget: true      # Has budget
      authority: true   # Decision maker
      need: true        # Has the problem
      timeline: false   # No urgent timeline
      score: 75         # 0-100 calculated
    stage: "Qualified"  # Lead, Qualified, Proposal, Negotiating, Won, Lost
    source: "Apollo"
    status: "Demo tmrw"  # Free text status
    status_type: "active"  # active, stale, won, lost, followup
    stale_days: 0
    created_at: "2026-02-05T00:00:00Z"
    updated_at: "2026-02-05T00:00:00Z"
    # Closed deal fields
    closed_at: null
    closed_result: null  # won, lost
    closed_tier: null    # Fixed, Flex, Fluid (for won)
    closed_amount: null
    closed_reason: null  # For lost deals
    # Contact info (from enrichment)
    email: null
    phone: null
    linkedin_url: "https://..."
    # Notes
    notes: "Interested in payroll module"
```

### pipeline-summary.yaml
```yaml
generated_at: "2026-02-05T00:00:00Z"
target:
  win_rate: 60
  mrr: 500000
metrics:
  total_deals: 23
  pipeline_value: 1200000
  mrr: 180000
  win_rate: 67
  won_mtd: 650000
  avg_close_days: 18
stages:
  lead: 12
  qualified: 6
  proposal: 3
  won: 8
  lost: 4
needs_action:
  - deal_id: "deal_001"
    name: "QuickCare Clinic"
    reason: "Proposal pending approval"
  - deal_id: "deal_002"
    name: "Health Plus"
    reason: "Demo scheduled tomorrow"
  - deal_id: "deal_003"
    name: "Wellness Center"
    reason: "14 days stale"
```

### activities.yaml
```yaml
activities:
  - id: "act_001"
    deal_id: "deal_001"
    timestamp: "2026-02-05T10:30:00Z"
    type: "ai"  # ai, human, system
    actor: "ARIA"
    action: "Generated outreach email"
    details: "Initial cold outreach based on wellness clinic persona"
  - id: "act_002"
    deal_id: "deal_001"
    timestamp: "2026-02-05T14:00:00Z"
    type: "human"
    actor: "Gee Quidet"
    action: "Sent email"
    details: "Customized and sent outreach"
  - id: "act_003"
    deal_id: "deal_001"
    timestamp: "2026-02-06T09:00:00Z"
    type: "human"
    actor: "Gee Quidet"
    action: "Call completed"
    details: "30min discovery call. Interested in payroll + scheduling."
```

## Sell Pipeline Steps

### Step 1: Initialize (10%)
- Create sell/ folder structure
- Initialize empty YAML files
- Read Discovery artifacts for targeting

### Step 2: Generate Leads (40%)
- Connect to Apollo MCP
- Build search query from target market personas
- Fetch 20 leads (default)
- Save to leads.yaml
- Create initial deals.yaml entries

### Step 3: Score Leads (60%)
- Calculate BANT scores for each lead
- Prioritize by score
- Update deals.yaml

### Step 4: Generate Summary (80%)
- Calculate pipeline metrics
- Identify "needs action" items
- Save pipeline-summary.yaml

### Step 5: Create Outreach Templates (100%)
- Generate persona-specific email templates
- Use Marketing assets (landing page, value props)
- Save to templates/

## AI Actions (Chat Commands)

### Lead Generation
```
"Find more leads" → Fetch additional leads from Apollo
"Enrich [deal name]" → Get email/phone for specific lead (costs credits)
"Refresh leads" → Re-run Apollo search with same criteria
```

### Outreach
```
"Generate outreach for [deal]" → Create personalized email using:
  - Discovery: target persona, pain points
  - Marketing: landing page URL, value props, ad copy
  - Deal: company info, contact name

"Generate follow-up for [deal]" → Create follow-up email based on activity history
```

### Proposals
```
"Generate proposal for [deal]" → Create proposal using:
  - Discovery: PRD, features
  - Marketing: pricing tiers
  - Deal: specific needs from notes
```

### Deal Management
```
"Mark [deal] as won - [tier] - [amount]" → Close as won
"Mark [deal] as lost - [reason]" → Close as lost
"Update [deal] BANT" → Recalculate BANT score
"Add note to [deal]: [note]" → Add to activity timeline
```

### Reporting
```
"Refresh pipeline summary" → Recalculate all metrics
"Show stale deals" → List deals with no activity > 7 days
"Show needs action" → List deals requiring attention
```

## Outreach Email Generation Prompt

When generating outreach emails, use this structure:

```markdown
## Context to Load
1. Discovery/target-market.md - Get persona pain points
2. Discovery/prd.md - Get key features and value props
3. Marketing/landing-page.md - Get landing page URL
4. Marketing/ad-copy.md - Get proven messaging hooks
5. Marketing/pricing.md - Get pricing context (don't include prices in cold outreach)
6. Deal details - Company, contact name, industry

## Email Structure
- **Subject:** Short, curiosity-driven, no spam triggers
- **Opening:** Personalized hook (their industry/role + pain point)
- **Value prop:** 1-2 sentences on how we solve their problem
- **Social proof:** Brief mention of similar customers (if available)
- **CTA:** Single, clear ask (reply, book call, watch demo)
- **Signature:** Professional, include calendar link

## Tone
- Conversational, not salesy
- Specific to their industry
- Short paragraphs (mobile-friendly)
- No attachments in first email

## Example
Subject: Quick question about [pain point] at [Company]

Hi [First Name],

I noticed [Company] is in the [industry] space — we've been helping similar [industry] businesses cut their admin time in half with automated [specific feature].

[One sentence on specific pain point from Discovery persona]

Would you be open to a quick 15-min call to see if this could help [Company]? Here's my calendar: [link]

Best,
[Name]

P.S. Here's a 2-min overview if you'd prefer to watch first: [landing page or video link]
```

## Proposal Generation Prompt

```markdown
## Context to Load
1. Discovery/prd.md - Full feature set
2. Discovery/user-stories.md - Detailed capabilities
3. Marketing/pricing.md - Pricing tiers and packages
4. Design/brand-guidelines.md - Brand colors for styling
5. Deal details - Specific needs, company size, budget indicators

## Proposal Structure
1. **Executive Summary** - Their problem, our solution, expected outcome
2. **Understanding Your Needs** - Reflect back what we learned
3. **Proposed Solution** - Features mapped to their needs
4. **Implementation Timeline** - Realistic phases
5. **Investment** - Pricing with clear value justification
6. **Next Steps** - Clear path forward
7. **About Us** - Brief credibility section

## Output
- Generate as Markdown
- Include HTML version for preview
- Follow brand guidelines for HTML styling
```

## BANT Scoring

Calculate BANT score (0-100) based on:

| Factor | Weight | Criteria |
|--------|--------|----------|
| Budget | 25 | Has budget allocated or can allocate |
| Authority | 25 | Is decision maker or has direct access |
| Need | 30 | Has clear pain point we solve |
| Timeline | 20 | Has urgency or defined timeline |

```
Score = (B * 25) + (A * 25) + (N * 30) + (T * 20)
```

Where each factor is 0 or 1 (boolean).

## Integration with Other Phases

### From Discovery
- `target-market.md` → Lead search criteria, personas
- `prd.md` → Feature list for proposals
- `competitors.md` → Competitive positioning

### From Marketing  
- `landing-page.md` → URL for outreach
- `pricing.md` → Pricing tiers for proposals
- `ad-copy.md` → Proven messaging hooks
- `promo-video.md` → Video link for outreach

### To Deliver
- Won deals → Client onboarding queue
- Deal details → SOW generation
- Contact info → Client record

## HTML Card Design

Use dark theme consistent with other phases:
- Background: `#0a0a0a`
- Cards: `#141414`
- Accent: `#d4ff00`
- Success (Won): `#22c55e`
- Warning (Stale): `#f59e0b`
- Error (Lost): `#ef4444`
- Info (Lead): `#3b82f6`
