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

# Lemlist: Get Sequences Sequenceid Steps Stepid Branches

> List Condition Branches. Includes SDK V2 and CLI requests, input constraints, response fields, and Deepline credit cost.

List Condition Branches.

<Info>
  Tool ID: `lemlist_get_sequences_sequenceid_steps_stepid_branches`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'lemlist_get_sequences_sequenceid_steps_stepid_branches',
  {
    "sequenceId": "sequence_123",
    "stepId": "step_123"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={null}
deepline tools execute lemlist_get_sequences_sequenceid_steps_stepid_branches --input '{
  "sequenceId": "sequence_123",
  "stepId": "step_123"
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": [
    {
      "sequenceId": "sequence_123",
      "index": 123,
      "fallback": true
    }
  ]
}
```

Use `deepline tools get lemlist_get_sequences_sequenceid_steps_stepid_branches --json` for the latest machine-readable contract.

## Input reference

Every branch of a condition step, in execution order, with the Else branch last. A condition step holds an ordered list of branches, each owning the sub-sequence the leads it matches walk into. Array order is execution priority: the first branch whose test matches takes the lead, and the Else branch at the end catches everyone no branch matched. A branch is addressed by its `sequenceId`, never by position - a reorder moves positions, the sub-sequence id is what the runtime routes leads to. Reading branches is not gated; only the writes are in closed beta.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.sequenceId` | `string` | Yes | — | The unique identifier of the sequence holding the condition step |
| `payload.stepId` | `string` | Yes | — | The unique identifier of the condition step, from `GET /campaigns/&#123;campaignId&#125;/sequences` |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Every branch of a condition step, in execution order, with the Else branch last. A condition step holds an ordered list of branches, each owning the sub-sequence the leads it matches walk into. Array order is execution priority: the first branch whose test matches takes the lead, and the Else branch at the end catches everyone no branch matched. A branch is addressed by its `sequenceId`, never by position - a reorder moves positions, the sub-sequence id is what the runtime routes leads to. Reading branches is not gated; only the writes are in closed beta.",
    "properties": {
      "sequenceId": {
        "type": "string",
        "description": "The unique identifier of the sequence holding the condition step"
      },
      "stepId": {
        "type": "string",
        "description": "The unique identifier of the condition step, from `GET /campaigns/{campaignId}/sequences`"
      }
    },
    "required": [
      "sequenceId",
      "stepId"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `array` | Yes | — | Provider response payload. |
| `result.data[].sequenceId` | `string` | No | — | The branch's sub-sequence id, and its address on every branch endpoint. Pass it to `POST /sequences/&#123;sequenceId&#125;/steps` to add steps inside the branch. |
| `result.data[].index` | `integer` | No | — | Execution rank among the non-fallback branches, starting at 0. The first branch whose test matches takes the lead. Absent on the Else branch, which always runs last. |
| `result.data[].fallback` | `boolean` | No | — | `true` on the Else branch - the one that catches every lead no other branch matched. Absent on the others. |
| `result.data[].key` | `string` | No | — | The condition the step tests. Every branch of a step shares it: a branch never carries a condition of its own. |
| `result.data[].name` | `string` | No | — | The branch's display name, present only when someone has set one. lemlist labels the unnamed ones "Branch 1", "Branch 2", … and "Else"; those defaults are not stored and are not returned here. |
| `result.data[].delay` | `integer` | No | — | Length of the time window the condition waits on the lead's action, in days. Only on the lead-action conditions that store one. |
| `result.data[].delayType` | `"within" \| "waitUntil"` | No | — | How the condition waits: `within` branches once the window is over, `waitUntil` parks the lead until the action happens, with no time bound. Allowed: `within`, `waitUntil`. |
| `result.data[].scoreComparator` | `"$gte" \| "$lt"` | No | — | `hasScore` only - how the lead's score is compared to `scoreThreshold`. Allowed: `$gte`, `$lt`. |
| `result.data[].scoreThreshold` | `integer` | No | — | `hasScore` only - the score this branch tests against. |
| `result.data[].emailStatusFilter` | `array` | No | — | `hasEmailAddress` only - the email statuses this branch matches. |
| `result.data[].callStatusFilter` | `array` | No | — | `aircallDone` only - the call-status keys this branch matches. |
| `result.data[].customField` | `string` | No | — | `customLeadInfo` only - the tested field, normalized: a lead variable reads back as `variables. `, a contact field as `fields. `. Every branch of the step tests the same field. |
| `result.data[].customOperator` | `"equal" \| "contains" \| "empty" \| "notEmpty"` | No | — | `customLeadInfo` only - how the field is compared to the tested values. Allowed: `equal`, `contains`, `empty`, `notEmpty`. |
| `result.data[].customValues` | `array` | No | — | `customLeadInfo` only - every value this branch tests; the branch matches when any of them does. Empty for the `empty` and `notEmpty` operators. |
| `result.data[].selector` | `string` | No | — | The raw stored condition selector, as JSON. Returned only when none of the fields above could describe the branch. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "array",
        "description": "Provider response payload.",
        "items": {
          "type": "object",
          "description": "One branch of a condition step. Addressed by `sequenceId` - the sub-sequence its leads walk - never by position. The fields describing what the branch tests depend on the step's condition; the ones that do not apply are absent.",
          "properties": {
            "sequenceId": {
              "type": "string",
              "description": "The branch's sub-sequence id, and its address on every branch endpoint. Pass it to `POST /sequences/{sequenceId}/steps` to add steps inside the branch."
            },
            "index": {
              "type": "integer",
              "description": "Execution rank among the non-fallback branches, starting at 0. The first branch whose test matches takes the lead. Absent on the Else branch, which always runs last."
            },
            "fallback": {
              "type": "boolean",
              "description": "`true` on the Else branch - the one that catches every lead no other branch matched. Absent on the others."
            },
            "key": {
              "type": "string",
              "description": "The condition the step tests. Every branch of a step shares it: a branch never carries a condition of its own."
            },
            "name": {
              "type": "string",
              "description": "The branch's display name, present only when someone has set one. lemlist labels the unnamed ones \"Branch 1\", \"Branch 2\", … and \"Else\"; those defaults are not stored and are not returned here."
            },
            "delay": {
              "type": "integer",
              "description": "Length of the time window the condition waits on the lead's action, in days. Only on the lead-action conditions that store one."
            },
            "delayType": {
              "type": "string",
              "description": "How the condition waits: `within` branches once the window is over, `waitUntil` parks the lead until the action happens, with no time bound.",
              "enum": [
                "within",
                "waitUntil"
              ]
            },
            "scoreComparator": {
              "type": "string",
              "description": "`hasScore` only - how the lead's score is compared to `scoreThreshold`.",
              "enum": [
                "$gte",
                "$lt"
              ]
            },
            "scoreThreshold": {
              "type": "integer",
              "description": "`hasScore` only - the score this branch tests against."
            },
            "emailStatusFilter": {
              "type": "array",
              "description": "`hasEmailAddress` only - the email statuses this branch matches.",
              "items": {
                "type": "string",
                "enum": [
                  "deliverable",
                  "risky",
                  "undeliverable",
                  "unverified"
                ]
              }
            },
            "callStatusFilter": {
              "type": "array",
              "description": "`aircallDone` only - the call-status keys this branch matches.",
              "items": {
                "type": "string"
              }
            },
            "customField": {
              "type": "string",
              "description": "`customLeadInfo` only - the tested field, normalized: a lead variable reads back as `variables. `, a contact field as `fields. `. Every branch of the step tests the same field."
            },
            "customOperator": {
              "type": "string",
              "description": "`customLeadInfo` only - how the field is compared to the tested values.",
              "enum": [
                "equal",
                "contains",
                "empty",
                "notEmpty"
              ]
            },
            "customValues": {
              "type": "array",
              "description": "`customLeadInfo` only - every value this branch tests; the branch matches when any of them does. Empty for the `empty` and `notEmpty` operators.",
              "items": {
                "type": "string"
              }
            },
            "selector": {
              "type": "string",
              "description": "The raw stored condition selector, as JSON. Returned only when none of the fields above could describe the branch."
            }
          },
          "additionalProperties": false
        }
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Lemlist provider guide](/docs/providers/lemlist/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.