getStep

View as MarkdownOpen in Claude

Get an existing step by name for inspection or modification.

Parameters

name
stringRequired

Step name to look up.

Returns

Step if found, undefined otherwise.

Example

1import { ContextBuilder } from '@signalwire/sdk';
2
3const builder = new ContextBuilder();
4const ctx = builder.addContext('default');
5ctx.addStep('collect_info').setText('Collect the caller\'s account information.');
6
7const step = ctx.getStep('collect_info');
8if (step) {
9 step.setFunctions(['verify_identity']);
10}