All Documentation

Webhooks

Real-time event notifications

2 min read

Webhooks

Webhooks allow you to receive real-time notifications when events occur in SmartWMS.

How Webhooks Work

  • You register a webhook URL
  • When an event occurs, SmartWMS sends HTTP POST
  • Your server processes the event
  • Return 200 to acknowledge receipt

Creating a Webhook

  • Go to Configuration → Webhooks
  • Click + New Webhook
  • Enter:
- URL: Your endpoint - Events: Which events to receive - Secret: For signature verification

Webhook Events

EventTrigger
order.createdNew order created
order.updatedOrder modified
order.shippedOrder shipped
order.cancelledOrder cancelled
inventory.adjustedStock adjusted
inventory.lowBelow minimum level
product.createdNew product added
product.updatedProduct modified
receiving.completedReceipt finished
shipment.createdShipment generated

Webhook Payload

Example payload:

{
  "id": "evt_123456",
  "type": "order.shipped",
  "timestamp": "2024-01-15T10:30:00Z",
  "data": {
    "orderId": "ord_789",
    "orderNumber": "SO-2024-001",
    "status": "shipped",
    "trackingNumber": "1Z999AA10123456784",
    "carrier": "UPS"
  }
}

Signature Verification

Verify webhooks are from SmartWMS:

const crypto = require('crypto');

function verifyWebhook(payload, signature, secret) { const expected = crypto .createHmac('sha256', secret) .update(payload) .digest('hex');

return crypto.timingSafeEqual( Buffer.from(signature), Buffer.from(expected) ); }

Signature is in X-SmartWMS-Signature header.

Retry Policy

If your endpoint fails:

AttemptDelay
1Immediate
21 minute
35 minutes
430 minutes
52 hours
After 5 failures, webhook is disabled.

Testing Webhooks

Use the test feature:

  • Open webhook
  • Click Send Test
  • View delivery result
  • Check your server logs

Best Practices

Respond quickly:
  • Return 200 immediately
  • Process asynchronously
  • Don't do heavy work in handler
Handle duplicates:
  • Use event ID for idempotency
  • Store processed event IDs
  • Skip if already processed
Monitor failures:
  • Alert on repeated failures
  • Check webhook logs
  • Verify endpoint health

Need help?

Can't find what you're looking for? Our support team is here to help.

Contact Support →