File size: 4,214 Bytes
38336e8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
from typing import Tuple, List
from models import LeadData, EnrichmentData, CRMState, OpportunityHistory, Rep

def get_reps() -> List[Rep]:
    return [
        Rep(rep_id="rep_amer_mm", name="Alice", segment="mid-market", territory="AMER", capacity="high"),
        Rep(rep_id="rep_emea_ent", name="Bob", segment="enterprise", territory="EMEA", capacity="medium"),
        Rep(rep_id="rep_amer_ent_original", name="Charlie", segment="enterprise", territory="AMER", capacity="low"), # The original AE
        Rep(rep_id="rep_amer_ent_other", name="Diana", segment="enterprise", territory="AMER", capacity="high"),
    ]

def get_icp_criteria() -> str:
    return "ICP: Tech/FinTech/SaaS. Mid-market (100-999 employees) -> score 60-79. Enterprise (1000+ employees) -> score 80-100. Disqualify students and competitors. Treat closed-lost re-engagements with priority."

def generate_easy_task() -> dict:
    leads = [
        LeadData(
            id="lead_1",
            name="Jane Doe",
            title="VP of Engineering",
            email="jane@cloudscale.io",
            company="CloudScale",
            message="Looking for a new RevOps tool to handle our inbound.",
            source="web_form",
            score=None
        )
    ]
    enrichment_map = {
        "lead_1": EnrichmentData(enriched=True, company_size="400", revenue="$50M", industry="Tech", region="AMER", tier="mid-market")
    }
    crm = CRMState(checked=False, existing_accounts=[], opportunities=[])
    
    return {
        "leads": leads,
        "enrichment_map": enrichment_map,
        "crm": crm,
    }

def generate_medium_task() -> dict:
    leads = [
        LeadData(
            id="lead_2",
            email="k.mueller@fintech.de",
            source="email",
            message="Inquiry about pricing."
        )
    ]
    enrichment_map = {
        "lead_2": EnrichmentData(enriched=True, company_size="1200", revenue="$200M", industry="FinTech", region="EMEA", tier="enterprise")
    }
    crm = CRMState(checked=False, existing_accounts=[], opportunities=[])
    
    return {
        "leads": leads,
        "enrichment_map": enrichment_map,
        "crm": crm,
    }

def generate_hard_task() -> dict:
    leads = [
        LeadData(
            id="lead_3_student",
            name="Student Joe",
            email="joe.college@university.edu",
            message="Doing a research project.",
            source="web_form"
        ),
        LeadData(
            id="lead_3_competitor",
            name="Sneaky Sam",
            email="sam@competitor.com",
            message="Just browsing your features.",
            source="web_form"
        ),
        LeadData(
            id="lead_3_cfo",
            name="Sarah Smith",
            title="CFO",
            email="ssmith@majorfinance.com",
            company="Major Finance Corp",
            message="We looked at your product last year. Ready to revisit.",
            source="click_to_message_ad"
        )
    ]
    enrichment_map = {
        "lead_3_student": EnrichmentData(enriched=True, industry="Education", region="AMER", tier="other"),
        "lead_3_competitor": EnrichmentData(enriched=True, industry="Tech", region="AMER", tier="other"),
        "lead_3_cfo": EnrichmentData(enriched=True, company_size="5000", industry="Finance", region="AMER", tier="enterprise")
    }
    
    crm = CRMState(
        checked=False,
        existing_accounts=[{"account_id": "acc_major_fin", "name": "Major Finance Corp"}],
        opportunities=[
            OpportunityHistory(
                opportunity_id="opp_101",
                status="closed-lost",
                amount=240000,
                assigned_rep_id="rep_amer_ent_original",
                closed_date="2025-10-15"
            )
        ]
    )
    
    return {
        "leads": leads,
        "enrichment_map": enrichment_map,
        "crm": crm,
    }

def get_task_data(task_id: str) -> dict:
    if task_id == "task_easy":
        return generate_easy_task()
    elif task_id == "task_medium":
        return generate_medium_task()
    elif task_id == "task_hard":
        return generate_hard_task()
    else:
        raise ValueError(f"Unknown task {task_id}")