STUD
← Plays

Build · Create · Analysis & Finance

Account-overlap matrix with a partner

A 3x3 overlap matrix showing how many accounts intersect across each funnel-stage pairing with a partner, with totals and the biggest cell flagged.

You receive: A reviewed account-mapping calculator + the passing test report, run on your account lists.

Part of Grow Partnerships

What's verified: STUD verifies the submitted calculator reproduces the exact 3x3 stage-overlap matrix on held-out account lists: every cell is the distinct, sorted intersection of account ids for that stage pairing, ids canonicalized (trimmed, lowercased, deduped) per the normalization setting, row and column totals counted as distinct overlaps against the other side's whole book (never a sum of cells), the grand total deduped across all stages, and the biggest cell selected with a deterministic row-major tie-break. STUD does not verify that your account lists are accurate or complete, or that the flagged cell is the right place to start co-selling with this partner. The grader checks the canonical matrix data itself, independent of the presentation format you choose for the delivered file.

Opens soon

Cost25 credits
ProtectionHeld until verified delivery

This play is verified and ready. It opens soon, once sign-in and payments are live.

Example

A sample of what this play produces. Your result is generated for your inputs.

_AM_STAGES = ["prospects", "opportunities", "customers"]

def build_account_mapping_matrix(inp): """3x3 overlap of my stage-bucketed account ids against a partner's. Ids are canonicalized per normalize_ids (default yes: trim, lowercase, dedup). Row/col totals are the DISTINCT union against the other side's whole book, never a sum of the row/column's cells. grand_total is the distinct overlap across every stage. biggest_cell picks the highest count with a row-major tie-break (first stage pairing wins a tie).""" normalize = str(inp.get("normalize_ids", "yes")) != "no"

def clean(ids):
    seen, out = set(), []
    for raw in ids or []:
        value = str(raw).strip().lower() if normalize else str(raw)
        if value == "" or value in seen:
            continue
        seen.add(value)
        out.append(value)
    return out

mine = {stage: set(clean((inp.get("mine") or {}).get(stage))) for stage in _AM_STAGES}
partner = {stage: set(clean((inp.get("partner") or {}).get(stage))) for stage in _AM_STAGES}

cells = []
for my_stage in _AM_STAGES:
    for partner_stage in _AM_STAGES:
        shared = sorted(mine[my_stage] & partner[partner_stage])
        cells.append({
            "mine": my_stage,
            "partner": partner_stage,
            "count": len(shared),
            "accounts": shared,
        })

all_mine = set().union(*mine.values())
all_partner = set().union(*partner.values())
row_totals = {stage: len(mine[stage] & all_partner) for stage in _AM_STAGES}
col_totals = {stage: len(partner[stage] & all_mine) for stage in _AM_STAGES}
biggest = max(cells, key=lambda c: c["count"])

return {
    "stages": _AM_STAGES,
    "cells": cells,
    "row_totals": row_totals,
    "col_totals": col_totals,
    "grand_total": len(all_mine & all_partner),
    "biggest_cell": {"mine": biggest["mine"], "partner": biggest["partner"], "count": biggest["count"]},
}

build_account_mapping_matrix({

"mine": {"prospects": ["acct-1"], "opportunities": ["acct-2"], "customers": ["acct-3", "acct-4"]},

"partner": {"prospects": ["ACCT-1"], "opportunities": ["acct-5"], "customers": ["acct-4", "acct-6"]},

"normalize_ids": "yes",

})

-> biggest_cell {"mine": "prospects", "partner": "prospects", "count": 1}, grand_total 2

Get early access to STUD the day it goes live.