***

title: swmlChangeStep
slug: /reference/typescript/agents/function-result/swml-change-step
description: Transition to a different step within the current conversation context.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[contextbuilder]: /docs/server-sdks/reference/typescript/agents/context-builder

[functionresult]: /docs/server-sdks/reference/typescript/agents/function-result

Transition to a different step within the current conversation context. Steps
are defined using
[`ContextBuilder`][contextbuilder] and
represent discrete stages in a workflow (e.g., "greeting", "verification",
"checkout").

## **Parameters**

<ParamField path="stepName" type="string" required={true} toc={true}>
  Name of the step to transition to.
</ParamField>

## **Returns**

[`FunctionResult`][functionresult] -- `this`, for chaining.

## **Example**

```typescript {4}
import { FunctionResult } from '@signalwire/sdk';

const result = new FunctionResult()
  .swmlChangeStep('confirm_order');
```