How to assign leads and accounts to sales territories by city, county or district
Define territories as sets of counties, cities, ZIPs or districts, then place each lead's address in them: geocode the address, call locate_point, and look the result up in your territory table. Because every area has a stable ID, territories survive renames, and you can draw them as GeoJSON for the team.
Who this is for
- Sales and revenue operations
- Field service and franchise networks
- Government relations teams
Ask your agent
With Boundary Atlas added to Claude, ChatGPT, Cursor or Codex (free, no key; how):
Here are our territories as lists of counties. For each new lead's address, find the county with Boundary Atlas and tell me which territory owns it.
Step by step
- Define territories. List each territory's county (or city, ZIP, district) IDs, e.g. us:county:17031.
- Place each lead. Geocode the address, then locate_point(lat, lon); read the county, city or district ID.
- Assign. Look the ID up in your territory table. Leads in unincorporated areas have no city, so county-based territories are the safest.
- Show the map. get_boundaries on each territory's counties, merged, gives a map for the team.
Live example
233 S Wacker Dr, Chicago (Willis Tower), at 41.8786, -87.6362:
| Level | Result |
|---|---|
| City or town | Chicago |
| County | Cook County |
| ZIP code | 60606 |
| Congressional district | Illinois's 7th congressional district (IL-07) |
| State senate district | State Senate District 5 |
| State house district | State House District 9 |
| Voting precinct | 42014 |
| State | Illinois |
| Mayor | Brandon Johnson |
| U.S. Representative | Danny K. Davis (D) |
| U.S. Senator | Richard J. Durbin (D) |
| U.S. Senator | Tammy Duckworth (D) |
| State Senator | Lakesia Collins (Democratic) |
| State Representative | Yolonda Morris (Democratic) |
| City website | chi.gov |
| City council | Chicago City Council |
| County website | www.cookcountyil.gov |
locate_point(lat=41.8786, lon=-87.6362)
Things to know
- ZIP-based territories are approximate: ZIPs cross county and city lines. Use the ZIP crosswalk guide to see where.
More guides
- How to convert ZIP code data to counties (or cities, or districts)
- How to find the congressional and state legislative districts for an address
- How to list the ZIP codes in a city, county or congressional district
- How to map election results by precinct
- How to match members or supporters to their legislative districts
- How to make a map of your data by county, city or district
- How to tell whether an address is inside city limits
- How to find the federal riding and polling division for a place in Canada
- How to find who represents an address in Congress and the state legislature
- How to find a city's or county's official website and code of ordinances