← Back to work
Case Study · RevOps + AI

A sales territory routing tool, built with Claude

Reducing travel costs and maximizing pipeline coverage through AI-powered trip clustering and itinerary generation.

AuthorHugh Hoagland ToolsClaude, MapBox, JS Built2026

The Problem

Sales reps are leaving money on the table. Every quarter, the sales team manually plans visits across large geographic territories, deciding who to see, when, and in what order. The process is driven by habit, familiarity, and proximity bias rather than data.

Reps spend hours each quarter building travel schedules in spreadsheets or from memory. High-value accounts that are geographically close are visited on separate trips, doubling or tripling travel cost. Travel spend is poorly correlated with pipeline value. And CRM data (account priority scores, deal stage, location) exists but is rarely used directly in route planning.

302
Accounts
$7.5M
ARR at Risk
+$3.2M
Quarterly ARR Lift

The dataset is a synthetic but realistic CRM export: 302 accounts spread across five regional territories, assigned to seven reps, and segmented by account type (pension funds, endowments, foundations, hedge funds, family offices, insurance/asset managers), AUM tier, deal stage, and health score. Health scores are derived from engagement signals and product usage, and accounts flagged red are treated as churn risk.

The $7.5M ARR at risk represents the total booked ARR held by red-health customers in the dataset - accounts where churn signals are present but no visit has been scheduled. The +$3.2M quarterly lift is the estimated ARR delta between random account sampling (how most reps currently plan) and optimized routing that prioritizes churn risk and unbooked ARR within geographically efficient clusters. It's not a recovery guarantee - it's a coverage argument: the right visits, in the right order, to the right accounts.

Without a systematic approach to route planning, reps default to habit and proximity bias, visiting familiar accounts over high-priority targets and missing co-visit opportunities.

The Plan

The routing logic runs on mathematical principles: K-means clustering for geographic grouping and nearest-neighbor solving for stop-order optimization. AI was used to build it - not to run it. The concept is straightforward: pull the account list, cluster accounts geographically (weighted by pipeline value), optimize the route within each cluster, and generate a structured trip plan for each rep.

01
Ingest CRM Data
Pull account list with coordinates, deal stage, priority score, ARR, etc. Segment by rep territory.
02
Cluster Geographically
K-means clustering groups nearby accounts into logical visit clusters based on chosen parameters, weighted by pipeline value.
03
Optimize Route
Within each cluster, a nearest-neighbor solver generates the most efficient multi-stop itinerary.
04
Generate Output
Reps receive a structured trip plan: accounts, order, estimated drive time, and pipeline value per trip.

How AI Was Used

This was a genuine human + AI collaboration. I brought the business problem, the RevOps context, and the product direction. Claude handled the execution: building the dataset, writing the application code, implementing the clustering and routing logic, and iterating on the UI.

My Role (Strategy)
Identified the business problem from RevOps experience
Defined scope and success criteria to prevent feature creep
Chose MapBox for map rendering after Claude's recommendation
Specified the filter set and UX behavior for the tool
Drove each iteration: what to add, what to cut, what to fix
Validated data realism against real CRM patterns
Claude's Role (Execution)
Validated the idea and built the project plan
Generated 302-account dataset with realistic distributions
Built the full interactive HTML/JS map application
Converted XLS to embedded JSON for static deployment
Added unbooked ARR fields, split stage into status + opp
Implemented clustering, routing, and UI polish iteratively
On AI as a collaborator

The project plan, the data model, and the tool itself were all built with Claude as the execution layer. I could have done the data work by hand, but the speed difference was orders of magnitude. That's the point: AI doesn't replace the thinking, it compresses the build.

The Tool

The POC is a fully interactive web application: 302 accounts plotted on a MapBox-powered map with markers sized by AUM tier, filterable by territory, rep, deal stage, account type, priority score, health status, and AUM tier in real time. K-means clustering groups nearby accounts into trip clusters, and nearest-neighbor routing generates efficient stop order with estimated drive times. Each cluster shows total ARR, unbooked ARR, account count, and health mix so reps can prioritize by value.

Interactive Demo
Full interactive tool. Filter, cluster, and route accounts in real time.

What's Next

Live CRM Integration. Replace static JSON with a scheduled API call to the CRM, ensuring data is always current without manual exports.

Calendar and Booking. Connect to rep calendars to auto-suggest trip dates and block travel time. Export itineraries directly to Google Calendar or Outlook.

Advanced Routing. Upgrade from nearest-neighbor to a true TSP solver. Add constraints like meeting duration, time-of-day preferences, and hotel locations.

Flight Cost Optimization. Integrate flight price APIs to factor airfare into trip ROI calculations, balancing travel cost against pipeline value per trip.