Before you begin
Plans: Enterprise only
Audience: Administrators
Completion notes provide critical information for an asset's work order history and for understanding how an issue was resolved. Although completion notes aren't a mandatory field, this workflow can help you enforce their usage by reminding users to fill them out and preventing work orders from being closed without them.
Configuration overview
Goal
Reopen work orders without completion notes and remind users to provide them.
Trigger
Type | What it does |
---|---|
Field was changed to a specific value | Fires whenever a work order is closed (i.e. its status is changed to the one you select in this trigger) |
Activities
Type | What it does |
---|---|
Run separate activities based on an if/else condition |
This is the condition activity where you specify what the workflow looks for when it's triggered. In this case, it's checking whether the work order is missing completion notes. When the condition is met (i.e. when the work order doesn't have completion notes), the next two activities occur. There are no activities if the condition is not met (i.e. when the work order has completion notes). |
Send a notification to a user(s) or group(s) |
This is the first sub-activity that occurs when the condition is met (i.e. when a work order doesn't have completion notes). It sends a notification to the users you specify to let them know that the work order was closed without any completion notes. |
Update a selected field value within a defined object |
This is the second sub-activity that occurs when the condition is met (i.e. when a work order doesn't have completion notes). It reopens the work order by changing its status to whichever one you select in the activity. |
Steps
- Go to Settings > Workflows.
- Click New:
- Enter a name for your workflow.
- In the I would like to section, select Run separate activities based on an if/else condition:
- In the Every time that a section, select Field was changed to a specific value:
- Click OK.
- To configure the trigger:
- Click the Trigger tab:
- In the Field drop-down list, select Work Order - Work Order Status id:
- In the Value drop-down list, select the status your organization uses for closed work orders (e.g. Closed, Completed):
- Click OK.
This closes the workflow, which is necessary to apply your trigger settings before moving on to the next step.
- Click the Trigger tab:
- To configure the condition:
- Click the workflow to open it again.
- In the Activities tab, click the activity that was created automatically based on the option you selected in step 4:
- In the Condition field, enter the following code to have the activity check whether the work order is missing completion notes:
rec.getColumnValue('strCompletionNotes') is null
- To configure the sub-activity that sends the notification:
- In the Execute these activities when the condition is true section, click the + button:
- Enter a name for the activity.
- Select the Send a notification to user(s) or group(s) option:
- Click OK.
- In the Recipients field, select the users you want to send the notification to.
- In the Subject field, enter the subject you want to use for the notification (e.g. "Missing completion notes").
- In the Body field, enter the following HTML:
<p> The following work order was closed without completion notes: </p>
<ul>
<li><b>WO Code</b>: <ma:expr expr="rec.strCode"/></li>
<li><b>Description</b>: <ma:expr expr="rec.strDescription"/></li>
<li><b>Priority</b>: <ma:expr expr="rec.findRelatedRecord('intPriorityID').strName"/></li>
<li><b>Maintenance Type</b>: <ma:expr expr="rec.findRelatedRecord('intMaintenanceTypeID').strName"/></li>
</ul> - If you want to see what the message will look like, click Preview. There may be some slight formatting differences between the preview and the actual notification email.
- Click OK:
- In the Execute these activities when the condition is true section, click the + button:
- To configure the sub-activity that reopens the work order:
- In the Execute these activities when the condition is true section, click the + button:
- Enter a name for the activity.
- Select the Update a selected field value within a defined object option:
- Click OK.
- In the Field drop-down list, select Work Order Status id:
- In the Value drop-down list, select the status you want to change the work order to (e.g. Open):
- Click OK.
- In the Execute these activities when the condition is true section, click the + button:
- Click OK:
- To activate the workflow, switch the status toggle to Active:
- Click OK.
Once your workflow is activated, you may want to test it by closing a work order without completion notes and validating that the workflow ran successfully. To learn more, see Monitor workflow activity.