Skip to content

Integrations

  Table of Contents

Factorial integrations exchange data with external systems through the API and a pollable event stream. The event stream is designed for integrations that need to recover missed work, preserve event order, or process many changes together.

Immediate Outbound Requests

Plugin hooks can send an HTTP request when a configured lifecycle event occurs. Use a hook for an immediate side effect, such as notifying another service. Use the pollable event stream when the integration requires a complete, ordered, and recoverable record of changes.

Polling for Events

Factorial does not provide a conventional webhook event feed. Instead, an integration asks the event API for changes that occurred after its last processed event.

Polling makes delivery state explicit. An integration can retry after a failure, request events in batches, and resume without depending on a one-time webhook delivery. This is especially useful when a manufacturing operation produces many inventory or execution updates in a short period.

The event API is intended to be polled regularly, but rate limits still apply to excessive requests.

Sequence IDs and Cursors

Each event has a sequence ID. An integration stores the sequence ID of the last event it processed successfully and uses it as the cursor for its next request.

Process events in sequence and advance the stored cursor only after the corresponding external updates succeed. If processing fails, retry from the previous cursor. This prevents an integration from silently skipping events.