Skip to main content
SaaS Products Β· SaaS

Spotio Field Sales Platform

Cloud-native rebuild of the Spotio field sales platform: live GPS tracking, offline lead sync and route optimisation.

Spotio Field Sales Platform product cover

Spotio Field Sales Platform overview

Spotio is a field sales engagement platform used by B2C sales teams to track agents in the field, manage leads and territories, plan multi-stop visits and report on performance. Next Olive took over the platform's infrastructure when its original monolithic build could no longer keep pace with growth, and re-engineered it as a distributed, cloud-native system that ingests real-time location streams, automates lead synchronisation and serves custom reporting without slowing down the app that agents rely on every day.

The engagement was a full reconstruction of the environment behind the product. We designed a private virtual network with isolated subnets across multiple availability zones, moved the core business logic out of the monolith into single-purpose containerised microservices, migrated historical lead records, agent tracking logs and territory configurations into a replicated database array with automatic failover, and built CI/CD pipelines so that testing, image building and production deployment run without manual steps or downtime. Everything from the network layout to the security rules is declared in Terraform.

Challenge in field sales operations

The inherited platform hosted authentication, map rendering, application logic and database transactions in one server environment, and that design was failing in five specific ways. Real-time location updates from thousands of mobile devices were written directly to the primary transactional database, causing row locks and connection exhaustion during peak morning hours. Territory management and nearby-lead searches ran as standard relational queries with no spatial indexing, so agents waited on slow results. Any change to a single component, such as a reporting layout or the routing algorithm, forced a full compile and redeploy of the whole system, with periodic service interruptions.

On the mobile side there was no structured framework for intermittent connectivity: agents who saved leads in areas with poor cellular coverage lost data or created duplicate records. And because servers were provisioned by hand through cloud consoles, configuration drifted between development, staging and production. Our objectives followed directly from these failures: decouple ingestion from storage, codify the infrastructure, make mobile sync resilient, optimise spatial processing and build zero-trust security into every layer.

Solution architecture & delivery

Location tracking now runs through a dedicated geospatial ingestion microservice. Mobile clients hold persistent WebSocket connections through an application load balancer that terminates TLS; each coordinate packet carries latitude, longitude, velocity, a device identifier and a timestamp. The service splits every packet into two paths. The fast path writes the current position into a Redis cluster using sorted sets scored by timestamp, so manager dashboards pull any agent's live location with sub-second retrieval. The persistent path publishes the packet to Apache Kafka, where spatial persistence workers read in batches and store structured paths in PostgreSQL with PostGIS. GiST indexes on every geometry column mean a check such as "is this agent inside this territory polygon" resolves in milliseconds, and geofencing listeners raise background events whenever an agent crosses a sales boundary.

Lead management is an event-driven microservice written in a compiled language and running in isolated containers. Each status change or new prospect becomes a discrete event, validated against strict schemas at the API gateway before entering the message broker, which is split into a critical queue for immediate assignments, a standard sync queue for routine profile updates and a batch integration queue for background sync with third-party ERP tools and external databases. Optimistic concurrency control with per-record version numbers stops concurrent writes overwriting each other; mismatches go to a reconciliation service that merges field-level changes. A stateless route optimisation engine geocodes addresses, builds a distance matrix from local road-network data, sorts stops to minimise travel while respecting visit time windows and returns a compressed navigation vector. Pre-calculated matrices cached per postal code let partial recalculations complete within seconds when an agent adds or skips a stop.

Reporting is fully isolated from the transactional path. Log-based change data capture agents watch the production database transaction logs and stream every lead change, completed route and location log into Amazon Redshift, modelled as a star schema with a Sales Visits fact table surrounded by Agents, Leads, Territories and Calendars dimensions; hourly aggregation jobs keep executive dashboards current. On the device, an embedded relational database inside the iOS and Android apps is the agent's source of truth, and only pending deltas are uploaded and acknowledged on reconnection. The whole estate runs on Kubernetes and Docker across three availability zones behind an NGINX ingress controller, with Okta and OpenID Connect for identity, CrowdStrike Falcon on cluster hosts, GitHub Actions pipelines and Prometheus and Grafana for telemetry.

Key features of the Spotio Field Sales Platform

  • Real-time agent tracking: WebSocket ingestion, Redis sorted sets for live positions, Kafka streaming into PostGIS
  • Territory management with GiST spatial indexes and geofence events raised on boundary crossings
  • Event-driven lead management with critical, standard and batch integration queues, including ERP synchronisation
  • Optimistic concurrency with automatic field-level reconciliation for concurrent lead edits
  • Stateless route optimisation engine: geocoding, distance matrices, time-window aware sequencing and partial recalculation
  • Offline-first mobile sync for iOS and Android using UUIDs, sequence numbers, transaction hashes and delta uploads
  • Custom reporting warehouse on Amazon Redshift fed by change data capture, with a star schema and hourly aggregates
  • Role-based access for field representatives, territory managers, system administrators and service identities via Okta SSO with MFA

Who this platform is for

This blueprint suits SaaS vendors and enterprise sales organisations running large mobile field teams: door-to-door and B2C sales, territory-based prospecting, or any operation where thousands of devices stream location data while agents work in patchy coverage. It applies equally to products that have outgrown a monolith and need transaction processing separated from analytics, or that must evidence SOC 2 Type II, HIPAA or GDPR controls in their infrastructure.

Impact & results

  • Live agent positions served to manager dashboards with sub-second retrieval from the Redis sorted-set cache
  • Territory polygon checks and nearby-lead searches evaluated in milliseconds through PostGIS GiST indexes
  • Location ingestion decoupled from the transactional database, removing the peak-hour row locks and connection exhaustion
  • Field apps keep full capability offline, with incremental delta sync and automatic conflict merging on reconnection
  • Route recalculations for changed itineraries returned to the device within seconds using cached distance matrices
  • Reporting moved to a columnar warehouse with hourly aggregates, so analytics never touches operational tables
  • Horizontal pod autoscaling at a 70% threshold plus cluster auto-scaling, scaling back down each evening to control cloud cost
  • Automated failover promotes a replica and repoints services within seconds; encryption keys rotate every ninety days without downtime

FAQ about the Spotio Field Sales Platform

What problem did the Spotio Field Sales Platform rebuild solve?

The legacy monolith wrote thousands of live GPS updates straight into the transactional database, ran territory searches without spatial indexing, lost or duplicated leads when agents went offline, and needed a full redeploy for every change. We split it into containerised microservices with separate paths for tracking, leads, routing, reporting and mobile sync.

Which technologies power the Spotio Field Sales Platform?

Kubernetes and Docker on multi-zone clusters, PostgreSQL with PostGIS for spatial data, Apache Kafka for location streaming, a Redis cluster for live coordinates, Amazon Redshift for reporting, Terraform for infrastructure as code, Okta with OpenID Connect for identity, GitHub Actions for CI/CD and Prometheus with Grafana for telemetry.

How does the mobile app work when field agents lose signal?

An embedded database on the iOS and Android device is the agent's source of truth. Every record carries a UUID, a local sequence number, a transaction hash and a sync state flag. On reconnection the app uploads only pending deltas; the sync service merges field-level changes automatically and, if two agents edited the same field, keeps the most recent validated timestamp.

Which security and compliance standards does the platform meet?

The infrastructure is built to SOC 2 Type II, HIPAA and GDPR baselines: TLS with modern cipher suites, mutual authentication between services, block-level encryption at rest, envelope encryption for sensitive fields, key rotation every ninety days, role-based access for four roles, hardware-key MFA for engineers, write-once audit logs and automated deletion across every datastore.

Spotio Field Sales Platform product screens

Build your next field sales product with Next Olive

Share your requirements β€” we will propose scope, timeline and stack within one business day.