Skip to main content

🔔 Webhook Processing

📖 Overview

The Webhook module handles outgoing webhook notifications with retry logic and delivery tracking.

Environment Flag: QM_WEBHOOK=true

Source Location: queue-manager/crons/webhook/

🗄️ Collections Used

webhook-notification

  • Operations: Read/Update
  • Model: shared/models/webhook-notification.js
  • Usage: Webhook delivery queue and status

webhook-endpoint

  • Operations: Read
  • Model: shared/models/webhook-endpoint.js
  • Usage: Customer webhook endpoint configurations

🔧 Job: Webhook Notification

Cron Schedule: Every 30 seconds

Key Features

  • Event Notifications: Delivers webhooks for system events
  • Retry Logic: Exponential backoff for failed deliveries
  • Signature Verification: Signs webhooks with HMAC
  • Delivery Tracking: Records delivery attempts and results
  • Rate Limiting: Respects endpoint rate limits
  • Timeout Handling: Configurable request timeouts

Supported Events

  • Deal created/updated
  • Contact created/updated
  • Subscription changed
  • Invoice paid
  • Report generated
  • Lead captured
  • Campaign status change

Delivery Process

  1. Query pending webhook notifications
  2. Load endpoint configuration
  3. Build webhook payload
  4. Sign with HMAC secret
  5. POST to customer endpoint
  6. Record delivery result
  7. Schedule retry if failed

Retry Strategy

  • Max Attempts: 5 retries
  • Backoff: Exponential (1m, 5m, 30m, 2h, 12h)
  • Success Codes: 200-299
  • Failure Handling: Mark failed after max attempts

Module Status: Active
Execution Pattern: High-frequency polling
Last Updated: 2025-10-10

💬

Documentation Assistant

Ask me anything about the docs

Hi! I'm your documentation assistant. Ask me anything about the docs!

I can help you with:
- Code examples
- Configuration details
- Troubleshooting
- Best practices

Try asking: How do I configure the API?
09:31 AM