Webhooks
Purpose:
Real-time event notification system enabling external system integration and automated business process triggering.
Description:
The webhook system provides real-time notifications for critical business events, enabling external systems to respond immediately to changes in quotes, contracts, and sales opportunities. It supports reliable delivery mechanisms, retry logic, and event filtering to ensure partners receive relevant notifications without overwhelming their systems.
Event Notification Features:
- Real-time event streaming with guaranteed delivery
- Configurable retry policies for failed deliveries
- Event filtering and subscription management
- Comprehensive event logging and monitoring
- Security features including payload signing and verification
Business Value:
Enables real-time business process integration, reduces system polling overhead, improves customer experience through immediate responses, and supports event-driven architecture patterns for scalable system design.
POST /webhooks/quote-status
Purpose:
Receives real-time quote status updates with automated processing triggers and comprehensive event data delivery.
Endpoint Explanation:
This webhook endpoint delivers immediate notifications when quote statuses change, enabling partners to respond in real-time to quote approvals, rejections, expirations, or modifications. The system provides comprehensive event data including quote details, status transition information, and customer context while maintaining delivery guarantees through retry mechanisms and delivery confirmation tracking.
- Request Payload (JSON)
{
"event_type": "quote.status_changed",
"quote_id": "QUOTE_123456789",
"quote_ref_code": "RefQuote00001",
"status": "approved",
"previous_status": "pending",
"timestamp": "2024-03-01T15:30:45Z",
"customer_id": "CUST_789456",
"product": {
"product_id": "DPI-AMS-a69ed45ffdc840acc2f8896ebc5130da169866d1993c1fd6aef819db4b06cc70",
"product_name": "device-protection-insurance",
"price_with_taxes": "150.00",
"currency": "EUR"
},
"expiry_date": "2024-03-08T15:30:45Z",
"signature": "sha256=quote_webhook_signature_hash_here",
"metadata": {
"partner_id": "PARTNER_001",
"market": "PT",
"channel": "web"
}
}
- Response Payload (JSON)
{
"received": true,
"processed_at": "2024-03-01T15:30:47Z",
"webhook_id": "WH_QUOTE_123456",
"actions_triggered": [
"customer_notification_sent",
"sales_opportunity_updated",
"pricing_locked"
]
}
POST /webhooks/contract-status
Purpose:
Handles contract status changes with downstream system notifications and comprehensive lifecycle event tracking.
Endpoint Explanation:
This webhook endpoint processes contract lifecycle notifications including activation, suspension, renewal, and termination events. The system delivers detailed contract information, status change context, and related business data while coordinating with downstream systems for appropriate business process execution and customer communication.
- Request Payload (JSON)
{
"event_type": "contract.status_changed",
"contract_id": "BR_de3aa01ac5784c25bc881244606bf8b7",
"contract_number": "58745487",
"status": "activated",
"previous_status": "in_progress",
"timestamp": "2024-03-01T16:15:30Z",
"customer_id": "CUST_789456",
"product": {
"product_name": "Premium Device Protection",
"product_id": "PROD-DEV-001",
"policy_id": "POL_789456123"
},
"lifecycle_stage": "active",
"effective_date": "2024-03-01T00:00:00Z",
"expiry_date": "2025-03-01T23:59:59Z",
"signature": "sha256=contract_webhook_signature_hash_here",
"metadata": {
"partner_id": "PARTNER_001",
"market": "PT",
"activation_trigger": "payment_confirmed"
}
}
- Response Payload (JSON)
{
"received": true,
"processed_at": "2024-03-01T16:15:32Z",
"webhook_id": "WH_CONTRACT_123456",
"actions_triggered": [
"policy_documents_generated",
"customer_welcome_email_sent",
"service_activation_initiated",
"billing_cycle_started"
]
}
POST /webhooks/sales-opportunity
Purpose:
Processes sales opportunity updates with CRM integration and comprehensive pipeline analytics support.
Endpoint Explanation:
This webhook endpoint delivers sales opportunity lifecycle notifications including creation, qualification, conversion, and closure events. The system provides detailed opportunity information, pipeline progression data, and performance metrics while supporting CRM integration and sales analytics workflows for comprehensive sales operations management.
- Request Payload (JSON)
{
"event_type": "sales_opportunity.status_changed",
"sales_id": "SALES_123456789",
"opportunity_status": "converted",
"previous_status": "qualified",
"timestamp": "2024-03-01T17:45:15Z",
"customer_id": "CUST_789456",
"quote_ref_code": "RefQuote00001",
"conversion_details": {
"contract_id": "BR_de3aa01ac5784c25bc881244606bf8b7",
"conversion_value": 150.0,
"currency": "EUR",
"conversion_channel": "web_portal"
},
"pipeline_stage": "closed_won",
"sales_agent": "AGT_123456",
"signature": "sha256=sales_webhook_signature_hash_here",
"metadata": {
"partner_id": "PARTNER_001",
"campaign_source": "spring_sale_2024",
"conversion_time_days": 3
}
}
- Response Payload (JSON)
{
"received": true,
"processed_at": "2024-03-01T17:45:17Z",
"webhook_id": "WH_SALES_123456",
"actions_triggered": [
"crm_opportunity_updated",
"commission_calculated",
"performance_metrics_updated",
"follow_up_sequence_triggered"
]
}