Skip to main content
The Batch node collects events that arrive at the same point in a journey and releases them together as one aggregated payload. Use it to turn a burst of activity into a single notification, for example “Your post received 17 likes”, instead of many. The first event into a batch owns the run and continues downstream when the batch releases. Later contributing events terminate at the Batch node, so the nodes after a batch run only once per batch.

When a batch releases

A batch releases as soon as any one of these is true:
  • Max items collected (max_items, default 100, up to 1000).
  • Wait period elapses with no new contributing event (a quiet, inactivity window).
  • Max wait period ceiling is reached, measured from the first event into the batch.
The wait period is between 1 minute and 1 day. The max wait period is at least the wait period and at most 7 days. The quiet window releases an idle batch early. The max wait period is the hard ceiling that always releases it.

Configuration

Journey batches are scoped per user (scope: user), so events are grouped by the recipient.

Batch payload

When the batch releases, downstream nodes receive a batch object with the total count and the retained items:
How you reference it depends on where: Template text resolves variables from data, so it leaves the root off. A loop’s expression runs against data, profile, and refs together, so it names data explicitly.

Categories

Set a category key to count and list events by a field’s value, for a digest such as “3 likes and 2 comments”. The batch still releases once, and the groups appear under batch.categories, keyed by each value:
batch.count and batch.items always cover the whole batch. An event with no value at the category key counts in those totals but in no category, and categories is left out when no event had a value. retain is shared across categories. A count of 3 keeps 3 events for the whole batch, not 3 per category, so a category’s items can hold fewer events than its count, as comment does above.

Via the API

In a journey definition, a Batch node uses type: "batch":
category_key must be one whole reference. A literal such as "data.category", or a reference inside other text, fails with category_key must be a reference like "{{data.category}}". See for the full node reference. Durations use ISO 8601 (for example, PT1H for one hour, P1D for one day).