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

FileTypeRole
partner_account_mapping_sop.docxSOPThe process playbook (Steps 1-6)
partner_account_mapping_template.xlsxSpreadsheet7-tab workbook with INDEX/MATCH formulas
partner_account_mapping_automation.pyScriptReplaces SOP Steps 1-3
config.yamlConfigurationScoring weights, tiers, geos, ICP
cursor_automation_guide.mdThis guideSetup, 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

ColumnReqUsed ByDescription
partner_aeNoReferenceWho gave you this list (e.g., Jones, Sarah)
partner_orgNoReferencePartner company (e.g., Snowflake)
company_nameYesScript + SheetAccount name. Script normalizes for matching.
industryYesScript + SheetIndustry vertical. Script normalizes aliases.
hq_cityYesScript + SheetHQ city. Script normalizes (NYC → New York).
hq_stateNoSheetHQ state abbreviation.
employee_countYesScript + SheetNumeric. Used for ICP size fit scoring.
partner_priorityYesScript + SheetH/M/L. High = +1 point.
partner_use_caseNoSheetWhat the partner is selling them.
partner_contactNoReferenceWho at the account the partner talks to.
partner_notesNoReferenceAny additional context from the partner AE.
domainNoApolloCompany 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.

ColumnReqUsed ByDescription
company_nameYesScript + SheetAccount name. Script auto-strips Inc, LLC, Corp.
industryYesScript + SheetVertical. Script normalizes aliases.
hq_cityYesScript + SheetHQ city. Script normalizes (NYC → New York).
hq_stateNoSheetHQ state abbreviation.
employee_countYesScript + SheetNumeric. Used for ICP size fit (config.yaml range).
revenue_rangeNoSheetRevenue tier (e.g., 100M).
account_statusYesScript + SheetMust be: Customer (+5), Active Opportunity (+4), Prospect (+3), Target (+2).
account_ownerYesScript + SheetWho on your team owns it. Appears in output.
tech_stackNoScript + SheetKnown tools (Snowflake, dbt, Looker). +1 if known.
competitor_presentNoScript + SheetCompetitor in use (Informatica, Talend). +1 if present.
last_activity_dateNoSheetLast meaningful interaction date (YYYY-MM-DD).
notesNoSheetContext (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.

ColumnReqUsed ByDescription
titleYesScript + SheetCase study name. Appears in output as Best Case Study.
industryYesScript + SheetIndustry match key (Financial Services, Healthcare, etc.).
use_caseNoSheetPrimary use case (Migration, Analytics, Integration).
company_sizeNoSheetCustomer size tier (Enterprise, Mid-Market, SMB).
tech_mentionedNoSheetTech referenced in the case study (Snowflake, dbt).
geoNoSheetCustomer geography (NYC, Austin, etc.).
urlNoScript + SheetLink for sharing with partner AE. Appears in output.
one_linerNoSheetQuick summary.

my_campaigns.csv (= Tab 4: My Campaigns)

Active and planned campaigns. Matched by target_industry. +1 point when matched.

ColumnReqUsed ByDescription
campaign_nameYesScript + SheetCampaign name. Appears in output as Active Campaign.
typeNoSheetABM / Event / Nurture / Webinar.
target_industryYesScript + SheetIndustry focus. Used for matching to partner accounts.
target_personaNoSheetBuyer persona (VP Data, CDO, CTO).
target_geoNoSheetGeographic focus (Northeast, National, etc.).
statusNoSheetActive / Planning / Completed.
start_dateNoSheetLaunch date (YYYY-MM-DD).
end_dateNoSheetEnd date (YYYY-MM-DD).
notesNoSheetContext.

my_contacts.csv (= Tab 5: My Contacts)

Every relationship your team has. Strong/Medium = +2, Warm = +1.

ColumnReqUsed ByDescription
company_nameYesScript + SheetMust match company names in your accounts and partner list.
contact_nameYesScript + SheetPerson’s name. Appears in output as Known Contact.
contact_titleNoScript + SheetRole (VP Data, CTO). Appears in output.
relationship_ownerYesScript + SheetWho on your team knows them. Appears in output.
relationship_strengthYesScript + SheetMust be: Strong (+2), Medium (+2), Warm (+1), Cold (0).
how_connectedNoSheetHow you know them (Met at Snowflake Summit, LinkedIn, etc.).
last_interactionNoSheetLast touchpoint date (YYYY-MM-DD).
notesNoSheetContext.

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.txt
python partner_account_mapping_automation.py --partner-list input/snowflake_ae_jones_2026-02-25.csv

With 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.md

Explicit 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.yaml

After 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.

#LayerWhat It ChecksPtsSource
1Direct Account OverlapCompany in your accounts?2-5my_accounts
2Industry MatchOperate in this vertical?-my_accounts
3Geography MatchIn strong cities?2config.yaml
4ICP Size FitRight employee range?1config.yaml
5Tech Stack FitKnown tech?1my_accounts
6Competitive DisplacementCompetitor present?1my_accounts
7Known ContactWarm path available?1-2my_contacts
8Case Study MatchProof point by industry?2my_case_studies
9Active CampaignSlot into motion?1my_campaigns
10Partner PriorityFlagged High?1partner list
11Funding/Growth SignalRecent funding/hiring?1Manual
12Decision Maker AccessSenior 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.