Before you begin
Plans: Enterprise only
Audience: Administrators
This example shows a very basic workflow configuration that sends a notification whenever a work order's maintenance type is set to "Safety".
Unlike many of the other examples in this section of the help center, this workflow requires only one activity, with no loops or conditions. If you’re new to creating workflows, you might want to start with this one before moving on to the more complex examples.
Configuration overview
Goal
Notify users when a work order is assigned a specific maintenance type.
Trigger
- Type: Field was changed to a specific value
- What it does: Fires when a work order is assigned a specific maintenance type. This applies to both work orders being created and existing work orders whose maintenance type has been changed.
Activity
- Type: Send a notification to a user(s) or group(s)
- What it does: Specifies the content and recipients of the notification that is sent whenever the trigger fires
Steps
- Go to Settings > Workflows.
- Click New:
- Enter a name for your workflow.
- In the I would like to section, select Send a notification to a user(s) or group(s):
- 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 - Maintenance Type id:
- In the Value drop-down list, select the maintenance type you want to send notifications for (e.g. Safety):
- 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 activity:
- 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 Recipients drop-down list, select the users who should receive this notification.
- In the Subject field, enter a subject for the notification.
- In the Body field, enter the following HTML (replacing the word "Safety" with the appropriate maintenance type if necessary):
<p>The following work order has been assigned the Safety maintenance type:</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>Assigned to</b>: <ma:expr expr="rec.strAssignedUsers"/></li>
<li><b>Priority</b>: <ma:expr expr="rec.findRelatedRecord('intPriorityID').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:
- To activate the workflow, switch the status toggle to Active:
- Click OK.
Once your workflow is activated, you may want to test it by changing a work order's maintenance type and validating that the workflow ran successfully. To learn more, see Monitor workflow activity.
Adapting this workflow
You can adapt this workflow for a different maintenance type by:
- Selecting a different maintenance type in step 7c.
- Editing the HTML in step 8e to reference the other maintenance type. (e.g. change "Safety" to "Corrective")
You could also create multiple versions of this workflow if you want to notify users about more than one maintenance type. For example, if you wanted to notify users whenever a work order is assigned the Safety or the Corrective maintenance types, you would create two separate workflows (i.e. one for each maintenance type).