The core part of any process automation in Process Composer is how data moves (flows) between each task. To run properly, tasks require variables.

Variable types

These variable types are supported in a process automation in Process Composer:

Input
Use this variable type to return values that went “in” a task.
Output
Use this variable type to return values that came “out” of a task.
Meta
Use this variable type to return high-level details about the request of a task.
Note: You can use hidden variables to conceal data. For details on how to configure hidden variables, see Create hidden variables in a form.

Variable entities

The following entities can hold variables:

Global value
Global values span across the tenant and all variable types, and use this form: $@variableName$.
ProcessRequest
Requests hold meta-type variables only and use this form:

Variable format

This meta-type variable value is from the request.
Element
Tasks can hold three types of variables (input, output, meta) and use these forms:
Variable format This input or output variable value is read from the task.
Variable format This meta-type variable value is read from the task.

Based on the task type, the following Status metadata values are supported:

Task type Supported values for Status metadata
API Task
  • FAILED
  • SYSTEM_EXPIRED
  • SUCCESS
  • IN_PROGRESS
  • INITIATED
  • QUEUED
  • DEPLOY_FAILED
  • NOT_KNOWN
  • UNRECOGNIZED
Bot Task
  • FAILED
  • SYSTEM_EXPIRED
  • SUCCESS
  • IN_PROGRESS
  • INITIATED
  • QUEUED
  • DEPLOY_FAILED
  • NOT_KNOWN
  • UNRECOGNIZED
Process Task
  • SUCCESS
  • OPENED
  • ERROR
  • CANCELLED
Form Task
  • SYSTEM_EXPIRED
  • Label of the Form button
For details, see Add Form Task to a process automation.
Approval Task A localized string with an option to select the Approved or Declined options in any condition in the process regardless of the label of the button (different behavior than Form Task).
Filter Task
  • FAILED
  • IN_PROGRESS
  • COMPLETE
Document Validation Task
  • SYSTEM_EXPIRED
  • VALIDATION_SUCCESS
  • VALIDATION_INVALID
  • VALIDATION_REPROCESS

Date time variables

Name Entity Description
createdOn Request, Task Shows the date when the request or task was created.

Example: $createdOn$ or $Approval_Task.createdOn$

updatedOn Request, Task Shows the date when the request or task was last updated.

Example: $updatedOn$ or $Approval_Task.updatedOn$

submittedOn Request, Task Shows the date when the request or task was submitted on.

Example: $submittedOn$ or $Approval_Task.submittedOn$

openedOn Request, Task Shows the date when the request or task was opened.

Example: $openedOn$ or $Approval_Task.openedOn$

Dictionary variables

Name Entity Description
assignedTo Task Shows information about the user who is assigned to the task.

Dictionary key: {id}, {username}, {email}

Example: $Approval_Task.assignedTo$

createdBy Request Shows information about the user who created the request.

Dictionary key: {id}, {username}, {email}

Example: $createdBy$

Number variables

Name Entity Description
executionCount Task Shows the number of times the task was run.

Example: $Name_Bot.executionCount$

id Request, Task Shows the numerical ID of a request or task.

Example: $id$ or $Approval_Task.id$

assignedTo{id} Task Shows the numerical ID of the user who is assigned to the task.

Example: $Approval_Task.assignedTo{id}$

createdBy{id} Request Shows the numerical ID of the user who created the request.

Example: %createdBy{id}$

String variables

Name Entity Description
status Task Shows the label of the button clicked (action) for a form task or the bot return code for a bot task (equal to failed when the bot fails).

Example: %Approval_Task.status$ or $Name_Bot.status$

title Request, Task Shows the title of the request or task.

Example: %title$ or %Approval_Task.title$

type Request Shows the task type (equal to BOT for bot tasks and FORM for form tasks).

Example: %Task.type$

assignedTo{username} Task Shows the username of the user who is assigned to the task.

Example: $Approval_Task.assignedTo{username}$

createdBy{username} Request Shows the username of the user who created the request.

Example: $createdBy{username}$

assignedTo{email} Task Shows the email of the user who is assigned to the task.

Example: $Approval_Task.assignedTo{email}$

createdBy{email} Request Shows the email of the user who created the request.

Example: $createdBy{email}$

User-defined variable

Note: When you create user-defined variables with the variable type set as output, the output variables with expressions are displayed in the property panel of the Start node.
Name Description
Any Stores Boolean, Data table, Date time, File, Number, Record, String, or Window data types.

Use this variable type when you are uncertain of the action data type.

Boolean

Bool

Stores either a True or False
Credential

Cred

Stores string values securely, preventing values from being displayed in a message box or written to a file. The value is either selected from the Credential Vault or is user-provided.
DateTime

Date

Stores a value containing a single date and time value. You can format the values by selecting a predefined format or specifying a custom format.
Dictionary

Dict

Stores data in the form of key-value pairs. The value can be boolean, number, or string.
File

File

Stores a file path.
List

List

Stores a sequence of boolean, number, or string values.
Number

Num

Stores numeric values.
Record

Rec

Stores a single row of values extracted from a table. The values can be boolean, datetime, number, or string.
String

Str

Stores alphanumeric and special characters, and empty values.
Table

Table

Stores multiple values in a table of rows and columns. The values can be boolean, datetime, number, or string.
Window

Win

Stores a window title and URL.