shipment-tracking

Give customers live package tracking by aggregating carrier status updates via webhooks and sending proactive delivery notifications

11 stars

Best use case

shipment-tracking is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Give customers live package tracking by aggregating carrier status updates via webhooks and sending proactive delivery notifications

Teams using shipment-tracking should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/shipment-tracking/SKILL.md --create-dirs "https://raw.githubusercontent.com/finsilabs/awesome-ecommerce-skills/main/skills/fulfillment-shipping/shipment-tracking/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/shipment-tracking/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How shipment-tracking Compares

Feature / Agentshipment-trackingStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Give customers live package tracking by aggregating carrier status updates via webhooks and sending proactive delivery notifications

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Shipment Tracking

## Overview

Shipment tracking lets customers follow their package from warehouse to doorstep, and proactively notifies them at key milestones (shipped, out for delivery, delivered). Most platforms send tracking emails automatically when a label is created — but a branded tracking page and proactive exception alerts (lost packages, failed delivery) require a dedicated tracking app or service.

## When to Use This Skill

- When customers need real-time package tracking on their order detail pages
- When building post-purchase notifications (email/SMS) triggered by shipping milestone events
- When you need to detect delivery exceptions (lost packages, failed delivery attempts) and trigger customer service alerts
- When aggregating tracking data across multiple carriers (UPS, FedEx, USPS, DHL) into a single interface
- When integrating with a carrier aggregator like EasyPost or Shippo for unified tracking webhooks

## Core Instructions

### Step 1: Determine your platform and choose the right tracking tool

| Platform | Recommended Tool | Why |
|----------|-----------------|-----|
| **Shopify** | AfterShip or Route | AfterShip provides a branded tracking page, proactive email/SMS notifications, and exception alerts across all carriers |
| **WooCommerce** | AfterShip for WooCommerce or Shipment Tracking by WooCommerce | AfterShip integrates with all major carriers; the official WooCommerce extension handles basic carrier tracking |
| **BigCommerce** | AfterShip (BigCommerce App Marketplace) or ShipStation tracking | AfterShip has a native BigCommerce integration; ShipStation also provides tracking if you use it for label creation |
| **Custom / Headless** | EasyPost Tracker API or Shippo tracking webhooks | EasyPost and Shippo normalize tracking events across all carriers into a single webhook feed |

### Step 2: Set up carrier tracking notifications

#### Shopify

**Shopify's built-in tracking (no extra app needed for basics):**
1. When you fulfill an order and add a tracking number, Shopify automatically sends the customer a "Your order is on its way" email with the tracking link
2. The tracking link goes to the carrier's website (e.g., ups.com for UPS) — it's functional but not branded
3. Customers can check their order status at `yourstore.com/orders/[order-id]`

**AfterShip (recommended for branded tracking + proactive notifications):**
1. Install AfterShip from the Shopify App Store (free plan available)
2. AfterShip automatically detects new fulfillments in Shopify and begins tracking the package
3. In AfterShip → Notifications, configure email and SMS notifications at each milestone:
   - "In transit" — when the package leaves your facility
   - "Out for delivery" — day of delivery
   - "Delivered" — confirmation
   - "Exception" — failed delivery attempt or package delay
4. Customize the tracking page at AfterShip → Tracking Page with your logo, colors, and product recommendations
5. AfterShip's branded tracking page is hosted at `yourstore.aftership.com` or you can embed it on your own domain

**For Shopify Plus:** Use Klaviyo to trigger shipping notification emails based on AfterShip tracking events via Klaviyo's AfterShip integration — this gives you full control over the email design and content.

#### WooCommerce

**Using WooCommerce Shipment Tracking (official extension):**
1. Install from WooCommerce.com (or use the free community version on WordPress.org)
2. When fulfilling an order, enter the tracking number and carrier in WooCommerce → Orders → [Order] → Add Tracking Number
3. WooCommerce sends the customer an updated order email with the tracking link
4. Customers see the tracking link in My Account → Orders

**Using AfterShip for WooCommerce:**
1. Install the AfterShip plugin from WordPress.org
2. AfterShip syncs WooCommerce orders and begins tracking when tracking numbers are added
3. Configure notification emails in AfterShip dashboard → Notifications
4. The branded tracking page works the same as the Shopify version

**ShipStation tracking (if using ShipStation for fulfillment):**
- ShipStation automatically emails customers when a label is created with a tracking link
- Go to ShipStation → Account Settings → Notifications to configure which carrier events trigger emails

#### BigCommerce

1. Install **AfterShip Returns Center** or **AfterShip** from the BigCommerce App Marketplace
2. AfterShip syncs with BigCommerce orders automatically
3. Configure notifications and the branded tracking page in the AfterShip dashboard (same as above)

**BigCommerce's built-in tracking:**
- BigCommerce automatically sends shipping confirmation emails with tracking links when an order is marked as "Shipped" with a tracking number
- Go to **Store Setup → Email Templates → Shipped Email** to customize the email content

### Step 3: Handle tracking exceptions

Delivery exceptions (lost packages, failed delivery attempts) need fast resolution to protect customer satisfaction.

#### Setting up exception alerts

**AfterShip:**
1. Go to AfterShip → Notifications → Exceptions
2. Enable email alerts to your team for these exception types:
   - "Exception" — carrier-reported issue
   - "Failed Attempt" — delivery attempt failed, needs rescheduling
   - "Returned to Sender" — package coming back
3. AfterShip can trigger Slack or email alerts to your ops team alongside the customer notification

**Shopify Flow (Plus):**
```
Trigger: AfterShip tracking event received
Condition: Status is "Exception" or "Failed Attempt"
Action: Create customer service task in Gorgias or Zendesk
Action: Send internal Slack notification to #shipping-exceptions
```

#### Responding to exceptions

When AfterShip or your tracking tool flags an exception:
1. Check the carrier's native tracking portal for the most current status
2. For lost packages: file a claim with the carrier (UPS, FedEx, USPS all have online claims portals)
3. For failed delivery: contact the customer to update their delivery address or arrange pickup
4. For returned packages: coordinate with the customer on re-shipping vs. refund

### Step 4: Add a branded tracking page to your store

A branded tracking page keeps customers on your site (vs. carrier sites), allows product recommendations, and reduces "where is my order" contacts.

**AfterShip** generates this automatically at `yourstore.aftership.com`. To put it on your own domain:

1. In AfterShip → Tracking Page → Custom Domain, enter your subdomain (e.g., `tracking.yourstore.com`)
2. Add a CNAME DNS record pointing `tracking.yourstore.com` to AfterShip's servers
3. Update your shipping confirmation email to link to `tracking.yourstore.com/[tracking-number]` instead of the carrier URL

**Embed tracking in your existing order status page:**
- For Shopify: AfterShip has a theme app extension that embeds the tracking widget directly in the Shopify order status page
- For WooCommerce: the AfterShip plugin adds a tracking section to the WooCommerce "My Account → Orders" page automatically

### Step 5: Custom / Headless — webhook-based tracking

For headless implementations, use EasyPost or Shippo to receive carrier webhooks and normalize tracking events:

```typescript
// Register a tracking number with EasyPost to receive webhook updates
async function registerEasyPostTracker(params: {
  trackingNumber: string;
  carrier: string; // 'UPS', 'FedEx', 'USPS', 'DHL'
  orderId: string;
}): Promise<void> {
  const response = await fetch('https://api.easypost.com/v2/trackers', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.EASYPOST_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      tracker: {
        tracking_code: params.trackingNumber,
        carrier: params.carrier,
      },
    }),
  });
  const tracker = await response.json();
  // Store tracker.id to correlate future webhook events with this order
  await db.shipments.update({ tracking_number: params.trackingNumber }, {
    easypost_tracker_id: tracker.id,
  });
}

// Receive EasyPost webhook and update order status
// POST /webhooks/easypost
async function handleEasyPostWebhook(rawBody: Buffer, signature: string): Promise<void> {
  // Verify webhook signature
  const expectedSig = crypto
    .createHmac('sha256', process.env.EASYPOST_WEBHOOK_SECRET!)
    .update(rawBody)
    .digest('hex');
  if (expectedSig !== signature) throw new Error('Invalid webhook signature');

  const event = JSON.parse(rawBody.toString());
  if (event.description !== 'tracker.updated') return;

  const tracker = event.result;
  const shipment = await db.shipments.findByEasyPostTrackerId(tracker.id);
  if (!shipment) return;

  // Normalize EasyPost status to your internal status
  const statusMap: Record<string, string> = {
    pre_transit: 'label_created',
    in_transit: 'in_transit',
    out_for_delivery: 'out_for_delivery',
    delivered: 'delivered',
    failure: 'exception',
    return_to_sender: 'returned',
  };
  const normalizedStatus = statusMap[tracker.status] ?? 'in_transit';

  await db.shipments.update(shipment.id, { status: normalizedStatus });

  // Update order to delivered when package arrives
  if (normalizedStatus === 'delivered') {
    await db.orders.update(shipment.order_id, { status: 'delivered', delivered_at: new Date() });
  }

  // Send notification email at key milestones
  if (['in_transit', 'out_for_delivery', 'delivered', 'exception'].includes(normalizedStatus)) {
    await sendTrackingNotificationEmail(shipment.order_id, normalizedStatus, tracker.tracking_code);
  }
}
```

## Best Practices

- **Use webhooks over polling** — carrier webhooks deliver updates in near-real-time; polling every few hours misses same-day events like "out for delivery" and "delivered"
- **Send proactive notifications for exceptions** — a delay or failed delivery email from you, before the customer notices, transforms a bad situation into a positive brand moment
- **Show estimated delivery date from day one** — AfterShip and most carriers provide an EDD when the label is first scanned; display it on the tracking page and order confirmation email immediately
- **Alert your ops team on exceptions, not just customers** — create an internal Slack/email alert for every exception event so your team can proactively resolve issues
- **Deduplicate notification emails** — carriers sometimes send duplicate events; ensure your tracking app or custom webhook handler deduplicates based on event type per shipment

## Common Pitfalls

| Problem | Solution |
|---------|----------|
| Customer doesn't receive shipping confirmation | Check that Shopify/WooCommerce shipping notification emails are enabled and that the customer's email address was captured at checkout |
| Tracking page shows "no information available" for days | This is normal for USPS for 24–48 hours after label creation; set customer expectations in the shipping confirmation email |
| Exception events not triggering alerts | Verify your AfterShip notification settings include exception types; test by using a test tracking number that simulates an exception event |
| International tracking stops updating mid-journey | International handoffs between carriers often cause gaps; log the carrier's native tracking URL and fall back to it when events stop for 48+ hours |

## Related Skills

- @order-fulfillment-workflow
- @returns-management
- @international-shipping
- @order-management-system
- @same-day-delivery

Related Skills

influencer-tracking

11
from finsilabs/awesome-ecommerce-skills

Measure influencer campaign ROI by generating unique UTM links per creator, attributing sales, and reporting revenue against campaign spend

unit-economics-tracking

11
from finsilabs/awesome-ecommerce-skills

Track customer acquisition cost, lifetime value, payback period, and contribution margin by cohort and channel with profitability benchmarks and trend analysis

inventory-tracking

11
from finsilabs/awesome-ecommerce-skills

Track stock levels in real time across your platform with inventory reservation to prevent overselling and support for backorders

cogs-tracking-allocation

11
from finsilabs/awesome-ecommerce-skills

Track cost of goods sold and landed costs using your platform's built-in tools or accounting integrations to compute accurate gross margin per order

wishlist-save-for-later

11
from finsilabs/awesome-ecommerce-skills

Let shoppers save products to a wishlist, share it with friends, and get notified when saved items come back in stock or drop in price

storefront-theming

11
from finsilabs/awesome-ecommerce-skills

Build a themeable storefront with design tokens and CSS custom properties that supports white-labeling, multi-brand variants, and dark mode

search-autocomplete

11
from finsilabs/awesome-ecommerce-skills

Speed up product discovery with instant search suggestions, fuzzy typo matching, and category-aware results powered by Algolia or Elasticsearch

responsive-storefront

11
from finsilabs/awesome-ecommerce-skills

Build a mobile-first storefront with thumb-friendly navigation, sticky add-to-cart buttons, and touch-optimized components for high mobile conversion

recently-viewed-products

11
from finsilabs/awesome-ecommerce-skills

Show shoppers the products they recently browsed using browser storage so they can easily pick up where they left off on your store

quick-view-modal

11
from finsilabs/awesome-ecommerce-skills

Let shoppers preview product details and add items to cart from the listing page without navigating away, reducing friction in the shopping flow

product-page-design

11
from finsilabs/awesome-ecommerce-skills

Design high-converting product detail pages with image galleries, variant selectors, social proof, and clear calls-to-action that drive add-to-cart

product-comparison

11
from finsilabs/awesome-ecommerce-skills

Let shoppers select multiple products and compare them side-by-side in a table with highlighted differences to help them make the right buying decision