request webhook action). A scenario holds one optional active revision (currently running), any number of inactive revisions (history you can re-activate), and drafts being edited.
Returned by: List All Subscriptions · Import Subscription · Activate / Inactivate Subscription
Example scenario object
Top-level
| Field | Type | Description |
|---|---|---|
_id | string | Unique identifier of the subscription/scenario - use it in the manage endpoints |
activeRevision | object | The currently running version (see Revision fields below), or absent when paused |
inactiveRevisions | object[] | Previous/paused revisions. Re-activate one with Activate Subscription |
drafts | object[] | Draft revisions being edited: same shape as a revision but with status: "draft", no version, and metadata limited to authorUid / created / modified |
system | string | System scenario identifier - present only on built-in scenarios (returned when includeSystem=true) |
Revision fields
The shape ofactiveRevision and each item of inactiveRevisions[].
| Field | Type | Description |
|---|---|---|
_id | string | Unique identifier of this revision |
scenarioId | string | The parent scenario ID |
name | string | Human-readable name. Subscriptions created from our templates start with (SUB) |
description | string | Optional description |
status | string | active or inactive |
version | number | Version number of this revision |
parentVersion | number | Version this revision was based on |
revisionComment | string | Comment explaining the changes in this revision |
triggerEvents | string[] | Internal events that trigger the scenario Example: ["domain.message.created"] |
conditions | object[][] | Condition groups: all conditions inside a group must pass (AND); the scenario fires if any group passes (OR). Each condition: {name, params, confidentialData} |
loaders | object | Data loaders by position: beforeConditions[] / afterConditions[], each {name, alias, params, confidentialData} |
actions | object[] | Actions to execute: {name, params, confidentialData} - e.g. the request webhook action |
loops | object[] | Loop definitions, when iterating: {loop: {input, as, foreachMode...}, position} |
tags | string[] | Free-form tags |
attachedData | object | Free-form data attached when the revision was created |
options.unorderedActions | boolean | true = actions may run in parallel; false = sequentially |
metadata.authorUid | string | User who created this revision |
metadata.created | number | Revision creation time (epoch ms) |
metadata.modified | number | Last draft modification before publishing (epoch ms) |
metadata.activated | number | Most recent activation (epoch ms) |
metadata.activations | object[] | Activation history: {timestamp, userUid} |