Skip to main content

Order Tracking Integration

WebDialogAI can connect to your order/e-commerce system so visitors can ask about order status, tracking numbers, and delivery estimates directly in the chat widget.

How It Works

  1. A visitor asks "Where is my order #12345?"
  2. The AI detects this as an order query and extracts the order number
  3. If the visitor's email is not on the conversation, the AI asks for it
  4. WebDialogAI calls your order API with the email + order number
  5. The AI responds with order details and renders an Order Card in the widget

Setup

  1. Go to Dashboard > Settings > AI Configuration
  2. Scroll to the Order Tracking card
  3. Select External API from the "Order source" dropdown
  4. Configure:
    • Order API URL — your HTTPS endpoint (e.g., https://shop.example.com/api/orders)
    • API Key — Bearer token for authentication
    • Identity Field — which field visitors must provide (Email, Phone, or Order Number only)
    • CTA Button Label — text on the order card button (default: "Track Order")
  5. Click Save changes

API Contract

Your order API must accept GET requests with query parameters:

GET {your-api-url}?email={visitorEmail}&order_number={orderNumber}
Authorization: Bearer {your-api-key}

Expected Response

The recommended response format wraps orders in an "orders" array:

{
"orders": [
{
"orderId": "12345",
"status": "shipped",
"total": "79.99",
"currency": "USD",
"items": [
{ "name": "Blue Widget", "quantity": 2, "price": "39.99" }
],
"shipping": {
"carrier": "FedEx",
"trackingNumber": "7489274892",
"trackingUrl": "https://fedex.com/track/7489274892",
"estimatedDelivery": "2026-03-10"
},
"orderDate": "2026-03-01"
}
]
}

If no matching order is found, return {"orders": []} or HTTP 404.

Flexible Response Parsing

WebDialogAI automatically adapts to common e-commerce API formats. You don't need to build a custom adapter — the following response shapes all work:

FormatExamplePlatforms
{"orders": [...]}Standard wrapperRecommended
{"data": [...]}Stripe-styleStripe, generic APIs
{"order": {...}}Single object wrapperShopify
[{...}]Root arrayWooCommerce
{...}Bare single orderCustom APIs

Field name flexibility — these common field name variations are automatically mapped:

Our fieldAlso accepts
orderIdorder_id, id, number, order_number
orderDateorder_date, created_at, date, createdAt
totaltotal_price, amount, grand_total, order_total
itemsline_items
shipping.trackingNumberTop-level tracking_number or trackingNumber
shipping.carrierTop-level carrier or shipping_carrier
shipping.trackingUrlTop-level tracking_url or trackingUrl
shipping.estimatedDeliveryTop-level estimated_delivery, delivery_date, expected_delivery

Unknown fields are silently ignored — your API can include additional fields without issues.

Testing

Use the Test button in the Order Tracking settings section. Enter a sample order number and email to verify your API returns data correctly. The test results will display as order card previews.

Security

  • Only HTTPS URLs are accepted for the order API endpoint
  • Visitor email and order number are URL-encoded before being sent to your API
  • API keys are never exposed in API responses (write-only)
  • Both email and order number are required for lookup (multi-factor match)

What Visitors See

When an order is found, the AI provides a text summary and renders an interactive Order Card:

  • Order ID and status badge (color-coded)
  • Item list with quantities and prices
  • Total amount
  • Carrier name and tracking number
  • Estimated delivery date
  • Clickable Track Order button linking to the carrier's tracking page