Script Types

Workflow enables you to create scripts of these types:

Script Type Description Usage For More Information:
Asynchronous Task Enables you to execute large and time-consuming tasks, or a large number of small tasks. Typically called from other script types such as Form Event, Workflow, or Scheduled Task scripts. Asynchronous Task Script Samples
Event Enables you to execute a script when an associated global event occurs.

These scripts can be called when performing certain actions in Workflow administration workspaces and are typically used in an integration with external systems.

To access event scripts, go to Setup > Development > Event Management

Event Script Examples
Exception Handling Enables you to gather information about, and respond to exceptions that occur during script execution. Manages exceptions from other scripts. Exception Handling Script Example
Form Event Enables you to control field behavior on forms. Used with the following actions before the form displays, after a change in a custom field value, on a form update, or upon a form submission:
  • Workflow action form
  • Case create action forms
  • Public case creation page
  • Case creation widgets
Form Event Script Examples
Internal Use These scripts are child scripts that are called by other scripts. These are created and used only in the Script Editor. Internal Use Script Examples
Scheduled Task Enables you to assign scripts to scheduled tasks.

Executes scripts at specific time periods. Typically used to perform updates on a group of cases that meet criteria.

To access scheduled tasks, go to Setup > Automation > Scheduled Tasks. 

Scheduled Task Script Example
Unit Test Enables you to create tests to validate that your existing scripts return the expected results. These are created and used only in the Script Editor. Multiple unit tests can be executed at once to ensure there are no failures in the script code. Unit Test Script Example
Utils Enables you to manage common functions in a single place. This code is later called from other scripts. These are created and used only in the Script Editor. These scripts generally contain methods or classes that are used frequently by other scripts. Utils Script Example
 Web Action
Enables you to create a script that is executed from an external webservice call.
These scripts are called from other applications using an HTTP request. Web Action Script Example
Workflow Enables you to control fields and objects related to a case after a workflow action has been performed and the data has been saved to the database. These are triggered after a workflow action has been performed in order to update case information, other internal objects, or external systems. Workflow Script Example