Shipment Tracking Integration for 3PL Providers
Third-party logistics (3PL) providers face a unique challenge: they work with dozens of carriers but need to present a unified tracking experience to their clients. This guide shows how to build a comprehensive tracking system that works across all your carrier partners.
The 3PL Tracking Challenge
As a 3PL, you likely work with:
- 5-20 domestic carriers for last-mile delivery
- 3-5 international freight carriers for cross-border shipments
- Multiple postal services for economy shipments
- Specialized carriers for oversized, fragile, or temperature-controlled goods
Each carrier has its own tracking system, and your clients expect you to provide tracking for all of them through your platform.
Common Pain Points
- Client expectations — Your clients want one dashboard to track all shipments, regardless of carrier
- Integration overhead — Building and maintaining 20+ carrier integrations is expensive
- Inconsistent data — Different carriers report statuses differently, making aggregation difficult
- SLA monitoring — You need to track delivery performance across all carriers to meet SLA commitments
Architecture for 3PL Tracking
System Overview
Client Portal ← Your 3PL Platform ← WhereParcel API ← 500+ Carriers
↑
Webhook Events
(status changes)
↓
Notification Service → Client Alerts
SLA Monitor → Internal Alerts
Analytics → Performance Dashboard
Implementation
Step 1: Register Shipments at Dispatch
When you hand off a shipment to a carrier, register it for tracking:
async function registerShipment(shipment) {
const response = await fetch('https://api.whereparcel.com/v2/track', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.WHEREPARCEL_API_KEY}:${process.env.WHEREPARCEL_SECRET_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
carrier: shipment.carrierCode,
trackingNumber: shipment.trackingNumber,
webhook: {
url: 'https://your3pl.com/webhooks/tracking',
events: ['status_changed', 'delivered', 'exception'],
},
}),
});
const result = await response.json();
// Store the tracking reference in your system
await db.shipments.update(shipment.id, {
trackingRegistered: true,
lastTrackingStatus: result.data?.status,
});
return result;
}
Step 2: Process Webhook Events
Handle incoming tracking events and route them appropriately:
app.post('/webhooks/tracking', async (req, res) => {
res.status(200).json({ received: true });
const { event, data } = req.body;
const shipment = await db.shipments.findByTracking(data.trackingNumber);
if (!shipment) return;
// Update shipment status
await db.shipments.update(shipment.id, {
lastTrackingStatus: data.status,
lastTrackingEvent: data.events[0],
lastUpdated: new Date(),
});
// Check SLA compliance
await checkSLACompliance(shipment, data);
// Notify client if they have alerts enabled
await notifyClient(shipment, data);
});
Step 3: Build the Client Dashboard
Provide clients with a unified view of all their shipments:
app.get('/api/client/:clientId/shipments', async (req, res) => {
const { clientId } = req.params;
const { status, carrier, dateFrom, dateTo } = req.query;
const shipments = await db.shipments.find({
clientId,
...(status && { lastTrackingStatus: status }),
...(carrier && { carrierCode: carrier }),
...(dateFrom && { createdAt: { $gte: new Date(dateFrom) } }),
...(dateTo && { createdAt: { $lte: new Date(dateTo) } }),
});
res.json({
total: shipments.length,
shipments: shipments.map(s => ({
id: s.id,
trackingNumber: s.trackingNumber,
carrier: s.carrierCode,
carrierName: s.carrierName,
status: s.lastTrackingStatus,
lastEvent: s.lastTrackingEvent,
origin: s.origin,
destination: s.destination,
createdAt: s.createdAt,
lastUpdated: s.lastUpdated,
})),
});
});
SLA Monitoring
One of the biggest advantages of centralized tracking is the ability to monitor carrier performance against SLAs.
Define SLA Rules
const slaRules = {
domestic_standard: {
maxDays: 3,
warningAt: 2, // Alert at day 2 if not delivered
},
domestic_express: {
maxDays: 1,
warningAt: 0.5, // Alert after 12 hours
},
international_standard: {
maxDays: 14,
warningAt: 10,
},
international_express: {
maxDays: 5,
warningAt: 3,
},
};
Monitor Compliance
async function checkSLACompliance(shipment, trackingData) {
const sla = slaRules[shipment.serviceLevel];
if (!sla) return;
const daysSinceShip = getDaysSince(shipment.shippedAt);
if (trackingData.status === 'delivered') {
// Record delivery performance
await db.slaMetrics.insert({
shipmentId: shipment.id,
carrier: shipment.carrierCode,
serviceLevel: shipment.serviceLevel,
daysToDeliver: daysSinceShip,
withinSLA: daysSinceShip <= sla.maxDays,
});
} else if (daysSinceShip >= sla.warningAt && !shipment.slaWarned) {
// Send warning alert
await sendInternalAlert({
type: 'sla_warning',
shipment,
message: `Shipment ${shipment.trackingNumber} approaching SLA limit (${daysSinceShip}/${sla.maxDays} days)`,
});
await db.shipments.update(shipment.id, { slaWarned: true });
}
}
Analytics and Reporting
Track carrier performance metrics for data-driven decisions:
Key Metrics to Track
| Metric | Description | Goal |
|---|---|---|
| On-time delivery rate | % delivered within SLA | > 95% |
| Average transit time | Days from ship to delivery | Varies by service |
| Exception rate | % with delivery exceptions | < 5% |
| First attempt success | % delivered on first attempt | > 85% |
| Tracking data freshness | Average age of latest event | < 30 min |
Carrier Comparison Report
async function generateCarrierReport(dateRange) {
const metrics = await db.slaMetrics.aggregate([
{ $match: { createdAt: { $gte: dateRange.from, $lte: dateRange.to } } },
{
$group: {
_id: '$carrier',
totalShipments: { $sum: 1 },
onTimeCount: { $sum: { $cond: ['$withinSLA', 1, 0] } },
avgDaysToDeliver: { $avg: '$daysToDeliver' },
},
},
]);
return metrics.map(m => ({
carrier: m._id,
totalShipments: m.totalShipments,
onTimeRate: (m.onTimeCount / m.totalShipments * 100).toFixed(1) + '%',
avgTransitDays: m.avgDaysToDeliver.toFixed(1),
}));
}
White-Label Tracking Pages
Offer your clients branded tracking pages they can share with their end customers:
https://your3pl.com/track/{clientSlug}/{trackingNumber}
Each client gets their own branded experience:
- Custom logo and colors
- Client-specific support contact
- Localized in the client’s preferred language
- Optional: custom domain (track.clientbrand.com)
Getting Started
- Sign up for a WhereParcel Business or Enterprise plan
- Register webhooks for real-time tracking updates
- Build your client dashboard using our standardized tracking data
- Set up SLA monitoring to track carrier performance
- Launch white-label tracking for your clients’ end customers
For 3PL-specific integration support, contact our enterprise team.