Territory Planning With Real Company Data
By Kooperativa Engineering
Territory planning with company data means listing the accounts in your market from a company search, giving each account a weight that reflects the selling work it holds, and assigning accounts so that every territory carries the same total weight. Equal account counts are the common shortcut, and they produce unequal territories, because one account can hold ten times the work of another.
The method below uses three pieces of our API: company search to list the market, people search to measure the work inside each account, and a small balancing function to hand out the load. It also lists what the data cannot do, because a territory plan lasts a year and its weak points are easier to handle before the plan is announced.
Why account count is the wrong unit
A rep with a hundred small companies and a rep with a hundred large ones have the same count and very different jobs. The large accounts have longer buying groups, more meetings per deal and more people to keep warm. Territory disputes usually start in the gap between the number on the plan and the work on the desk. The fix is to choose a weight before you assign anything.
Selling time is the scarce resource. Salesforce's seventh State of Sales report, a survey of 4,050 sales professionals in 22 countries run from August to September 2025, found that reps spend about 40% of an average week selling, and it says more than half of their time goes to non-selling work such as data entry and prospecting. A territory plan divides the hours that remain, so the weight you choose should track how many of those hours an account will take.
| Weight | What it measures | Cost to get it | Main weakness |
|---|---|---|---|
| Account count | Nothing about the account | Free | Treats a small company like a very large one |
| Staff count | Size of the company | Comes with the company search row | Size is not the same as sales potential |
| People in the function you sell to | Size of the buying group | One people search call per account | Depends on how complete the index is for that company |
| Closed-won history | What converted before | Needs your CRM | Says nothing about accounts nobody worked |
List the market with company search
The company search endpoint takes country, city, industry, a minimum and maximum staff count and a name, and needs at least one of them. Each row returns company_id, name, staff_count, industries, hq_city and hq_country_code. A page holds at most 50 rows, so the code walks the pages. If the rows you collect do not reach the reported total, split the filter by city or by staff band and merge the results by company_id. The market mapping article covers how to size a market and read its totals. This one starts from the list and ends at the assignment.
const BASE = 'https://kooperativa.io/api/v1';
const headers = {
Authorization: 'Bearer ' + process.env.KOOPERATIVA_API_KEY,
'Content-Type': 'application/json',
};
// A page is at most 50 companies, so walk the pages until the total is reached
export async function listMarket(filters, maxPages = 40) {
const accounts = new Map();
for (let page = 1; page <= maxPages; page++) {
const res = await fetch(BASE + '/companies/search', {
method: 'POST',
headers,
body: JSON.stringify({ ...filters, page, per_page: 50 }),
});
if (!res.ok) break;
const body = await res.json();
for (const row of body.results) accounts.set(row.company_id, row);
if (accounts.size >= body.total || body.results.length < 50) break;
}
return [...accounts.values()];
}
const market = await listMarket({
country: 'US',
industry: 'Software Development',
min_staff: 201,
max_staff: 1000,
city: 'Denver',
});Two limits shape the list. There is no state filter, only country and city, so a regional territory is a list of cities that you maintain yourself. And company search uses its own industry labels, which differ from the labels in people search: Software Development in one is Computer Software in the other.
Weigh each account by the work inside it
Staff count is free and good enough for a first pass. For a better weight, count the people in the function you sell to at each account. People search accepts a company_id and a title keyword, and its total is the count, so one call with per_page set to 1 gives you the number without downloading anyone.
// One title keyword per call
async function functionWeight(companyId, keyword) {
const res = await fetch(BASE + '/people/search', {
method: 'POST',
headers,
body: JSON.stringify({ company_id: companyId, title: keyword, per_page: 1 }),
});
return res.ok ? (await res.json()).total : null;
}
export async function weigh(accounts, keyword) {
const weighted = [];
for (const row of accounts) {
const people = await functionWeight(row.company_id, keyword);
// every account weighs at least 1, even when the call failed or found nobody
weighted.push({ company_id: row.company_id, weight: people || 1 });
}
return weighted;
}Query one keyword at a time. In a check on 21 November 2026, a search for director at one company returned twelve people, while a two-word title query on the same company returned none. A broad word such as director also catches titles you may not want, so add a seniority filter once you have settled on the function.
Treat these counts as relative. The index holds the profiles that exist for each company, so compare accounts with each other and do not read the number as the real size of anyone's team.
Balance the load, then read the spread
The balancing rule is simple: sort the accounts from heaviest to lightest and give each one to the territory with the least weight so far. It does not find the perfect split, but it lands close, and you can read the result in one number, the spread. That is the gap between the heaviest and the lightest territory, divided by the average.
export function balance(accounts, repCount) {
const reps = Array.from({ length: repCount }, (_, i) => ({
rep: i + 1,
weight: 0,
accounts: [],
}));
const sorted = [...accounts].sort((a, b) => b.weight - a.weight);
for (const account of sorted) {
const lightest = reps.reduce((min, r) => (r.weight < min.weight ? r : min));
lightest.accounts.push(account.company_id);
lightest.weight += account.weight;
}
const weights = reps.map((r) => r.weight);
const mean = weights.reduce((sum, w) => sum + w, 0) / repCount;
return { reps, spread: (Math.max(...weights) - Math.min(...weights)) / mean };
}Run it per region and not across the whole country. Group the accounts by city list first, give each region a number of reps in proportion to its total weight, then balance inside each region. Pick the spread your managers accept as fair, and publish it with the plan so the argument is about a number everyone can see.
What the data cannot do
Staff count is the company row's own number and can lag reality, and the size range on a person's profile is a separate field that can disagree with it. On 21 November 2026 one software company showed a staff_count of 263 on its company row and a range of 51 to 200 on its employees' profiles. Pick staff_count and use it consistently.
The search rows carry size, industry, location and founded year, not revenue or installed technology, and nothing about rep capacity. A plan that needs those has to bring them from somewhere else. And a plan is a snapshot: re-run the market list each quarter, assign new companies from a shared pool, and leave existing assignments alone unless the spread has drifted.
Frequently asked questions
How do you build a territory plan?
List the accounts in the market, weight each one by the work it holds, give the heaviest accounts first to the territory with the least weight so far, and check the spread between the heaviest and the lightest territory.
What is territory planning?
Dividing a market into segments, by geography, industry, company size or an account list, and assigning each segment to a rep or team so that opportunity and workload are fair.
How many accounts should one rep own?
There is no universal number. Start from how many accounts a rep can work properly in a quarter given your deal cycle and the number of people involved in a deal, then divide the weighted total by that capacity.
Can I plan territories by state?
Company search filters by country and city, not by state. Build a region as a list of cities and keep that list in your own configuration.
Get started
Try Kooperativa
One API key. Person and company enrichment, structured search, and monitors under one flat license.