Prompt

How do I send tracking updates to customers from shipping webhooks?

Logistics & Supply Chain / Freight & Shipping1 observationLast seen Nov 4, 2026

Latest observation

Nov 4, 2026OpenAI APIWeb search: off

To send tracking updates from shipping webhooks, the basic flow is:

  1. Receive webhook events from your shipping carrier/platform
  2. Parse the event payload
  3. Map the event to a customer-facing status
  4. Store/update shipment tracking in your database
  5. Notify the customer by email/SMS/push/in-app message
  6. Deduplicate events so customers don’t get spammed

Typical webhook events to handle

Depending on the carrier or shipping API, you may get events like:

  • shipment.created
  • shipment.picked_up
  • in_transit
  • out_for_delivery
  • delivered
  • exception
  • delay
  • return_to_sender

Recommended implementation

1) Create a webhook endpoint

Your server should expose an HTTPS endpoint, for example:

POST /webhooks/shipping

The carrier sends tracking updates to this endpoint.

2) Verify the webhook

Before using the payload, verify it came from the shipping provider:

  • HMAC signature header
  • webhook secret
  • timestamp checks
  • source IP checks if supported

This prevents fake updates.

3) Extract shipment and status information

A webhook payload might look like:

{
  "tracking_number": "1Z999AA10123456784",
  "status": "in_transit",
  "event_time": "2026-11-04T12:34:56Z",
  "carrier": "UPS",
  "location": "Chicago, IL"
}

4) Update your shipment record

Use the tracking number or shipment ID to find the order in your database and update fields like:

  • current_status
  • last_event_time
  • last_location
  • delivery_estimate
  • carrier_event_id

5) Send the customer notification

Once the shipment status changes, trigger your notification system:

  • Email: “Your package is out for delivery”
  • SMS: “Your order has been delivered”
  • Push notification: “Delay detected for your shipment”

6) Avoid duplicate notifications

Carriers often resend webhooks or send multiple events with the same status. Store the event ID or hash of:

  • tracking number
  • status
  • event timestamp

Only notify if the event is new.


Example logic

Pseudo-flow:

def shipping_webhook(request):
    verify_signature(request)

    event = request.json
    tracking = event["tracking_number"]
    status = event["status"]
    event_id = event.get("event_id")

    if already_processed(event_id):
        return 200

    shipment = find_shipment_by_tracking(tracking)
    if not shipment:
        return 404

    shipment.status = status
    shipment.last_event_time = event["event_time"]
    save(shipment)

    if status_changed_to_customer_notifyable(status):
        send_customer_notification(shipment.customer_id, status)

    mark_processed(event_id)
    return 200

Good customer notification rules

Not every webhook should trigger a message. Usually notify on:

  • picked up
  • out for delivery
  • delivered
  • delayed / exception
  • failed delivery attempt

Avoid notifying on every minor scan unless you want very granular updates.


Best practices

  • Idempotency: handle duplicate webhook deliveries safely
  • Queue notifications: send emails/SMS asynchronously, not inside the webhook request
  • Fallback polling: if webhooks fail, periodically poll carrier tracking APIs
  • Timezone normalization: store all timestamps in UTC
  • Customer preferences: let users choose email vs SMS vs push
  • Rate limiting: avoid too many notifications for frequent scans

Example architecture

Shipping provider webhook → Webhook handler → Database update → Message queue → Notification service → Customer

This is better than sending notifications directly from the webhook handler, because it’s more reliable and scalable.


If you want, I can also give you:

  • a Node.js/Express example
  • a Python/FastAPI example
  • a database schema for tracking events
  • or a full end-to-end architecture diagram

Brands

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.