The process automation variables or tokens are values that are used in process definitions as dynamic values. These represent the data in the instance. The variables are predefined and must be selected from the Typeahead drop-down list that appears based on the input type. The variables can be accessed through the process definition design canvas properties.
Note
The variables are case-sensitive.Variables are contextual to the process, and have the following types:
- string
- date
- objects
- boolean
Variable values come from the following:
- alerts
- incidents
- resources
- JSON
- scripts
- integrations
Variables example
The following example shows you how to access available variables in the design canvas properties. You will start with an alert StartEvent named Alert Start that takes an alert as input and has an appended User Task named My User Task.
Add a dynamic Subject to the task using the alert subject.
In the Subject field, enter a
$
, and the Alert_Start event is displayed in a list below the Subject field, select the Alert_Event.- The option displayed below the subject field is a result of the input provided in the Input Type field in the Alert Start event.
- If you provide Alert as the input, alert is displayed.
- If you provide Incident as the input, incident is displayed.
- The period is used to display the variables at each step in the process workflow. If there are no more variables in the workflow, a list will not be displayed when you enter a period.
In the Subject field, after
$Alert_Start
, enter a period.
and alert is displayed in a list below the Subject field, select alert.In the Subject field, after
$Alert_Start.alert
, enter a period.
and the alert variables are displayed in a list below the Subject field. Enters
in the list to filter the attributes starting with s and select subject.The user task now uses the subject of the input alert as the task subject.
The following example shows how variables can be used to dynamically populate task properties in the Subject, Description, and Priority fields.
In addition to alert, incident, and resource properties, you can also use variables to pass the output of one task to another task including script output and JSON fields.
Available variables
The following table lists the available process automation variables. The variables can be string, date, objects, or boolean values.
Incident variables
Use the following variables when accessing the incident data.
Incident Variables | Variable Representation | ||||
---|---|---|---|---|---|
Name | Inner Fields | Type | Signal Start Event | SequenceFlows | Example |
assignedTo | String | $assignedTo.email | $TASK_NAME_OR_ID.incident.assignedTo.email | $assignedTo.email = "firstname.lastname@opsramp.com" | |
firstName | String | $assignedTo.firstName | $TASK_NAME_OR_ID.incident.assignedTo.firstName | $assignedTo.firstName = "firstname" | |
id | Number | $assignedTo.id | $TASK_NAME_OR_ID.incident.assignedTo.id | $assignedTo.id = "1112" | |
lastName | String | $assignedTo.lastName | $TASK_NAME_OR_ID.incident.assignedTo.lastName | $assignedTo.lastName = "view1233" | |
loginName | String | $assignedTo.loginName | $TASK_NAME_OR_ID.incident.assignedTo.loginName | $assignedTo.loginName = "Alertview" | |
uuid | String | $assignedTo.uuid | $TASK_NAME_OR_ID.incident.assignedTo.uuid | $assignedTo.uuid = "USR0000000XXX" | |
assigneeGroup | description | String | $assigneeGroup.description | $TASK_NAME_OR_ID.incident.assigneeGroup.description | $assigneeGroup.description = "User group created today" |
id | Number | $assigneeGroup.id | $TASK_NAME_OR_ID.incident.assigneeGroup.id | $assigneeGroup.id = "35793" | |
mspId | Number | $assigneeGroup.mspId | $TASK_NAME_OR_ID.incident.assigneeGroup.mspId | $assigneeGroup.mspId = "159" | |
name | String | $assignedTo.name | $TASK_NAME_OR_ID.incident.assigneeGroup.name | $assigneeGroup.name = "UGroup 21June" | |
uuid | String | $assigneeGroup.uuid | $TASK_NAME_OR_ID.incident.assigneeGroup.uuid | $assigneeGroup.uuid = "USRXXX-xxx00b0e-f1a1-xx9b-a3db-fef0d279dxxx" | |
businessImpact | id | Number | $businessImpact.id | $TASK_NAME_OR_ID.incident.businessImpact.id | $businessImpact.id = "6370" |
name | String | $businessImpact.name | $TASK_NAME_OR_ID.incident.businessImpact.name | $businessImpact.name = "test business impact" | |
uuid | String | $businessImpact.uuid | $TASK_NAME_OR_ID.incident.businessImpact.uuid | $businessImpact.uuid ="SIMPACT-5ebbxxxx-b3xx-xx06-9fxx-91xxb6xxb8x2" | |
category | id | Number | $category.id | $TASK_NAME_OR_ID.incident.category.id | $category.id = "12292" |
name | String | $category.name | $TASK_NAME_OR_ID.incident.category.name | $category.name = "Incident3.1" | |
uuid | String | $category.uuid | $TASK_NAME_OR_ID.incident.category.uuid | $category.uuid = "SCAT-78e4dxxx-e9xx-xx81-a2xx-07d2cbxxx660" | |
cc | String | $cc | $TASK_NAME_OR_ID.incident.cc | $cc = "firstname.lastname@opsramp.com" | |
clientUniqueId | String | $clientUniqueId | $TASK_NAME_OR_ID.incident.clientUniqueId | $clientUniqueId = "bd39d46f-f32f-43df-9e53-71e85e36540d" | |
createdBy | String | $createdBy | $TASK_NAME_OR_ID.incident.createdBy | $createdBy = "USR0000000003" | |
createdTime | Date | $createdTime | $TASK_NAME_OR_ID.incident.createdTime | $createdTime >= "2022-06-15 10:20:45" | |
description | String | $description | $TASK_NAME_OR_ID.incident.description | $description = "testing ticket" | |
dueDate | Date | $dueDate | $TASK_NAME_OR_ID.incident.dueDate | $dueDate >= "2022-06-15 10:20:45" | |
escalationPolicyId | String | $escalationPolicyId | $TASK_NAME_OR_ID.incident.escalationPolicyId | $escalationPolicyId = "POLICY-aed37873-bcd6-414a-8c64-95212fb65e08" | |
extTicketId | String | $extTicketId | $TASK_NAME_OR_ID.incident.extTicketId | $extTicketId != "INC0012596" | |
id | Number | $id | $TASK_NAME_OR_ID.incident.id | $id > 1 | |
impact | String | $impact | $TASK_NAME_OR_ID.incident.impact | $impact = "Test Description" | |
mspUniqueId | String | $mspUniqueId | $TASK_NAME_OR_ID.incident.mspUniqueId | $mspUniqueId = "msp_159" | |
priority | String | $priority | $TASK_NAME_OR_ID.incident.priority | $priority = "Normal" | |
reason | id | Number | $reason.id | $TASK_NAME_OR_ID.incident.reason.id | $reason.id = 504 |
name | String | $reason.name | $TASK_NAME_OR_ID.incident.reason.name | $reason.name = "Test Reason" | |
requester | String | $requester.email | $TASK_NAME_OR_ID.incident.requester.email | $requester.email = "firstname.lastname@opsramp.com" | |
firstName | String | $requester.firstName | $TASK_NAME_OR_ID.incident.requester.firstName | $requester.firstName = "firstname" | |
id | Number | $requester.id | $TASK_NAME_OR_ID.incident.requester.id | $requester.id = "7" | |
lastName | String | $requester.lastName | $TASK_NAME_OR_ID.incident.requester.lastName | $requester.lastName = "lastname" | |
loginName | String | $requester.loginName | $TASK_NAME_OR_ID.incident.requester.loginName | $requester.loginName = "Alertview" | |
uuid | String | $requester.uuid | $TASK_NAME_OR_ID.incident.requester.uuid | $requester.uuid = "USR0000000XXX" | |
status | String | $status | $TASK_NAME_OR_ID.incident.status | $status = "New" | |
subCategory | id | Number | $subCategory.id | $TASK_NAME_OR_ID.incident.subCategory.id | $subCategory.id = "25980" |
name | String | $subCategory.name | $TASK_NAME_OR_ID.incident.subCategory.name | $subCategory.name = "Java 4.1" | |
uuid | String | $subCategory.uuid | $TASK_NAME_OR_ID.incident.subCategory.uuid | $subCategory.uuid = "SCAT-12df2xxxx-7xxa-xxc1-b0xx-ca48xxx364xx" | |
subject | String | $subject | $TASK_NAME_OR_ID.incident.subject | $subject = "test ticket" | |
updatedBy | String | $updatedBy | $TASK_NAME_OR_ID.incident.updatedBy | $updatedBy = "USR0000000003" | |
updatedTime | Date | $updatedTime | $TASK_NAME_OR_ID.incident.updatedTime | $updatedTime >= "2022-06-15 10:20:45" | |
Urgency | id | Number | $urgency.id | $TASK_NAME_OR_ID.incident.urgency.id | $urgency.id = "3002" |
name | String | $urgency.name | $TASK_NAME_OR_ID.incident.urgency.name | $urgency.name = "Urgency69" | |
uuid | String | $urgency.uuid | $TASK_NAME_OR_ID.incident.urgency.uuid | $urgency.uuid = "SURG-55f56xxx-8xxd-4xx0-8xxb-b6xxxx5cc562" | |
uuid | String | $uuid | $TASK_NAME_OR_ID.incident.uuid | $uuid = "INC0001059XXX" |
Resource variables
Use the following variables when accessing the resource data.
Resource Variables | Variable Representation | ||||
---|---|---|---|---|---|
Name | Inner Fields | Type | Signal Start Event | Consequences | Example |
agentInstalled | String | $agentInstalled | $TASK_NAME_OR_ID.resource.agentInstalled | $agentInstalled != "true" | |
aliasName | String | $aliasName | $TASK_NAME_OR_ID.resource.aliasName | $aliasName = "devicess00" | |
alternateIpAddress | String | $alternateIpAddress | $TASK_NAME_OR_ID.resource.alternateIpAddress | $alternateIpAddress = "188.xx.xx.xx" | |
assetManagedTime | Date | $assetManagedTime | $TASK_NAME_OR_ID.resource.assetManagedTime | $assetManagedTime != "2022-06-15 10:20:45" | |
createdTime | Date | $createdDate | $TASK_NAME_OR_ID.resource.createdTime | $createdTime >= "2022-06-15 10:20:45" | |
firstManagedTime | Date | $firstManagedTime | $TASK_NAME_OR_ID.resource.firstManagedTime | $firstManagedTime >= "2022-06-15 10:20:45" | |
hostName | String | $hostName | $TASK_NAME_OR_ID.resource.hostName | $hostName = "host 1" | |
ipAddress | String | $ipAddress | $TASK_NAME_OR_ID.resource.ipAddress | $ipAddress = "145.xx.xx.xx" | |
macAddress | String | $macAddress | $TASK_NAME_OR_ID.resource.macAddress | $macAddress = "10.xx.xx.xx" | |
make | String | $make | $TASK_NAME_OR_ID.resource.make | $make = "Dell" | |
model | String | $model | $TASK_NAME_OR_ID.resource.model | $model = "Dell 1.0" | |
name | String | $name | $TASK_NAME_OR_ID.resource.name | $name = "resource 1" | |
osName | String | $osName | $TASK_NAME_OR_ID.resource.osName | $osName = "Windows" | |
resourceType.name | String | $resourceType.name | $TASK_NAME_OR_ID.resource.resourceType.name | $resourceType.name = "Desktop" | |
serialNumber | String | $serialNumber | $TASK_NAME_OR_ID.resource.serialNumber | $serialNumber = "1.25.xx.xx" | |
state | String | $state | $TASK_NAME_OR_ID.resource.state | $state = "ACTIVE" | |
uuid | String | $uuid | $TASK_NAME_OR_ID.resource.uuid | $uuid != "8xxxeceb-75xx-xx57-xxxx-37a52xxxxx0c" |
Alert variables
Use the following variables when accessing the alerts data.
Alert variables | Variable Representation | ||||
---|---|---|---|---|---|
Name | Inner Fields | Type | Signal Start Event | SequenceFlows | Example |
alertCriticalWarningDuration | $alertCriticalWarningDuration | $TASK_NAME_OR_ID.alert.alertCriticalWarningDuration | $alertCriticalWarningDuration != "5" | ||
alertType | $alertType | $TASK_NAME_OR_ID.alert.alertType | $alertType = "Monitoring" | ||
clientId | $clientId | $TASK_NAME_OR_ID.alert.clientId | $clientId = "client_160" | ||
clientName | $clientName | $TASK_NAME_OR_ID.alert.clientName | $clientName = "Process Workflows" | ||
clientUuId | $clientUuId | $TASK_NAME_OR_ID.alert.clientUuId | $clientUuId = "36xxxx2-2xxa-daxx-00xx-27e49xxxx379" | ||
comments | $comments | $TASK_NAME_OR_ID.alert.comments | $comments != "test alert" | ||
component | $component | $TASK_NAME_OR_ID.alert.component | $component = "Boot" | ||
correlatedAlertsCount | $correlatedAlertsCount | $TASK_NAME_OR_ID.alert.correlatedAlertsCount | $correlatedAlertsCount >= "3" | ||
createdBy | $createdBy | $TASK_NAME_OR_ID.alert.createdBy | $createdBy != "user" | ||
createdTime | $createdTime | $TASK_NAME_OR_ID.alert.createdTime | $createdTime >= "2022-06-15 10:20:45" | ||
currentState | $currentState | $TASK_NAME_OR_ID.alert.currentState | $currentState = "Critical" | ||
description | $description | $TASK_NAME_OR_ID.alert.description | $description = "The load on the device has reached 30% Please restart your device" | ||
eventType | $eventType | $TASK_NAME_OR_ID.alert.eventType | $eventType != "testing" | ||
externalAlertId | $externalAlertId | $TASK_NAME_OR_ID.alert.externalAlertId | $externalAlertId != "1234" | ||
id | $id | $TASK_NAME_OR_ID.alert.id | $id >= "1000" | ||
incident | All incident tokens Ex: incident subject | $incident.subject | $TASK_NAME_OR_ID.alert.incident.subject | $incident IS NOT NULL | |
incidentId | $incidentId | $TASK_NAME_OR_ID.alert.incidentId | $incidentId = "INC0000000000" | ||
inferenceId | $inferenceId | $TASK_NAME_OR_ID.alert.inferenceId | $inferenceId != "1234" | ||
ipAddress | $ipAddress | $TASK_NAME_OR_ID.alert.ipAddress | $ipAddress = "192.xxx.x.x" | ||
isAvailabilityAlert | $isAvailabilityAlert | $TASK_NAME_OR_ID.alert.isAvailabilityAlert | $isAvailabilityAlert = "false" | ||
isInferenceAlert | $isInferenceAlert | $TASK_NAME_OR_ID.alert.isInferenceAlert | $isInferenceAlert = "false" | ||
metric | $metric | $TASK_NAME_OR_ID.alert.metric | $metric = "Memory8" | ||
monitorName | $monitorName | $TASK_NAME_OR_ID.alert.monitorName | $monitorName = "MOnitor1" | ||
objectId | $objectId | $TASK_NAME_OR_ID.alert.objectId | $objectId != "test object" | ||
objectName | $objectName | $TASK_NAME_OR_ID.alert.objectName | $objectName != "test object" | ||
objectType | $objectType | $TASK_NAME_OR_ID.alert.objectType | $objectType != "test object" | ||
partnerId | $partnerId | $TASK_NAME_OR_ID.alert.partnerId | $partnerId = "744axxx1-12f2-2fxx-xxce-cc5xxxxxxf7b" | ||
partnerName | $partnerName | $TASK_NAME_OR_ID.alert.partnerName | $partnerName CONTAINS "ITSM" | ||
previousState | $previousState | $TASK_NAME_OR_ID.alert.previousState | $previousState = "Critical" | ||
priority | $priority | $TASK_NAME_OR_ID.alert.priority | $priority != "p1" | ||
problemArea | $problemArea | $TASK_NAME_OR_ID.alert.problemArea | $problemArea != "ITSM" | ||
repeatCount | $repeatCount | $TASK_NAME_OR_ID.alert.repeatCount | $repeatCount >= "2" | ||
resource | All incident variables Ex: resource hostName | $resource.hostName | $TASK_NAME_OR_ID.alert.resource.hostName | $resource.hostName = "BVRXXXT000" | |
resourceMaintenanceWindowId | $resourceMaintenanceWindowId | $TASK_NAME_OR_ID.alert.resourceMaintenanceWindowId | $resourceMaintenanceWindowId != "2" | ||
snoozeDuration | $snoozeDuration | $TASK_NAME_OR_ID.alert.snoozeDuration | $snoozeDuration >= "1" | ||
source | $source | $TASK_NAME_OR_ID.alert.source | $source = "OpsRamp" | ||
spUniqueId | $spUniqueId | $TASK_NAME_OR_ID.alert.spUniqueId | $spUniqueId != "1234" | ||
status | $status | $TASK_NAME_OR_ID.alert.status | $status != "New" | ||
statusHistory | acknowledgedTime | $statusHistory.acknowledgedTime | $TASK_NAME_OR_ID.alert.statusHistory.acknowledgedTime | $statusHistory.acknowledgedTime >= "2022-06-15 10:20:45" | |
closedBy | $statusHistory.closedBy | $TASK_NAME_OR_ID.alert.statusHistory.closedBy | $statusHistory.closedBy != "test user" | ||
closedTime | $statusHistory.closedTime | $TASK_NAME_OR_ID.alert.statusHistory.closedTime | $statusHistory.closedTime >= "2022-06-15 10:20:45" | ||
correlatedBy | $statusHistory.correlatedBy | $TASK_NAME_OR_ID.alert.statusHistory.correlatedBy | $statusHistory.correlatedBy != "test user" | ||
correlatedTime | $statusHistory.correlatedTime | $TASK_NAME_OR_ID.alert.statusHistory.correlatedTime | $statusHistory.correlatedTime > "2022-06-15 10:20:45" | ||
openBy | $statusHistory.openBy | $TASK_NAME_OR_ID.alert.statusHistory.openBy | $statusHistory.openBy != "test user" | ||
openTime | $statusHistory.openTime | $TASK_NAME_OR_ID.alert.statusHistory.openTime | $statusHistory.openTime > "2022-06-15 10:20:45" | ||
suppressedBy | $statusHistory.suppressedBy | $TASK_NAME_OR_ID.alert.statusHistory.suppressedBy | $statusHistory.suppressedBy != "test user" | ||
suppressedTime | $statusHistory.suppressedTime | $TASK_NAME_OR_ID.alert.statusHistory.suppressedTime | $statusHistory.suppressedTime > "2022-06-15 10:20:45" | ||
ticketedBy | $statusHistory.ticketedBy | $TASK_NAME_OR_ID.alert.statusHistory.ticketedBy | $statusHistory.ticketedBy != "test user" | ||
ticketedTime | $statusHistory.ticketedTime | $TASK_NAME_OR_ID.alert.statusHistory.ticketedTime | $statusHistory.ticketedTime > "2022-06-15 10:20:45" | ||
subject | $subject | $TASK_NAME_OR_ID.alert.subject | $subject = "test alert" | ||
templateName | $templateName | $TASK_NAME_OR_ID.alert.templateName | $templateName != "test template" | ||
triggeredTime | $triggeredTime | $TASK_NAME_OR_ID.alert.triggeredTime | $triggeredTime > "2022-06-15 10:20:45" | ||
updatedBy | $updatedBy | $TASK_NAME_OR_ID.alert.updatedBy | $updatedBy != "user" | ||
updatedTime | $updatedTime | $TASK_NAME_OR_ID.alert.updatedTime | $updatedTime > "2022-06-15 10:20:45" | ||
uuid | $uuid | $TASK_NAME_OR_ID.alert.uuid | $uuid IS NOT NULL |
Other variables
The following are JSON, Script, and Integration variables:
Type | Process Automation Variables |
---|---|
JSON | JSON fields can be used as variables. |
Script | Output Status |
Integration | Integration events output can be configured as variables. |