| 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"), |
| 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}") |
|
|