Studio Flow Context is the data and information captured in a Studio Flow while a user is engaging with it. There are four data types that can be accessed to retrieve this information: Flow, Trigger, Widgets, and Contact. Studio Flow Context can be referenced in a Studio Widget using the Liquid Template Language by specifying the data type and desired variable.
Flow Context describes the environment — including users and variables — within a Twilio Studio workflow. Where a Studio Flow defines the order of events that take place during an execution, Flow Context is responsible for storing any values involved with the execution. Flow Context is accessible from any Widget within the Flow, allowing global access to variables and information from other Widgets.
You would use Flow Context frequently when accessing user input for the Send & Wait For Reply Widget and Gather Input On Call Widget . The four data types in a Flow Context are used to access the various forms of data associated with a Flow.
Flow data refers to information built into a Studio Flow such as the Twilio phone number designated to carry out its execution.
Trigger data is information, such as properties of an incoming message or phone call and its recipient, stored when a Studio Flow begins execution. A Studio Flow execution is initiated when an incoming phone call, message, or REST API request is detected. The unique trigger variables are detailed in the Trigger (Start) Widget documentation.
Widgets data handles information saved by each Widget upon execution. This could include user input from a message or voice response. Widgets are referenced by their unique name using {{widgets.<widget_name>.<variable>}}
, with variables found on each Widget's documentation page.
Contact data keeps track of information referring to the user interacting with the Studio Flow. An example of this is a user's phone number.
Studio Flow Context also includes variables which can be set during execution using the Set Variables Widget . Custom variables are accessed as a Flow data type using {{flow.variables.<key>}}
, where key is the custom variable name specified.
Find additional information about Studio Flow Context within the Studio Getting Started Guide and in the Studio Usage Guide.