How notifications are organized
Delivery history is organized in four layers:- Webhook destination. The URL Metronome sends notification delivery attempts to. In the API, this is
webhook_id. - Notification configuration. The rule that defines when a notification is triggered, for example, “Commit balance reaches $5”. For threshold alerts, the notification ID in the API is
alert_id. System notifications do not have an ID since the rule is not configurable. - Triggered notification. A single instance when a notification triggers, for example, Customer A’s balance reaches $5. Customer B can trigger the same notification configuration at a separate time, which will result in a separate triggered notification. The triggered notification’s
idis theidfield in the webhook payload Metronome sends. That ID stays the same on every delivery attempt for that firing. - Delivery attempt. One HTTP request to the webhook destination for that triggered notification. If the first attempt fails, Metronome retries, and each retry is another delivery attempt for the same triggered notification.
Review deliveries in the app
Metronome allows you to view the status of all webhook delivery attempts directly in the Metronome app. Go to Developer > Notifications > Webhooks and click into the specific webhook destination that you’d like to view all delivery attempts for. Filter by errors, customer, alert type, and more to build a deeper understanding of the system health of your Metronome webhook integration.List triggered notifications
List triggered notifications by webhook returns each triggered notification Metronome attempted to send to one webhook destination, with a summary of its delivery attempts. This can be used to understand the history of all triggered notifications for a specific webhook destination. Results are ordered byfirst_attempted_at descending. Each row is one triggered notification sent to that destination and includes:
idof the triggered notification. This is theidin the webhook payload, and it stays the same across delivery attempts.webhook_id, the webhook destinationcustomer_id, which can be null for notifications that are not customer-specificnotification_id, the notification configuration. Null for system notifications, which have no configuration.notification_type, this isalert_typefor threshold notifications andpolicy.typefor system and offset notifications.first_attempted_atandlast_attempted_atlast_response_status_code, from the latest delivery attemptnum_attempts, the latest number of delivery attempts for this triggered notification on this destination
Get a triggered notification and its attempts
Programmatically analyze a specific triggered notification further and understand the history of delivery attempts for that notification by using the API endpoint to get triggered notification and delivery attempts. This returns the full payload of the notification as well as a timeline of delivery attempts to a specific webhook destination for that triggered notification.Debug a failed delivery
- Call list triggered notifications with the webhook destination, the time window, and filters for the customer or notification type you expect.
- Find triggered notifications whose latest delivery attempt has a
last_response_status_codeoutside 200–299, or whosenum_attemptsis greater than 1. - Call get triggered notification and delivery attempts with that triggered notification’s
idto read the payload and each delivery attempt’s timestamp and status code.