BlackPrint Technologies · Jul 2026
Pharma Field Sales
Route-Optimized Execution Platform
Overview
Built a pilot-ready field-sales execution platform for a national pharmaceutical distributor that digitizes territory assignment, driving-aware daily routing, GPS-tracked pharmacy visits with mandatory photo evidence, and supervisor review across a five-role sales hierarchy.
Highlights
- 01
Engineered a driving-aware route planner that clusters each rep's stops with home-seeded k-means, sequences them with a deterministic multi-start solver (nearest-neighbor, Or-opt, 2-opt, 3-opt), and escalates 23-stop days with per-rep skills, 15–45 min service times and priority accounts to Google's Route Optimization API as a managed VRP.
- 02
Built a Node.js/Express and PostgreSQL/PostGIS backend on Vercel with 34 modules, 260+ endpoints and 106 Knex migrations, enforcing territory scope at the query layer and streaming live field activity over SSE through a Postgres outbox with LISTEN/NOTIFY.
- 03
Automated operations with 16 Vercel Cron jobs (source-data sync, alert rules, GPS retention purges and daily/weekly/monthly reports) and hardened the platform with 1,100+ test cases and a 16-report multi-domain audit program.
Stack
- Node.js
- Express
- PostgreSQL
- PostGIS
- Knex.js
- Vercel Cron
- Google Route Optimization API
- Google Routes API
- MapLibre GL JS
- Server-Sent Events
- Google Cloud Storage
- Vehicle Routing (VRP)
Working on something similar?
Tell me about the problem and the data behind it. I reply within 24–48 hours.
Discuss a project