Partner Account Mapping — Cursor Automation Guide
This automation is one of five files in the Partner Account Mapping system. All share the same scoring logic, 12 match layers, and tier thresholds.
1. How This Fits Together
| File | Type | Role |
|---|---|---|
| partner_account_mapping_sop.docx | SOP | The process playbook (Steps 1-6) |
| partner_account_mapping_template.xlsx | Spreadsheet | 7-tab workbook with INDEX/MATCH formulas |
| partner_account_mapping_automation.py | Script | Replaces SOP Steps 1-3 |
| config.yaml | Configuration | Scoring weights, tiers, geos, ICP |
| cursor_automation_guide.md | This guide | Setup, CSV specs, extension prompts |
The CSV column specs in this guide match the spreadsheet template exactly. Data built for one path works in both.
2. Folder Structure
The script auto-detects files in my-data/ so you only need to specify the partner list.
partner-mapping/
├── input/ ← Drop partner CSVs here
│ └── snowflake_ae_jones_2026-02-25.csv
├── my-data/ ← Your data vault (auto-detected)
│ ├── my_accounts.csv ← Required (= Tab 2)
│ ├── my_contacts.csv ← Optional (= Tab 5)
│ ├── my_case_studies.csv ← Optional (= Tab 3)
│ └── my_campaigns.csv ← Optional (= Tab 4)
├── output/ ← Results auto-generated here
│ └── MAPPED_snowflake_ae_jones_2026-02-25.xlsx
├── partner_account_mapping_automation.py
└── config.yaml ← = Tab 6 (CONFIG)
How auto-detection works: When you run the script with only --partner-list, it scans my-data/ for files matching my_accounts., my_contacts., etc. It prints what it found so you always know what data it’s using. You can override any file with explicit flags.
3. Phase 1: Set Up Your Data Vault
CSV specs match the spreadsheet template tabs exactly. “Used By” = Script, Sheet (formulas), or Reference.
Partner List Input CSV (= Tab 1: Partner List)
Drop into input/. Name: {partner}_{ae}_{date}.csv
| Column | Req | Used By | Description |
|---|---|---|---|
| partner_ae | No | Reference | Who gave you this list (e.g., Jones, Sarah) |
| partner_org | No | Reference | Partner company (e.g., Snowflake) |
| company_name | Yes | Script + Sheet | Account name. Script normalizes for matching. |
| industry | Yes | Script + Sheet | Industry vertical. Script normalizes aliases. |
| hq_city | Yes | Script + Sheet | HQ city. Script normalizes (NYC → New York). |
| hq_state | No | Sheet | HQ state abbreviation. |
| employee_count | Yes | Script + Sheet | Numeric. Used for ICP size fit scoring. |
| partner_priority | Yes | Script + Sheet | H/M/L. High = +1 point. |
| partner_use_case | No | Sheet | What the partner is selling them. |
| partner_contact | No | Reference | Who at the account the partner talks to. |
| partner_notes | No | Reference | Any additional context from the partner AE. |
| domain | No | Apollo | Company website (e.g. acme.com) for optional Apollo enrichment; see HOW_TO_RUN.md and enrich_partner_list_apollo.py. |
my_accounts.csv (= Tab 2: My Accounts)
Your book of business. Export from CRM. Required — powers direct match + geo + ICP + tech stack + competitor scoring.
| Column | Req | Used By | Description |
|---|---|---|---|
| company_name | Yes | Script + Sheet | Account name. Script auto-strips Inc, LLC, Corp. |
| industry | Yes | Script + Sheet | Vertical. Script normalizes aliases. |
| hq_city | Yes | Script + Sheet | HQ city. Script normalizes (NYC → New York). |
| hq_state | No | Sheet | HQ state abbreviation. |
| employee_count | Yes | Script + Sheet | Numeric. Used for ICP size fit (config.yaml range). |
| revenue_range | No | Sheet | Revenue tier (e.g., 100M). |
| account_status | Yes | Script + Sheet | Must be: Customer (+5), Active Opportunity (+4), Prospect (+3), Target (+2). |
| account_owner | Yes | Script + Sheet | Who on your team owns it. Appears in output. |
| tech_stack | No | Script + Sheet | Known tools (Snowflake, dbt, Looker). +1 if known. |
| competitor_present | No | Script + Sheet | Competitor in use (Informatica, Talend). +1 if present. |
| last_activity_date | No | Sheet | Last meaningful interaction date (YYYY-MM-DD). |
| notes | No | Sheet | Context (e.g., In POC, evaluating our platform). |
my_case_studies.csv (= Tab 3: My Case Studies)
Case study library indexed by industry. +2 points when matched.
| Column | Req | Used By | Description |
|---|---|---|---|
| title | Yes | Script + Sheet | Case study name. Appears in output as Best Case Study. |
| industry | Yes | Script + Sheet | Industry match key (Financial Services, Healthcare, etc.). |
| use_case | No | Sheet | Primary use case (Migration, Analytics, Integration). |
| company_size | No | Sheet | Customer size tier (Enterprise, Mid-Market, SMB). |
| tech_mentioned | No | Sheet | Tech referenced in the case study (Snowflake, dbt). |
| geo | No | Sheet | Customer geography (NYC, Austin, etc.). |
| url | No | Script + Sheet | Link for sharing with partner AE. Appears in output. |
| one_liner | No | Sheet | Quick summary. |
my_campaigns.csv (= Tab 4: My Campaigns)
Active and planned campaigns. Matched by target_industry. +1 point when matched.
| Column | Req | Used By | Description |
|---|---|---|---|
| campaign_name | Yes | Script + Sheet | Campaign name. Appears in output as Active Campaign. |
| type | No | Sheet | ABM / Event / Nurture / Webinar. |
| target_industry | Yes | Script + Sheet | Industry focus. Used for matching to partner accounts. |
| target_persona | No | Sheet | Buyer persona (VP Data, CDO, CTO). |
| target_geo | No | Sheet | Geographic focus (Northeast, National, etc.). |
| status | No | Sheet | Active / Planning / Completed. |
| start_date | No | Sheet | Launch date (YYYY-MM-DD). |
| end_date | No | Sheet | End date (YYYY-MM-DD). |
| notes | No | Sheet | Context. |
my_contacts.csv (= Tab 5: My Contacts)
Every relationship your team has. Strong/Medium = +2, Warm = +1.
| Column | Req | Used By | Description |
|---|---|---|---|
| company_name | Yes | Script + Sheet | Must match company names in your accounts and partner list. |
| contact_name | Yes | Script + Sheet | Person’s name. Appears in output as Known Contact. |
| contact_title | No | Script + Sheet | Role (VP Data, CTO). Appears in output. |
| relationship_owner | Yes | Script + Sheet | Who on your team knows them. Appears in output. |
| relationship_strength | Yes | Script + Sheet | Must be: Strong (+2), Medium (+2), Warm (+1), Cold (0). |
| how_connected | No | Sheet | How you know them (Met at Snowflake Summit, LinkedIn, etc.). |
| last_interaction | No | Sheet | Last touchpoint date (YYYY-MM-DD). |
| notes | No | Sheet | Context. |
4. Phase 2: Configure Scoring (config.yaml = Tab 6)
Edit config.yaml to change scoring — no Python needed. Keep Tab 6 in sync if using both paths.
See config.yaml in this folder for: scoring (direct_match_customer, direct_match_active_opp, direct_match_prospect, direct_match_target, industry_match_with_case_study, geography_match, warm_relationship, tech_stack_fit, active_campaign_match, partner_high_priority, icp_size_fit, funding_signal, competitive_displacement), tiers (tier_1: 8, tier_2: 5, tier_3: 2), geographies, icp (employee_min, employee_max, industries).
5. Phase 3: Run It
First-Time Setup
cd partner-mapping
pip install -r requirements.txtAuto-Detect Mode (Recommended)
python partner_account_mapping_automation.py --partner-list input/snowflake_ae_jones_2026-02-25.csvWith Context Brief Enrichment (3-Step Cursor Workflow)
Step 4 (Enrich with AI) runs in Cursor using web search and (optionally) an Apollo MCP agent/subagent. Use the prompt in enrichment-agent-prompt.md so the agent fills Context Briefs with the 8 SOP signal types (leadership, industry news, funding, hiring, earnings, tech, event presence, competitive moves). You can ask Cursor to run an Apollo-focused subagent to use Apollo MCP (org enrichment, job postings, contacts) and merge with web research. Do not repeat enriched leads — only fill sections that are still empty.
# Step 1: Generate enrichment tasks
python partner_account_mapping_automation.py --partner-list input/snowflake_ae_jones_2026-02-25.csv --enrich
# Step 2: Open output/ENRICH_TASKS.md in Cursor → Composer → paste prompt from enrichment-agent-prompt.md (web search + optional Apollo subagent)
# Step 3: Merge briefs back into Excel
python partner_account_mapping_automation.py --partner-list input/snowflake_ae_jones_2026-02-25.csv --merge-enrichment output/ENRICH_TASKS.mdExplicit Mode
python partner_account_mapping_automation.py \
--partner-list input/partner.csv \
--my-accounts /path/to/accounts.csv \
--contacts /path/to/contacts.csv \
--case-studies /path/to/cases.csv \
--campaigns /path/to/campaigns.csv \
--output /path/to/output.xlsx \
--config /path/to/config.yamlAfter Running
- Open output Excel. Tier 1 = green rows at top.
- Fill manual columns: Funding Signal (Y/N), Next Step, Action Owner, Action Date.
- Upload to Google Sheets for live editing (formulas compatible).
- Or paste into the spreadsheet template for the full 7-tab environment.
Enrichment with Apollo MCP
When Apollo.io MCP is enabled in Cursor (and APOLLO_IO_API_KEY is set), agents can use Apollo tools to enrich data used by this automation:
- organization_enrichment – Get company details by domain (e.g. for partner list or my_accounts rows missing HQ/industry/employee count).
- people_enrichment – Enrich contacts by email, domain, or LinkedIn to fill my_contacts or partner_contact.
- people_search / organization_search – Find decision makers or companies by title, location, tech stack, funding.
Use this before or after a mapping run: e.g. “Enrich the partner list from input/ with Apollo company data” or “Enrich my_contacts using Apollo for companies in my_accounts that have no contact.” The script does not call Apollo itself; use Cursor + Apollo MCP for ad‑hoc enrichment, then drop updated CSVs into my-data/ or use the script’s --enrich / --merge-enrichment flow for context briefs.
6. The 12 Match Layers
Identical to the spreadsheet formulas in Tab 7 (MAPPED OUTPUT), with added normalization.
| # | Layer | What It Checks | Pts | Source |
|---|---|---|---|---|
| 1 | Direct Account Overlap | Company in your accounts? | 2-5 | my_accounts |
| 2 | Industry Match | Operate in this vertical? | - | my_accounts |
| 3 | Geography Match | In strong cities? | 2 | config.yaml |
| 4 | ICP Size Fit | Right employee range? | 1 | config.yaml |
| 5 | Tech Stack Fit | Known tech? | 1 | my_accounts |
| 6 | Competitive Displacement | Competitor present? | 1 | my_accounts |
| 7 | Known Contact | Warm path available? | 1-2 | my_contacts |
| 8 | Case Study Match | Proof point by industry? | 2 | my_case_studies |
| 9 | Active Campaign | Slot into motion? | 1 | my_campaigns |
| 10 | Partner Priority | Flagged High? | 1 | partner list |
| 11 | Funding/Growth Signal | Recent funding/hiring? | 1 | Manual |
| 12 | Decision Maker Access | Senior contact + strong rel? | - | Derived |
Normalization (Script Only): Company names: strips Inc/LLC/Corp/Ltd/PLC/Group/Holdings; lowercases; collapses whitespace. Industry: FSI/FinServ/Banking/Insurance → Financial Services; Health/Pharma/Biotech → Healthcare; SaaS/Software/Technology → Tech. City: NYC/NY/Manhattan → New York.
7. Phase 4: Extend with Cursor
Fuzzy Matching (High Priority)
Prompt for Cursor: Add fuzzy company name matching using rapidfuzz. If exact normalized match fails, try token_sort_ratio with threshold 85. Log fuzzy matches separately so I can review before trusting scores.
Catches: “Acme Financial” vs “Acme Financial Services”.
AI-Powered Context Enrichment (Built In)
Already integrated. Use --enrich to generate ENRICH_TASKS.md, fill in Cursor, then --merge-enrichment to inject Context Briefs into Excel.
File Watcher (Medium Priority)
Prompt: Add watch_input.py using watchdog that monitors input/. Auto-run mapping when new CSV appears.
Partner Briefing Doc (Lower Priority)
Prompt: Generate a 1-page markdown briefing: top 5 accounts, talking points, case studies, overlap stats. Save to output/.
8. Output Columns (= Tab 7: MAPPED OUTPUT)
The script writes a 7-sheet workbook: Partner List, My Accounts, My Case Studies, My Campaigns, My Contacts, CONFIG, MAPPED OUTPUT. Same structure as the template.
32 columns in MAPPED OUTPUT: company_name, industry, hq_city, hq_state, employee_count, partner_priority, partner_use_case, Direct Account Match, My Account Owner, Industry Match, Geography Match, Geo Team Member, ICP Size Fit, Tech Stack Fit, Competitor Present, Known Contact, Contact Title, Relationship Owner, Relationship Strength, Best Case Study, Case Study Link, Active Campaign, Funding/Growth Signal, Context Brief, Total Score, Tier, Tier Label, Recommended Action, Next Step, Action Owner, Action Date, Notes.
9. Quick Start Checklist
Setup (one time): Create partner-mapping/ with input/, my-data/, output/. Copy script + config.yaml. pip install -r requirements.txt. Export CRM → my-data/my_accounts.csv. Build contacts, case studies, campaigns. Edit config.yaml.
Every run: Drop partner CSV into input/ ({partner}_{ae}_{date}.csv). Run: python partner_account_mapping_automation.py --partner-list input/{file}.csv. Verify auto-detection. Open output Excel — Tier 1 first. Fill: Funding Signal, Next Step, Owner, Date.
Monthly: Re-export CRM → my-data/my_accounts.csv. Update contacts, case studies, campaigns. Review config.yaml. Keep config.yaml in sync with Tab 6.
10. Pro Tips
- Start with my_accounts.csv only. Direct match + geo + ICP = 80% of value.
- Version partner lists:
{partner}_{ae}_{date}.csv. Script auto-names output with dates. - Same my-data/ for Snowflake, AWS, Databricks — different input CSVs.
- Edit config.yaml, not Python. Non-engineers can tune scoring.
- CSVs built from this guide work in both the script and the spreadsheet template.
- Combine paths: run automation for speed, paste into template for live tracking.