wulf-pulse/docs
root 1f83456199 feat: add webhook support for real-time Autotask updates
Implements comprehensive webhook infrastructure to receive and process
real-time entity updates from Autotask, reducing API calls and improving
data freshness.

Features:
- Webhook receiver endpoint: POST /api/webhooks/autotask
- Automatic entity mapping and upsert to PostgreSQL
- Event logging and tracking in webhook_logs table
- Duplicate event prevention via unique event_id
- Failed event tracking with error messages
- Statistics and monitoring APIs
- Support for 8 entity types: Companies, Tickets, Tasks, Projects,
  Time Entries, Contacts, Contracts, Configuration Items

Architecture:
- WebhookService: Core processing logic
- Database tables: webhook_logs, webhook_configs
- API endpoints: /autotask (receiver), /logs, /stats
- Automatic data mapping using existing entity-mapper

Benefits:
- Near real-time updates (<1 minute vs 24 hours)
- Reduced API usage (webhooks vs polling)
- Complements daily incremental sync for redundancy
- Automatic recovery from webhook failures

Files Added:
- lib/types/webhook.ts - TypeScript types and interfaces
- lib/services/webhook-service.ts - Webhook processing service
- app/api/webhooks/autotask/route.ts - Webhook receiver
- app/api/webhooks/logs/route.ts - Logs API
- app/api/webhooks/stats/route.ts - Statistics API
- migrations/004_webhook_support.sql - Database schema
- docs/WEBHOOK_SETUP.md - Complete setup guide (47 sections)
- docs/WEBHOOKS_README.md - Quick start guide

Next Steps:
1. Run database migration
2. Configure webhooks in Autotask
3. Test endpoint and monitor logs

See docs/WEBHOOK_SETUP.md for detailed setup instructions.
2026-01-24 10:07:20 -05:00
..
fixes Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
addigy-mapping-implementation.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
AUVIK_TENANT_MAPPING.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
AUVIK_TESTING_GUIDE.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
CHUNKED_SYNC_IMPLEMENTATION.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
configuration-item-goals.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
datto-rmm-device-example.json Add Datto RMM device API documentation 2025-12-04 23:16:01 -05:00
datto-rmm-device-schema.json Add Datto RMM device API documentation 2025-12-04 23:16:01 -05:00
DATTO_RMM_DEVICE_API.md Add Datto RMM device API documentation 2025-12-04 23:16:01 -05:00
rmm-multi-site-integration.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
SYNC_BEHAVIOR.md docs: add comprehensive sync behavior documentation 2026-01-24 08:43:35 -05:00
SYNC_DATE_FILTER_FIX.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
SYNC_INTERFACE_GUIDE.md docs: add comprehensive sync interface user guide 2026-01-23 08:32:11 -05:00
SYNC_LOGGING_IMPROVEMENTS.md feat: implement structured logging for sync operations 2026-01-23 08:02:02 -05:00
SYNC_PROGRESS_TRACKING.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
TICKET_SYNC_FIX.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
TIME_ENTRIES_ANALYTICS_IMPLEMENTATION.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
TIME_ENTRIES_ENRICHMENT.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
TIME_ENTRIES_FIX.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
TIME_ENTRIES_SORTING_FIX.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
TIME_ENTRY_FIELD_MAPPING.md Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
WEBHOOK_SETUP.md feat: add webhook support for real-time Autotask updates 2026-01-24 10:07:20 -05:00
WEBHOOKS_README.md feat: add webhook support for real-time Autotask updates 2026-01-24 10:07:20 -05:00