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.
Configuration
Journey batches are scoped per user (
scope: user), so events are grouped by the recipient.
Batch payload
When the batch releases, the run’s data gets abatch object, data.batch, with the total count and the retained items:
data. in templates and loops alike:
The template editor may warn that a
data.batch path isn’t an available variable. It still renders, so check the output with a test run.
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 underdata.batch.categories, keyed by each value:
data.batch.count and data.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 usestype: "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}}". Every node’s fields are in the POST /journeys reference. Durations use ISO 8601 (for example, PT1H for one hour, P1D for one day).