Skip to contentSkip to navigationSkip to topbar
On this page

Step


A Step is the runtime processing of a Widget, starting when that Widget is entered. Variables get set at the end of a Step.

If you're prompting a user for a text input, when they receive the inbound SMS prompt, they are actively in a Step until they exit the Widget (send a response or timeout). If the prompt is intended to set a variable, this happens at the end.

Subscribe to Real-time Studio Events

You can now subscribe to Studio Events for Executions and Steps instead of polling via the REST API. Simplify your data ingestion with Event Streams for Studio.

Try Studio Events(link takes you to an external page)

Step Properties

step-properties page anchor
Property nameTypeRequiredDescriptionChild properties
sidSID<FT>Optional
Not PII

The unique string that we created to identify the ExecutionStep resource.

Pattern: ^FT[0-9a-fA-F]{32}$Min length: 34Max length: 34

account_sidSID<AC>Optional

The SID of the Account that created the ExecutionStep resource.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34

flow_sidSID<FW>Optional

The SID of the Flow.

Pattern: ^FW[0-9a-fA-F]{32}$Min length: 34Max length: 34

execution_sidSID<FN>Optional

The SID of the Step's Execution resource.

Pattern: ^FN[0-9a-fA-F]{32}$Min length: 34Max length: 34

namestringOptional

The event that caused the Flow to transition to the Step.


contextobjectOptional
PII MTL: 30 days

The current state of the Flow's Execution. As a flow executes, we save its state in this context. We save data that your widgets can access as variables in configuration fields or in text areas as variable substitution.


transitioned_fromstringOptional

The Widget that preceded the Widget for the Step.


transitioned_tostringOptional

The Widget that will follow the Widget for the Step.


date_updatedstring<date-time>Optional

The date and time in GMT when the resource was last updated specified in ISO 8601(link takes you to an external page) format.


urlstring<uri>Optional

The absolute URL of the resource.


linksobject<uri-map>Optional

The URLs of related resources.


GET https://studio.twilio.com/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid}

Path parameters

path-parameters page anchor
Property nameTypeRequiredPIIDescription
FlowSidSID<FW>required

The SID of the Flow with the Step to fetch.

Pattern: ^FW[0-9a-fA-F]{32}$Min length: 34Max length: 34

ExecutionSidSID<FN>required

The SID of the Execution resource with the Step to fetch.

Pattern: ^FN[0-9a-fA-F]{32}$Min length: 34Max length: 34

SidSID<FT>required

The SID of the ExecutionStep resource to fetch.

Pattern: ^FT[0-9a-fA-F]{32}$Min length: 34Max length: 34
Fetch Execution StepLink to code sample: Fetch Execution Step
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function fetchExecutionStep() {
11
const step = await client.studio.v2
12
.flows("FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
13
.executions("FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
14
.steps("FTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
15
.fetch();
16
17
console.log(step.sid);
18
}
19
20
fetchExecutionStep();

Output

1
{
2
"sid": "FTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
3
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4
"flow_sid": "FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
5
"execution_sid": "FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
6
"parent_step_sid": null,
7
"name": "incomingRequest",
8
"context": {},
9
"transitioned_from": "Trigger",
10
"transitioned_to": "Ended",
11
"date_created": "2017-11-06T12:00:00Z",
12
"date_updated": null,
13
"url": "https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps/FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
14
"links": {
15
"step_context": "https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps/FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context"
16
}
17
}

Read a list of step resources

read-a-list-of-step-resources page anchor
GET https://studio.twilio.com/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps

Step resources are listed in reverse chronological order (most recent is first).

Property nameTypeRequiredPIIDescription
FlowSidSID<FW>required

The SID of the Flow with the Steps to read.

Pattern: ^FW[0-9a-fA-F]{32}$Min length: 34Max length: 34

ExecutionSidSID<FN>required

The SID of the Execution with the Steps to read.

Pattern: ^FN[0-9a-fA-F]{32}$Min length: 34Max length: 34
Property nameTypeRequiredPIIDescription
PageSizeintegerOptional

How many resources to return in each list page. The default is 50, and the maximum is 1000.

Minimum: 1Maximum: 1000

PageintegerOptional

The page index. This value is simply for client state.

Minimum: 0

PageTokenstringOptional

The page token. This is provided by the API.

1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function listExecutionStep() {
11
const steps = await client.studio.v2
12
.flows("FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
13
.executions("FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
14
.steps.list({ limit: 20 });
15
16
steps.forEach((s) => console.log(s.sid));
17
}
18
19
listExecutionStep();

Output

1
{
2
"meta": {
3
"previous_page_url": null,
4
"next_page_url": null,
5
"url": "https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps?PageSize=50&Page=0",
6
"page": 0,
7
"first_page_url": "https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps?PageSize=50&Page=0",
8
"page_size": 50,
9
"key": "steps"
10
},
11
"steps": []
12
}

Data retention and delivery

data-retention-and-delivery page anchor

For information on data retention in Studio, please reference the Studio User Guide. Keep in mind the following:

(warning)

Warning

Step logs are best-effort delivery. This means that the network does not guarantee that this data will be delivered.