← 返回
未分类 Key 中文

Logistics Tracker

Query real-time shipping status for mainstream EU/US carriers (UPS, FedEx, USPS, DHL, Royal Mail, PostNL, etc.) by tracking number. Triggered when user provi...
根据快递单号查询主流欧美/美国快递(UPS、FedEx、USPS、DHL、Royal Mail、PostNL等)的实时物流状态。用户提交快递单号后触发。
zhongkedy-del zhongkedy-del 来源
未分类 clawhub v1.0.1 2 版本 100000 Key: 需要
★ 1
Stars
📥 153
下载
💾 0
安装
2
版本
#latest

概述

Logistics Tracker

Query shipping status for mainstream European and American carriers from a tracking number.

Trigger Conditions

Invoke when the user:

  • Pastes a tracking number (alone or with carrier context)
  • Says "track my package / order / shipment"
  • Asks about delivery status, parcel location, or estimated arrival
  • Provides a number and asks "where is it?"

Step 1 — Identify the Carrier

Match the tracking number against these patterns in order (most-specific first):

CarrierPatternExample
---------------------------
UPS1Z[A-Z0-9]{16}1Z999AA10123456784
FedEx Express[0-9]{12}123456789012
FedEx Ground / SmartPost[0-9]{15} or [0-9]{20} or [0-9]{22}012345678901234
USPS (domestic)94[0-9]{20} / 92[0-9]{20} / 93[0-9]{20} / 94[0-9]{18}9400111899223397467490
USPS (international)[A-Z]{2}[0-9]{9}[A-Z]{2}EA123456789US
DHL Express[0-9]{10,11} (standalone, no letter prefix)1234567890
DHL eCommerceGM[0-9]{16,18} or [0-9]{14,20} starting with 420GM6019267030000285
Royal Mail (UK)[A-Z]{2}[0-9]{9}GBRA123456789GB
PostNL (NL)3S[A-Z0-9]{14} or JJD[0-9]{18} or JVGL[0-9]{14}3SDEVC123456789A
DPD (EU)[0-9]{14} starting with 0505012345678901
GLS (EU)[0-9]{8,11}12345678
Hermes / Evri (UK)[A-Z0-9]{16} (often starts with H)H1234567890ABCD
Amazon LogisticsTBA[0-9]{9,12}TBA123456789000
Purolator (CA)[A-Z]{3}[0-9]{9}PUR123456789
Canada Post[0-9]{16} or [A-Z]{2}[0-9]{9}CA1234567890123456

If the format is ambiguous (e.g., a plain 12-digit number could be FedEx or DHL), ask the user to confirm the carrier or try both.


Step 2 — Fetch Tracking Data

Track123 API

Track123 supports 1700+ carriers. Call the Track123 REST API via Bash.

API Key Setup (first time only)

If the curl commands below still contain $TRACK123_API_KEY, ask the user to visit https://www.track123.com/api → Dashboard → API tab → copy and paste the key here. Once received, replace $TRACK123_API_KEY in this skill file with the actual key value.

Step A — Register the tracking number:

curl -s -X POST "https://api.track123.com/gateway/open-api/tk/v2/track/import" \
  -H "Track123-Api-Secret: $TRACK123_API_KEY" \
  -H "accept: application/json" \
  -H "content-type: application/json" \
  -d '[{"trackNo": "{number}"}]'

Step B — Query the tracking status:

curl -s -X POST "https://api.track123.com/gateway/open-api/tk/v2/track/query" \
  -H "Track123-Api-Secret: $TRACK123_API_KEY" \
  -H "accept: application/json" \
  -H "content-type: application/json" \
  -d '{"trackNos": ["{number}"]}'

Parse the JSON response (data.accepted.content[0]) and extract:

  • transitStatus — overall status (e.g. DELIVERED, IN_TRANSIT)
  • deliveredTime / lastTrackingTime — last update timestamp
  • localLogisticsInfo.trackingDetails — events array (most recent first), each with eventTime, address, eventDetail
  • expectedDeliveryTime — estimated delivery window
  • localLogisticsInfo.courierTrackingLink — direct tracking URL

Present using the Step 3 format.


Step 3 — Present Results

Format the response in this structure:

📦 Tracking: {NUMBER}
🚚 Carrier: {CARRIER NAME}
📍 Status: {CURRENT STATUS}  ← e.g., "In Transit", "Out for Delivery", "Delivered"
🕐 Last Update: {DATE TIME TIMEZONE}
📍 Last 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 to 10 events max if many)

📅 Estimated Delivery: {DATE or "Not available"}
🔗 Track online: {DIRECT TRACKING URL}

Status icons:

  • ✅ Delivered
  • 🚚 Out for Delivery
  • 📦 In Transit
  • 🛃 Customs Clearance
  • ⏳ Pre-Shipment / Label Created
  • ⚠️ Exception / Delay / Attempted Delivery
  • ❓ Unknown / No Data Found

Step 4 — Handle Multiple Tracking Numbers

If the user pastes multiple tracking numbers at once:

  1. Process all in parallel (separate WebSearch per number)
  2. Present a summary table first:
| # | Tracking Number       | Carrier | Status          | Est. Delivery |
|---|----------------------|---------|-----------------|---------------|
| 1 | 1Z999AA10123456784   | UPS     | In Transit      | Jun 5, 2026   |
| 2 | 123456789012         | FedEx   | Delivered       | Jun 1, 2026   |

Then provide full details for each below.


Step 5 — Edge Cases

No tracking data found:

> I searched for tracking number {number} with {carrier} but couldn't find any results. This can happen when:

> - The label was created but the package hasn't been scanned yet (pre-shipment)

> - The tracking number was entered incorrectly

> - It's an older shipment (>120 days)

>

> Try checking directly: {DIRECT TRACKING URL}

Ambiguous carrier:

> This number ({number}) could match multiple carriers. Could you tell me which one shipped your package?

> - FedEx (12-digit)

> - DHL Express (10-digit)

>

> Or I can check both for you.

Carrier not covered:

If the pattern doesn't match any known carrier, search broadly:

track package "{number}"

and report the carrier identified by the search results.


Carrier Cheat Sheet (Quick Reference)

RegionMajor Carriers
-----------------------
USUPS, FedEx, USPS, Amazon Logistics, OnTrac, LaserShip/LSO
UKRoyal Mail, Evri/Hermes, DPD UK, Parcelforce, Yodel, DHL
GermanyDHL Paket, Hermes DE, DPD DE, GLS, UPS DE
FranceLa Poste/Colissimo, Chronopost, DHL FR, DPD FR, Mondial Relay
NetherlandsPostNL, DHL NL, DPD NL, GLS NL
SpainCorreos, SEUR, MRW, GLS ES, DHL ES
ItalyPoste Italiane, BRT, GLS IT, DHL IT, SDA
CanadaCanada Post, Purolator, FedEx CA, UPS CA

When a user mentions a European country, prefer that country's local carriers if the number pattern fits.

版本历史

共 2 个版本

  • v1.0.1 当前
    2026-06-06 07:02
  • v1.0.0
    2026-06-04 14:08

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

business-ops

Calendar

ndcccccc
日历管理与日程安排。创建事件、管理会议,并实现多日历平台同步。
★ 7 📥 23,330
design-media

NanoBanana电商图片生成提示词工程

zhongkedy-del
NanoBanana电商图片生成提示词工程
★ 1 📥 254
business-ops

Trello

steipete
使用 Trello REST API 管理看板、列表和卡片
★ 162 📥 41,418