Alert Webhook
The alert.sent event is triggered when an alert is processed and sent to the configured recipients.
Alerts are processed in batches of 1,000 customers. If an alert affects more than 1,000 customers, additional webhook events will be sent for each batch. Each payload includes batch metadata so you can track progress.
Example Payload
{
"event": "alert.sent",
"timestamp": "2025-12-22T11:27:57.999Z",
"data": {
"date": "2025-12-31",
"previous_date": "2025-12-30",
"alert": {
"name": "Test Alert - High Risk Customers",
"description": "Alert triggered when customers score below 40",
"emails": ["test@example.com"],
"alert_condition": {
"type": "treshold",
"filter_by_type": "scoring",
"filter_by": "engagementscore",
"operator": "lt",
"value": "40"
},
"segment": {
"name": "Enterprise Customers"
}
},
"customers": [
{
"name": "Acme Corp",
"external_id": "acme-001",
"current_value": 35,
"previous_value": 45,
"difference_abs": -10,
"difference_pct": -0.22
},
{
"name": "Beta Industries",
"external_id": "beta-002",
"current_value": 28,
"previous_value": 42,
"difference_abs": -14,
"difference_pct": -0.33
}
],
"batch": {
"current_batch": 1,
"total_batches": 1,
"total_customers": 2,
"batch_size": 2
}
}
}