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

# Ordered block steps

> Step kinds, step fields, implicit next, conditional branching, and block routability.

An ordered block is a `steps:` list inside a `:::ordered_block id=<id>` fence in
`skill.md`. This page is the full step vocabulary. For when to reach for a block
at all, see [Ordered Blocks](https://rasa.com/docs/mantle/build-guide/ordered-blocks.md).

## Step kinds

The kind is inferred from which key the step carries.

| Key | Kind | What happens |
| - | - | - |
| `instructions:` | Conversational | The LLM converses within the step. Pair with `complete_when:` |
| `collect:` | Collect | The framework collects one memory entry from the user |
| `action:` | Action | Deliver a response (`utter_*`) |
| `execute_tool:` | Execute | The framework calls the tool directly, without the LLM |
| `noop: true` | Route | Evaluate `next:` branches and jump, with no user-visible effect |
| `set_memory:` | Set memory | Write literal values to memory keys |
| `call:` | Call | Run another block or skill, then return to this step's `next` |
| `link:` | Link | Hand off to another flow and continue there |
| `id: END` | End | Terminate the block |

## Step fields

| Field | Applies to | Description |
| - | - | - |
| `id` | all | Step identifier, unique within the block |
| `next` | all but `noop:` / `link:` | A step id, or a list of conditional branches |
| `complete_when` | `instructions:` | Condition that ends the step |
| `optional` | `instructions:` | The step may be skipped |
| `utterance` | `collect:` | Response name used to ask for the value |
| `description` | `collect:` | What the value means, shown to the LLM |
| `ask_before_filling` | `collect:` | Ask even when the value is already set |
| `parameters` | `execute_tool:` | Arguments; `session.*` values resolve from memory |

> [!NOTE]
>
> A `collect:` step names its question with **`utterance:`**; an `action:` step
> names the response to deliver with **`action:`**.

## Implicit `next`

A step with no `next` falls through to the step below it, and the last step
falls through to `END`. Add `next:` where you are branching or jumping
backwards.

## Conditional branching

A `next:` branch list routes on conditions, with `else:` as the fallback:

```yaml theme={null}
- id: gate_card_selected
  noop: true
  next:
    - if: "session.card_replace.selected_card_id"
      then: check_card_eligible
    - else: card_not_found
```

Branches are evaluated in order and the first match wins, so put `else:` last.

Conditions use the standard expression grammar. See
[Conditions](https://rasa.com/docs/mantle/reference/conditions.md).

## Routability

A block's reachability follows from the shape of the skill:

| Skill shape | Blocks are |
| - | - |
| Prose + blocks (hybrid) | Internal: reached from that skill via `@block.<id>` or `call:` |
| Blocks only (fully controlled) | Routable: the orchestrator may enter them directly |

## See also

* [Ordered Blocks](https://rasa.com/docs/mantle/build-guide/ordered-blocks.md): when to use one
* [`skill.md` reference](https://rasa.com/docs/mantle/reference/skill-md): the fence and frontmatter
* [Conditions](https://rasa.com/docs/mantle/reference/conditions.md): the expression grammar


## Related topics

- [Ordered Blocks](https://rasa.com/docs/mantle/build-guide/ordered-blocks.md)
- [Execution loop reference](https://rasa.com/docs/mantle/reference/execution-loop.md)
- [Constraint Table](https://rasa.com/docs/mantle/reference/constraint-table.md)
- [responses.yml](https://rasa.com/docs/mantle/reference/responses-yml.md)
- [Responses](https://rasa.com/docs/mantle/concepts/responses.md)


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