One platform standardizing medical representative field force across 40+ agencies

Nanostuffs built Hemas Pharmaceuticals a fullstack medical-representative field-force platform live across 40+ agencies in Sri Lanka — daily call reporting, tour planning, offline e-detailing, sample and promo workflows, expense claims, geotracking, and centralized doctor and pharmacy management, on a React.js PWA and Node.js backend hosted on Heroku with Postgres, Redis, CloudCube, and integrations to SAP and Darwinbox.

Instead of each agency running its own tools, every medical representative now works from the same field platform — with agency-level customization for modules and look-and-feel, and HQ visibility into every visit, sample, and report.

Hemas Pharmaceuticals logo
Pharmaceuticals · React.js PWA + Node.js on Heroku · 40+ Agencies

How offline e-detailing works for medical representatives

Video coming soon

At a glance

1000+
daily DCRs submitted by medical representatives
90%+
DCR submission compliance rate
99%+
sample tracking accuracy
< 1 Wk
expense reimbursement — down from months

Client

Hemas Pharmaceuticals — pharmaceutical manufacturer and distributor, Sri Lanka. 800+ medical representatives and field users across 40+ agencies.

Challenge

Fragmented agency tools for medical representatives — no shared DCR, e-detailing, sample, expense, or doctor master data across the network.

Solution

Fullstack React.js PWA + Node.js on Heroku (Postgres, Redis, CloudCube), with SI Promo, expense-to-SAP auto-payment, Darwinbox HR sync, geotracking, and agency-wise customization.

Result

1000+ daily DCRs, 90%+ compliance, 99%+ sample tracking accuracy, reporting turnaround cut by 80%, expense reimbursement from months to within a week.

The Challenge

800 representatives. 40 agencies. No single source of truth.

Hemas Pharmaceuticals runs one of Sri Lanka's largest pharmaceutical field operations: more than 800 medical representatives and pharmacy representatives working across 40+ distribution agencies, visiting clinics, hospitals, and pharmacies daily. With that scale comes a coordination problem that spreadsheets cannot solve.

Each agency kept its own records. Head office had no standardized view of daily call reports, sample distribution, or tour compliance — and by the time manual roll-ups reached leadership, the data was stale.

Expense reimbursement took months, routed through multiple approval levels by hand with no system-enforced grade-wise limits or fuel price controls. Sample distribution had no compliance controls — no drug-licence verification before allocating samples, no structured warehouse request workflow, and no way to track returns.

Field presentations failed in low-signal areas, where representatives fell back on printed collateral because interactive e-detailing content wasn't available offline. And HR data was entirely disconnected — leave balances, attendance, and the holiday calendar lived in Darwinbox with no link to field activity or the field app itself.

Engagement Snapshot

Industry
Pharmaceutical manufacturing & distribution
Geography
Sri Lanka — 40+ agencies
Field users
800+ medical representatives & staff
Field client
React.js PWA
Backend
Node.js on Heroku (Postgres, Redis, CloudCube)
Integrations
SAP + Darwinbox
Why React.js PWA + Node.js on Heroku

Why Heroku was the right host for a medical representative field platform

Hemas needed a custom medical-representative application, not a configured CRM product. Daily call reports, offline e-detailing, agency-wise module customization, geotracking, SI Promo, expenses, and Darwinbox sync all had to be purpose-built. Nanostuffs delivered that as a fullstack product: React.js PWA on the front end, Node.js on the back end, hosted and scaled on Heroku.

Heroku hosts the application alongside Heroku Postgres, Heroku Redis, CloudCube for e-detailing and content storage, and Heroku load balancing. That stack kept the medical representative app deployable, scalable, and operable without standing up separate infrastructure for database, cache, media, or traffic distribution.

What React.js PWA + Node.js on Heroku handles natively

  • Heroku dynos & load balancing — run and scale the Node.js API serving 800+ medical representatives and 1000+ daily DCRs across 40+ agencies
  • Heroku Postgres — primary database for doctor and pharmacy masters, DCRs, territories, samples, expenses, and reporting
  • Heroku Redis — caching, session state, and queueing for sync jobs and indexing-related workloads
  • CloudCube — durable storage for e-detailing packages and content management assets medical representatives download for offline use

Where custom engineering was needed

The React.js PWA, the Node.js business logic, agency-level customization, SI Promo, expense-to-SAP payment, Darwinbox sync, geotracking and geofencing, and the reporting layer are all custom fullstack engineering — running on Heroku rather than inside a packaged CRM cloud product.

The Platform

What we built

01 · Layer

Offline e-detailing

Service workers and IndexedDB cache e-detailing packages from CloudCube on the device, so reps can run full interactive demos with zero connectivity.

React.js PWA

02 · Layer

SI Promo sample distribution

Sample requests against live SAP warehouse stock, gated by drug-licence verification and a multi-level approval chain, logged against the DCR.

SAP Integration

03 · Layer

Expense auto-payment

Monthly expense claims with grade-wise limits, routed through a manager → agency admin → admin team approval chain, then sent to SAP for automatic payment.

SAP Integration
The Hard Problem

Why a PWA, and how offline e-detailing was made reliable

The obvious approach — a native iOS or Android app — would have required App Store distribution across every agency, device management overhead, and a separate codebase to maintain. Nanostuffs chose a React.js progressive web app backed by a Node.js API on Heroku instead: installable from a browser, updateable centrally, with e-detailing packages stored on CloudCube and cached offline through service workers and IndexedDB so medical representatives can present without connectivity.

Service workers pre-fetch e-detailing packages from CloudCube into IndexedDB when connectivity is available. When a medical representative walks into a no-signal clinic, every slide deck, animation, and video plays from local storage — no network request, no failure, no falling back to printed collateral.

The result is a React.js PWA where offline e-detailing behaves identically with or without signal: packages pre-fetch via service workers into IndexedDB when connectivity is available, play back locally with zero network dependency, and queue tap/duration telemetry locally until the device reconnects and syncs to the Node.js API on Heroku.

Before

  • Paper-based and spreadsheet-driven reporting across 40+ agencies with no single source of truth
  • No structured offline e-detailing — representatives relied on printed collateral in low-connectivity areas
  • Interactive content unavailable during doctor visits with poor signal
  • No telemetry recorded on doctor engagement with detailing content

After

  • E-detailing packages pre-cached via service workers and stored in IndexedDB for reliable offline access
  • Installable PWA on tablets — no app store deployment required
  • Smooth interactive HTML5 slide decks and video playback offline
  • Offline tap/duration telemetry queued locally and auto-synced to the Node.js API on Heroku
The Approach

How we delivered it

A phased rollout — building the Postgres data foundation first, then the core platform, then the PWA and Heroku stack, before enabling all 40+ agencies.

01

Discovery & Data Foundation

Mapped medical-representative workflows, agency rules, and compliance requirements. Cleaned and unified HCP and pharmacy records from 40+ agencies into a single Postgres master data structure on Heroku.

02

Core Platform Build

Built DCR validation, territory hierarchy, tour planning, SI Promo, reporting, and SAP integration adapters on Node.js — the system of record for the entire medical representative operation.

03

PWA & Heroku Stack

Delivered the React.js PWA with offline e-detailing via CloudCube, expense capture, Darwinbox HR sync, Redis caching, and Heroku load balancing for field scale.

04

Agency Enablement

Phased rollout across all 40+ agencies in Sri Lanka, with admin training for each distribution partner, data migration support, and hypercare through go-live stabilisation.

The Outcomes

What changed for Hemas Pharmaceuticals

Real numbers only — pending metrics await client-approved data.

1000+

daily DCRs submitted by medical representatives through the system

90%+

DCR submission compliance rate — up from fragmented, untracked agency reporting

99%+

sample tracking accuracy — from uncontrolled distribution with no drug-licence enforcement

< 1 Wk

expense reimbursement via SAP auto-payment — down from a multi-month paper process

Four workflows that used to be manual, slow, and error-prone — DCR reporting, sample distribution, expense reimbursement, and HR sync — now run automatically through one platform. Reporting turnaround is down 80%, and reimbursement that once took months now closes within a week.

Stack
React.js PWANode.jsHerokuHeroku PostgresHeroku RedisCloudCubeSAP IntegrationDarwinboxSI Promo ModuleExpense ManagementService WorkersIndexedDB
Questions & Answers

React.js PWA + Node.js on Heroku — common questions

Running medical representative operations across agencies on fragmented tools?

We build fullstack field-force platforms — React.js, Node.js, Heroku — that connect DCR, e-detailing, samples, expenses, and HR in one place. Let's map where yours should start.

Discuss a Fullstack Field-Force Platform