Case Study

Supply Chain Visibility for Shipment Tracking & Alerts

How we built a supply chain visibility platform for 2M+ shipments across 12 carriers — with carrier API integration, ETA prediction, exception alerts, and 45% fewer customer inquiries.

Industry
Logistics / Supply Chain
Duration
10 Months
Services
Full-Stack · Carrier APIs · TimescaleDB
Markets
North America

Carrier APIs · ETA · Exception Alerts

2M+
Shipments
12
Carriers
45%
Fewer Inquiries
Multi-Tenant
Visibility

The Client's Vision

A 3PL and freight brokerage managing shipments for hundreds of shippers was drowning in “Where's my shipment?” calls. Each carrier had a different tracking portal — FedEx, UPS, DHL, regional LTL carriers. Customer service manually looked up tracking numbers one by one.

They wanted a unified visibility platform where shippers could see all shipments in one dashboard, get proactive exception alerts (delays, damage, customs hold), and receive predicted ETAs — with multi-tenant isolation so each customer sees only their data.

What Was Breaking

Carrier API Integration

Twelve carriers, twelve different APIs — different auth, rate limits, and response formats. Some offered webhooks, others required polling. Error handling and retry logic varied wildly.

ETA Prediction

Carrier ETAs were often wrong — especially for cross-border or multi-leg shipments. Customers wanted more accurate delivery windows. No historical data to train models.

Exception Alerts

Delays, damaged goods, and customs issues went unnoticed until customers called. No proactive notification. Support had no single view of exceptions across carriers.

Multi-Tenant

Hundreds of shippers — each should only see their own shipments. The old system used shared spreadsheets. No role-based access or data isolation.

The Architecture We Built

We built a supply chain visibility platform with a carrier abstraction layer that normalizes APIs from 12 carriers. Tracking events are ingested, stored in TimescaleDB for time-series queries, and used for ETA prediction. Exception rules trigger alerts. Multi-tenant isolation is enforced at query time.

System Architecture

Next.js Shipper Portal & Dashboard
Shipment list with filters, tracking detail view, and exception alerts. ETA predictions and delivery window display
API Gateway & Auth Layer
Multi-tenant isolation — each shipper's data scoped by tenant ID. API keys and SSO for enterprise customers
PostgreSQL & TimescaleDB — Shipments & Events
Shipments, tracking numbers, and carrier assignments. TimescaleDB for high-volume tracking events with time-series optimization
Carrier API Abstraction Layer
Unified interface for 12 carriers. Normalized tracking events, webhook/polling ingestion. Rate limiting and retry per carrier
ETA Engine & Exception Alerts (Redis + AWS)
ETA prediction from historical lane data. Exception rule engine triggers email and in-app alerts. Redis cache for real-time lookup

The carrier abstraction layer was the foundation. We defined a canonical tracking event schema (timestamp, location, status, description) and built adapters for each carrier. Polling runs on a schedule; webhooks push when available. Deduplication ensures we don't store the same scan twice. Failed API calls go to a retry queue with exponential backoff.

Tech Stack

Next.js
Node.js
PostgreSQL
TimescaleDB
Redis
AWS
Carrier APIs
Multi-Tenant

How We Delivered It

Phase 1 — Weeks 1–4
Discovery & Carrier Mapping

Documented 12 carrier APIs — auth, endpoints, rate limits. Designed canonical tracking event schema. Defined multi-tenant data model.

Phase 2 — Weeks 5–24
Carrier Adapters & Ingestion

Built adapter for each carrier with retry and rate limiting. Implemented webhook receivers and polling jobs. Stored events in TimescaleDB. Built shipment and tenant management.

Phase 3 — Weeks 25–36
ETA Engine & Exception Alerts

Built ETA prediction using lane history. Implemented exception rule engine (delay, damage, customs). Integrated email and in-app notifications.

Phase 4 — Weeks 37–40
Portal & Rollout

Built shipper portal with tracking and alerts. Migrated historical shipments. Onboarded 50 pilot shippers, then full rollout. Measured inquiry reduction.

The Impact

Customer inquiries
45% fewer
Self-service tracking and proactive alerts
2M+ shipments
Tracked
Across 12 carrier integrations
12 carriers
Unified
Single dashboard for all tracking
Exception visibility
Proactive
Alerts before customers call
“We used to spend half our day looking up tracking numbers. Now shippers see everything in one place and get alerted when something goes wrong. Our support team can focus on real problems.”
— VP of Operations, 3PL

What Made This Work

Carrier API diversity is the main integration challenge. Each carrier has different auth (API key, OAuth, certificate), rate limits (per second, per day), and payload structure. The abstraction layer hides this — our application works with a single normalized format. Adding a new carrier is an adapter + config, not core changes.

TimescaleDB was critical for tracking event volume. We ingest millions of scan events per month. PostgreSQL alone would struggle with time-range queries. TimescaleDB's hypertables and compression cut storage and query time significantly. We partition by carrier and time.

ETA prediction improved over time as we collected lane-level history. Initial version used carrier ETAs when available; we layered on our own model using historical delivery times per origin-destination pair. Exception rules were built from common patterns — delayed, out for delivery, exception (damage, hold). Configurable thresholds let each tenant tune sensitivity.

Building a Supply Chain Visibility Platform?

We help logistics companies build production-grade tracking and visibility systems. Let's talk about your architecture.

Book Strategy CallCase Studies