Skip to navigation

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

import { ContextBuilder } from '@signalwire/sdk';
const builder = new ContextBuilder();
const ctx = builder.addContext('default');
ctx.addStep('collect_info').setText('Collect the caller\'s account information.');
const step = ctx.getStep('collect_info');
if (step) {
step.setFunctions(['verify_identity']);
}