STUD
← Plays

Find · Find & Gather · Analysis & Finance

Best co-selling rep pairs with a partner

The short ranked list of your-rep-to-partner-rep pairs who share the most open accounts, so you set up the few high-yield co-selling calls.

You receive: A reviewed rep-pairing calculator + the passing test report, run on your two rosters.

Part of Grow Partnerships

Example

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

Best co-selling rep pairs with a partner, authored for STUD.com's own partner motion.

Given your open opportunities and a partner's (each row names a rep owner and an

account id), rank your-rep-to-partner-rep pairs by how many open accounts they share.

Shared accounts are deduped (an account counts once per pair), listed sorted, ties

break by your_rep then partner_rep, and the list truncates to top_n (0 returns all).

Blank owners or account ids are skipped; ids compare exactly after trimming whitespace.

def find_best_coselling_pairs(inp): your_owner_field = str(inp.get("your_owner_field", "owner")) partner_owner_field = str(inp.get("partner_owner_field", "owner")) account_field = str(inp.get("account_field", "account_id"))

def roster(rows, owner_field):
    by_rep = {}
    for row in (rows or []):
        owner = str(row.get(owner_field, "")).strip()
        account = str(row.get(account_field, "")).strip()
        if owner == "" or account == "":
            continue
        by_rep.setdefault(owner, set()).add(account)
    return by_rep

yours = roster(inp.get("your_rows"), your_owner_field)
partners = roster(inp.get("partner_rows"), partner_owner_field)

pairs = []
for your_rep, your_accounts in yours.items():
    for partner_rep, partner_accounts in partners.items():
        shared = sorted(your_accounts & partner_accounts)
        if shared:
            pairs.append({
                "your_rep": your_rep,
                "partner_rep": partner_rep,
                "shared_count": len(shared),
                "shared_accounts": shared,
            })

pairs.sort(key=lambda p: (-p["shared_count"], p["your_rep"], p["partner_rep"]))
top_n = int(inp.get("top_n", 10) or 0)
return pairs if top_n <= 0 else pairs[:top_n]

Opens later

This play is not open to run yet, so it has no price. Leave your email and STUD will tell you when it opens.

Scope of the check

What's verified: STUD verifies the rep-pairing calculator against a held-out reference: for every pair of your rep and a partner rep it computes the deduped set of account ids they share (exact match after trimming whitespace, rows missing an owner or an account id skipped), keeps only pairs with at least one shared account, ranks by shared count descending with ties broken alphabetically by your rep then the partner rep, and truncates to your top_n (0 returns all pairs). STUD does not verify that your roster exports are complete or current, does not fuzzy-match account ids that differ in spelling or casing, and does not judge whether a high-overlap pair is actually a good co-selling call.