Skip to content

Webhook

Overview

The Webhook domain in comby is designed to manage webhooks, enabling systems to notify external services of events or changes in real time. Webhooks are a critical part of integration workflows, providing a mechanism for external systems to react to specific events by consuming data through HTTP endpoints. The Webhook aggregate models the configuration and state of a webhook, ensuring consistency and traceability through event sourcing.

Structure

The Webhook aggregate extends the BaseAggregate, leveraging comby's core capabilities to manage state, track changes, and persist events. The aggregate defines fields that represent the attributes of a webhook:

  • References: Reserved for potential relationships with other entities (not explicitly included in the default implementation).

  • Value Objects:

    • Active: A boolean indicating whether the webhook is active and capable of sending notifications.
    • EventDataName: The name of the event data that the webhook is configured to process.
    • EventDataType: The type of the event data, defining the structure or format of the payload.
    • WebhookUrl: The HTTP endpoint to which the webhook sends its notifications.

This structure allows the Webhook aggregate to model the configuration and status of webhooks effectively, ensuring compatibility with a wide range of integration scenarios.