> ## Documentation Index
> Fetch the complete documentation index at: https://help.texterchat.com/llms.txt
> Use this file to discover all available pages before exploring further.

# The Scenario Run object

> One execution record of a scenario - your webhook debugging tool

very time a subscription's trigger event fires, a run is recorded: whether conditions matched, whether the webhook action succeeded, and per-step timing and errors. Query runs with [List Scenario Runs](/api-reference/scenarios-advanced/list-scenario-runs) to debug a subscription that "doesn't fire".

<Info>
  Returned by: [List Scenario Runs](/api-reference/scenarios-advanced/list-scenario-runs)
</Info>

```json Example scenario run object [expandable]  theme={null}
{
  "_id": "6970c4d5e6f70123456789ab",
  "scenarioId": "6970b3c1d2e3f40123456789",
  "version": 1,
  "success": true,
  "started": 1768314807488,
  "executionTime": 312,
  "conditionsResult": true,
  "steps": [
    {
      "type": "event",
      "name": "domain.message.created",
      "executionTime": 2
    },
    {
      "type": "condition",
      "name": "filtrex",
      "groupIndex": 0,
      "index": 0,
      "result": true,
      "executionTime": 1
    },
    {
      "type": "loader",
      "name": "chat",
      "position": "afterConditions",
      "index": 0,
      "executionTime": 48
    },
    {
      "type": "action",
      "name": "request",
      "index": 0,
      "executionTime": 260
    }
  ]
}
```

## Top-level

| Field              | Type      | Description                                                                                                  |
| ------------------ | --------- | ------------------------------------------------------------------------------------------------------------ |
| `_id`              | `string`  | ID of the run record                                                                                         |
| `scenarioId`       | `string`  | The scenario (subscription) that ran                                                                         |
| `version`          | `number`  | Revision version that ran                                                                                    |
| `success`          | `boolean` | Whether the run completed without errors                                                                     |
| `started`          | `number`  | Run start time (epoch ms)                                                                                    |
| `executionTime`    | `number`  | Total execution time in milliseconds                                                                         |
| `conditionsResult` | `boolean` | Overall conditions outcome. `false` = the event fired but conditions filtered it out, so actions did not run |

## Steps

Each item of `steps[]` records one executed component. Common fields plus per-type extras:

| Field                | Type       | Description                                                                          |
| -------------------- | ---------- | ------------------------------------------------------------------------------------ |
| `type`               | `string`   | `event`, `loader`, `condition`, `action`, `loop`                                     |
| `name`               | `string`   | Component name (e.g. `domain.message.created`, `chat`, `filtrex`, `request`)         |
| `executionTime`      | `number`   | Step duration in milliseconds                                                        |
| `error`              | `string`   | Error message, when the step failed                                                  |
| `result`             | `boolean`  | Conditions only: whether this condition passed                                       |
| `groupIndex / index` | `number`   | Position of the condition/loader/action within the revision definition               |
| `position`           | `string`   | Loaders only: `beforeConditions` / `afterConditions`                                 |
| `output`             | `any`      | Actions only: the action result (e.g. webhook response), when recorded               |
| `iterations`         | `object[]` | Loops only: sub-run results, each with its own `success` / `steps` / `executionTime` |
