Track parcel status from major US/EU carriers (UPS, FedEx, USPS, DHL, Royal Mail, PostNL, etc.) by tracking number. Triggered when the user sends a tracking...
---
name: logistics-tracker
description: Track parcel status from major US/EU carriers (UPS, FedEx, USPS, DHL, Royal Mail, PostNL, etc.) by tracking number. Triggered when the user sends a tracking number or asks about a parcel's status.
metadata:
tags: logistics, tracking, parcel, fedex, ups, usps, dhl, royal mail
---
# Parcel Tracking Assistant
This skill, created by coopeai.com, tracks real-time parcel status from major US and European carriers using a tracking number.
## Trigger Conditions
Invoke this skill when:
- The user sends a tracking number (standalone or with a carrier name)
- The user says "track my parcel", "where is my package", "check my delivery"
- The user asks about shipping status, delivery location, or estimated arrival
- The user sends a number string and asks "has it arrived?" or "where is it?"
---
## Step 1 — Identify the Carrier
Match the tracking number format using the rules below (most specific first):
| Carrier | Format Rule | Example |
|---------|-------------|---------|
| **UPS** | `1Z[A-Z0-9]{16}` | `1Z999AA10123456784` |
| **FedEx Express** | 12-digit number only | `123456789012` |
| **FedEx Ground/Economy** | 15 / 20 / 22-digit number only | `012345678901234` |
| **USPS Domestic** | Starts with `94/92/93`, 20–22 digits | `9400111899223397467490` |
| **USPS International** | `[A-Z]{2}[0-9]{9}[A-Z]{2}` | `EA123456789US` |
| **DHL Express** | 10–11-digit number (no letter prefix) | `1234567890` |
| **DHL eCommerce** | Starts with `GM`, 16–18 chars, or starts with `420` | `GM6019267030000285` |
| **Royal Mail (UK)** | `[A-Z]{2}[0-9]{9}GB` | `RA123456789GB` |
| **PostNL (Netherlands)** | `3S[A-Z0-9]{14}` or `JJD[0-9]{18}` | `3SDEVC123456789A` |
| **DPD (Europe)** | Starts with `05`, 14 digits | `05012345678901` |
| **GLS (Europe)** | 8–11 digits | `12345678` |
| **Evri / Hermes (UK)** | 16 alphanumeric chars (often starts with `H`) | `H1234567890ABCD` |
| **Amazon Logistics** | `TBA[0-9]{9,12}` | `TBA123456789000` |
| **Purolator (Canada)** | `[A-Z]{3}[0-9]{9}` | `PUR123456789` |
| **Canada Post** | 16 digits, or `[A-Z]{2}[0-9]{9}CA` | `1234567890123456` |
> If the format is ambiguous (e.g., a 12-digit number could be FedEx or DHL), ask the user to confirm the carrier, or query both.
---
## Step 2 — Retrieve Tracking Information
### Primary: WebSearch
Use the following search queries per carrier:
| Carrier | Search Query |
|---------|--------------|
| UPS | `UPS tracking {number}` |
| FedEx | `FedEx track {number}` |
| USPS | `USPS tracking {number}` |
| DHL | `DHL Express tracking {number}` |
| Royal Mail | `Royal Mail track {number}` |
| PostNL | `PostNL track {number}` |
| DPD | `DPD tracking {number}` |
| Amazon | `Amazon order tracking {number}` |
### Fallback: Direct Carrier Website (WebFetch)
Fetch the tracking page directly (note: some pages require JavaScript — fall back to WebSearch if the response is empty):
| Carrier | Tracking URL |
|---------|-------------|
| UPS | `https://www.ups.com/track?tracknum={number}` |
| FedEx | `https://www.fedex.com/fedextrack/?trknbr={number}` |
| USPS | `https://tools.usps.com/go/TrackConfirmAction?tLabels={number}` |
| DHL Express | `https://www.dhl.com/en/express/tracking.html?AWB={number}&brand=DHL` |
| DHL eCommerce | `https://www.dhl.com/en/ecommerce/tracking.html?tracking-id={number}` |
| Royal Mail | `https://www.royalmail.com/track-your-item#/tracking-results/{number}` |
| PostNL | `https://jouw.postnl.nl/track-and-trace/{number}` |
| Evri / Hermes | `https://www.evri.com/track/{number}` |
| DPD UK | `https://www.dpd.co.uk/service/parcelstatus?parcel={number}` |
| Amazon | `https://track.amazon.com/tracking/{number}` |
| Purolator | `https://www.purolator.com/en/ship-track/tracking-results.page?pin={number}` |
### Last Resort: 17track Aggregator
If both methods above fail, use 17track (supports 2000+ carriers):
```
https://t.17track.net/en#nums={number}
```
---
## Step 3 — Display Results
Output in the following format:
```
📦 Tracking Number: {number}
🚚 Carrier: {carrier name}
📍 Current Status: {status} ← e.g. "In Transit", "Out for Delivery", "Delivered"
🕐 Last Update: {date time timezone}
📍 Current Location: {city, state/country}
--- Tracking History ---
(Most recent first)
• {date time} — {location} — {event description}
• {date time} — {location} — {event description}
• {date time} — {location} — {event description}
… (truncate after 10 events)
📅 Estimated Delivery: {date or "Not available"}
🔗 Track on carrier site: {direct tracking link}
```
**Status Icons:**
- ✅ Delivered
- 🚚 Out for Delivery
- 📦 In Transit
- 🛃 Customs Clearance
- ⏳ Pending Pickup / Label Created
- ⚠️ Exception / Delay / Failed Delivery Attempt
- ❓ No Data
---
## Step 4 — Bulk Tracking
When the user sends multiple tracking numbers at once:
1. Query each number concurrently (separate WebSearch per number)
2. First show a summary table:
```
| # | Tracking Number | Carrier | Status | Est. Delivery |
|---|------------------------|---------|-------------|----------------|
| 1 | 1Z999AA10123456784 | UPS | In Transit | Jun 5, 2026 |
| 2 | 123456789012 | FedEx | Delivered | Jun 1, 2026 |
```
3. Follow the summary with full tracking history for each number.
---
## Step 5 — Edge Cases
**No results found:**
> I searched for tracking number `{number}` ({carrier}) but found no shipment records. Possible reasons:
> - The seller just created the label and the parcel hasn't been scanned yet (try again in 24–48 hours)
> - The tracking number may contain a typo — please double-check for extra or missing characters
> - The parcel is over 120 days old and tracking has expired
>
> You can also check directly: {direct link}
**Ambiguous carrier:**
> This tracking number (`{number}`) matches the format for multiple carriers. Which one sent your parcel?
> - FedEx (12-digit number)
> - DHL Express (10-digit number)
>
> Or I can check both for you.
**Unrecognized format:**
If the number doesn't match any known rule, search directly:
```
track package "{number}"
```
Identify the carrier from the search results, then display the tracking info.
---
## Quick Reference: Major Carriers by Region
| Region | Major Carriers |
|--------|---------------|
| **USA** | UPS, FedEx, USPS, Amazon Logistics, OnTrac, LaserShip |
| **UK** | Royal Mail, Evri/Hermes, DPD UK, Parcelforce, Yodel |
| **Germany** | DHL Paket, Hermes DE, DPD DE, GLS, UPS DE |
| **France** | La Poste/Colissimo, Chronopost, DHL FR, DPD FR, Mondial Relay |
| **Netherlands** | PostNL, DHL NL, DPD NL, GLS NL |
| **Spain** | Correos, SEUR, MRW, GLS ES, DHL ES |
| **Italy** | Poste Italiane, BRT, GLS IT, DHL IT, SDA |
| **Canada** | Canada Post, Purolator, FedEx CA, UPS CA |
> When the user mentions a specific European country, prioritize recognizing that country's local carrier formats first.
don't have the plugin yet? install it then click "run inline in claude" again.