Execution Contexts and Workflows
Execution contexts provide information about how or when a SuiteScript script or SuiteFlow workflow is triggered to execute. For example, a script can be triggered in response to an action in the NetSuite application, or an action occurring in another context, such as a web services integration. You can use execution context filtering to ensure that your scripts or workflows are triggered only when necessary.
You can specify that a script or workflow should execute only in certain contexts, and this filtering can improve performance in contexts where the script or workflow is not required. You can also determine the execution context for a running script programmatically and use different logic depending on the context. For more information about execution contexts, see Execution Contexts.
There are many execution contexts available in NetSuite. For a full list of execution contexts, see Execution Context Types.
Set the context for workflow initiation, actions, and transitions using the Contexts field on the workflow, action, or transition definition pages.
The following screenshot shows the Contexts field on the workflow definition page. This workflow does not initiate unless a sales order is created on the Web Store:

More Information About Execution Contexts
Use the following table to get more information about working with context types in a workflow:
Task |
For more information |
---|---|
Specify the context type in a workflow definition |
|
Specify the context type in an action or transition |
|
Get a list and description of all context types |
|
Get examples of using the CSV Import, User Event Script, and Custom Mass Update context types |