Supported variable types in Process Composer

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
Global values span across the tenant and all variable types, and use this form: $@variableName$.
Request
Requests hold meta-type variables only and use this form:

This meta-type variable value is from the request.
Task
Tasks can hold three types of variables (input, output, meta) and use these forms:
This input or output variable value is read from the task.
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$

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

Name Entity Description
Any Task 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.