Webhooks

An introduction to webhooks

Webhooks allow applications to communicate with one other automatically when an event occurs, instead of relying on periodic queries.

For example if you run an ecommerce site using PayPal, your accounting system may be updated when a customer pays you. In this simple scenario a webhook on the accounting system (the receiver) is receiving data from PayPal (the sender) based on the creation of a new transaction in your account (the trigger). This direct integration requires that your accounting system and PayPal come with a built-in integration capability that meets your needs, or that you build one yourself. Introducing Connect increases the ease of implementation, flexibility and customization of your integrations.

Webhook components in your Connect system

Connect comes with a range of components. These are building blocks that enable you to create integrations between a wide range of services. There two main types of are components:

  • A connector is a specialised component designed specifically for sending and retrieving data from a specific third party service.

  • Generic components such as Webhooks and Mappers are used to action data flowing betweem two connectors, and to send a retrieve data from services that do not have a bespoke connector.

Working with webhooks in your Connect

Webhooks are just one part of an entire flow. To achieve the intended goal we must consider Webhook components, Webhook services and how these work inside an integration flow.

  • The Webhook component is a component that allows the flow to receive data from external triggers. You can use the Webhook component as the initial trigger of the flow, or in the middle, as an intermediate step.

  • Webhook Service is a microservice that handles Webhook components work within the flows. It takes the requests and assigns them by ID to their corresponding flows. The Webhook Service sends the requests into a queue, where they are processed and delivered to the flows.

Webhook flows

A Webhook integration flow is a flow that uses a Webhook component as a trigger. It means that the actions get started by an external input to the Webhook URL.

The following diagram shows how Connect uses Webhooks for integration flows:

Webhook scheme
  • An external HTTP request in JSON or XML format, a list of properties, or a file reaches a Webhook component’s URL exposed by a Webhook Service.

  • The Webhook Service differentiates the requests by flow ID, and sends them to the platform for queueing.

  • The queue of requests is then processed and sent to the corresponding Webhook flows.

  • As a running flow gets its request, it initiates the execution of steps.

Webhook components can be secured with credentials to avoid unwanted activity. See the link below for further information about credentials.