[A companion article to CMMS Integration Field Configuration. This article covers only how to implement template variables within CMMS fields. For setting up the CMMS Configuration tab, see the main article.]
Overview
Template variables allow administrators to automatically populate CMMS work ticket fields with dynamic information from Virtual Facility when work tickets are created. Instead of entering static values, template variables substitute contextual information such as alarm details, work ticket information, dates, equipment names, and building data at runtime.
Template variables can be used when configuring CMMS field default values for fields with the following data types:
- String
- Text Area
These variables are entered using double curly braces:
{{variableName}}
When to Use Template Variables
Template variables are useful when you want to:
- Automatically include alarm information in work tickets
- Provide technicians with direct links to Virtual Facility work tickets
- Populate due dates dynamically
- Include equipment or building information from associated alarms
- Create consistent work ticket descriptions without manual entry
- Add alarm context to work tickets generated by automation rules
Template variables are most commonly configured in a CMMS field's Default Value setting.
Configuration Steps
- Navigate to the CMMS Configuration tab on the Settings page.
- Select a field with a String or Text Area data type.
- Enter one or more template variables in the field's Default Value.
- Save the configuration.
- When a work ticket is created, Virtual Facility replaces the variables with actual values before sending the work ticket to the CMMS.
Example
Template Configuration
This work order was auto-generated by Virtual Facility.
Work Ticket:
{{workTicketUrl}}
Objective:
{{workTicketObjective}}
Problem Details:
{{workTicketProblemDetails}}
Alarm Information:
{{listOfAlarmDetails}}
Rendered Result
This work order was auto-generated by Virtual Facility. Work Ticket: https://app.vfacility.com/... Objective: Resolve "zed Flow High" Problem Details: Some problem details to relay to the technician Alarm Information: Alarm ID: A48375 Text: RB Rm 238D GX Flow Hi Alarm 03/28/2023 06:05 PM
In-app Example
Commonly Used Template Variables
Work Ticket Information
| Variable | Description |
{{workTicketId}} |
Virtual Facility work ticket ID |
{{workTicketUrl}} |
Direct link to the work ticket in Virtual Facility |
{{workTicketObjective}} |
Work ticket objective |
{{workTicketProblemDetails}} |
Work ticket problem details |
{{workTicketDueAt}} |
Due date/time in ISO format |
{{workTicketDueAtDate}} |
Due date in YYYY-MM-DD format |
{{workTicketDueAtTime}} |
Due time in local timezone |
Alarm Information
| Variable | Description |
{{alarmName}} |
Alarm name |
{{alarmNameUIDisplay}} |
User-friendly alarm name |
{{alarmPriority}} |
Alarm priority |
{{alarmShop}} |
Alarm shop value |
{{alarmCategory}} |
Alarm category |
{{listOfAlarmDetails}} |
Detailed alarm list including ID, text, and time |
{{listOfAlarmText}} |
Alarm texts only |
Building and Equipment Information
| Variable | Description |
{{listOfBuildings}} |
Unique building values from associated alarms |
{{listOfEquipment}} |
Unique equipment values from associated alarms |
Date and Time Variables
These variables automatically calculate values when the work ticket is created.
| Variable | Description |
{{currentDateTime}} |
Current date and time |
{{currentDate}} |
Current date |
{{currentTime}} |
Current local time |
{{currentTimeUTC}} |
Current UTC time |
{{currentDateTimePlus24Hours}} |
Current date/time plus 24 hours |
{{currentDatePlus24Hours}} |
Current date plus 24 hours |
{{currentDateTimePlus72Hours}} |
Current date/time plus 72 hours |
{{currentDatePlus72Hours}} |
Current date plus 72 hours |
{{currentDateTimePlus720Hours}} |
Current date/time plus 720 hours |
{{currentDatePlus720Hours}} |
Current date plus 720 hours |
Example
To automatically set a target date three days in the future:
Target Completion Date:
{{currentDatePlus72Hours}}
Rosie Context Variables
If Rosie-generated context is available, the following variables can be included:
| Variable | Description |
{{summary}} |
Rosie-generated summary |
{{additionalContext}} |
Additional Rosie context |
Source Field Variables
Template variables can also reference source alarm fields.
Example
{{sourcePointName}}
SOURCE_POINT_NAME is exposed as the template variable sourcePointName. Dynamic source variables are generated using camelCase naming.Custom Work Ticket Objective Templates
Virtual Facility includes a Custom Work Ticket Objective setting that automatically populates the work ticket objective field during ticket creation. Administrators can configure a reusable objective template using supported variables.
{{alarmName}}
{{alarmNameUIDisplay}}
{{alarmPriority}}
Example
Investigate {{alarmNameUIDisplay}} alarm. Priority: {{alarmPriority}
Investigate RB Rm 238D GX Flow Hi Alarm. Priority: Highest
Best Practices
Provide Context for Technicians
Include work ticket links and alarm details whenever possible:
{{workTicketUrl}}
{{listOfAlarmDetails}}
Use Dynamic Due Dates
Set due dates relative to the creation time rather than hardcoding dates:
{{currentDatePlus72Hours}}
Keep Templates Readable
For large descriptions, use Text Area fields and separate sections clearly:
Objective:
{{workTicketObjective}}
Problem Details:
{{workTicketProblemDetails}}
Alarm Information:
{{listOfAlarmDetails}}
Use the Newline Variable
The {{newline}} variable can be used to insert configured line breaks when building multi-line text templates.
Troubleshooting
Variable Is Not Being Replaced
Verify that:
- The field is configured as a String or Text Area field.
- The variable name matches a supported variable exactly.
- The variable is enclosed in double curly braces.
Example
✅ Correct
{{workTicketUrl}}
❌ Incorrect
{workTicketUrl}
{{workticketurl}}