Skip to main content
Cartegraph Campus

Automation Example: Preventative Maintenance Based on Usage

You must have administrator rights to access this feature.

This feature requires a Cartegraph OMS license.

For each asset that you want to run preventative maintenance based on usage, additional fields that are needed. You need to create a set of automations for each asset.

While you can use any field name you want, do not use built-in reserved field names like Usage. This causes issues in Cartegraph and you are required to delete and recreate that field to fix the issue.

Set Required Fields

First you need to add fields in various places in Cartegraph.

On the Asset

  • Current usage
  • Last PM usage
  • PM interval
  • Last PM date
  • PM date interval (in months)

On the Task

  • Current usage

On the Inspection Child Record on the Asset*

  • Current Usage

*If you want to collect the data via inspection

Copy Current Usage to the Asset

When the inspection is completed, update the task. When the task is closed, update the asset. Or you can update the asset directly after the inspection has been completed.

  1. Click iAdministration_sm.png>Automation Manager.
  2. Click Create Automation.
  3. Select the Create or edit records after a child record is created or edited trigger. Extend your trigger to check if the inspection is completed.
    AutoMgrEx WaterMotorInspection.png
  4. Update the task, get the task record so we can get the asset record, update the Record Hours field on the asset, and save.
    AutoMgrEx Actions.png

Create the Preventative Maintenance Tasks

With this example, you can get a bit creative. You can easily turn this into a scheduled automation that runs nightly. In this example, we are going to have it trigger automatically.

  1. Click iAdministration_sm.png>Automation Manager.
  2. Click Create Automation.
  3. Select the Create or edit records after an asset is edited trigger and extend that trigger by using this filter.
    AutoMgrEx ExtendTrigger.png
  4. We are first going to see if the current usage is greater than the last preventative maintenance usage + the preventative maintenance interval; if that condition is not met, then we compare the last preventative maintenance date to today and see how that compares to the time interval specified. If either condition is met, then we create a preventative maintenance task.
    AutoMgrEx NestedBlocks.png
  5. Drag a Condition block to the center of the screen. In this block, we need to see if the current usage is greater than or equal to the last preventative maintenance usage + the preventative maintenance usage interval (shown here as Usage Period).
    AutoMgrEx TitleUsageLastPM.png
  6. We could just create the preventative maintenance task here, but you might end up getting lots of extra preventative maintenance tasks. So first we add an Aggregate block to look for open preventative maintenance tasks.
    AutoMgrEx AggregateblockCountTask.png
    AutoMgrEx IfStatusIsNotCanceled.png
  7. Add a Condition block to check to see if an open Preventative Maintenance task already exists.
    AutoMgrEx PMTask doesnt already exist.png
  8. Create your preventative maintenance task within that condition block.

  9. Below the first condition block, add another condition block (see the image in step 4).
    AutoMgrEx AnotherConditionBlock.png

This condition checks the opposite of the first condition so it only processes if it does not fall into the other condition.

  1. Nested in that block, add another Condition block.
    AutoMgrEx TodayLastPMDateTimeInterval.png

This condition compares the number of months between the last preventative maintenance date and today. If it is greater than or equal to the number of months, then it runs the blocks within it.

  1. From here, just like in the first condition block, we check to see if there are any open preventative maintenance tasks and create a new one if one does not exist. Repeat steps 6, 7, and 8 to accomplish that.

    Save the automation and test it by manually adjusting the fields on the asset and testing each possibility. Email blocks are embedded in the automation so you can get an email when it hits a certain point in the automation. If you don’t get an email, look at the log to troubleshoot.

Update the Asset From the Preventative Maintenance Task

This example just updates the asset’s preventative maintenance details so the system knows when it was last completed.

  1. Click iAdministration_sm.png>Automation Manager.
  2. Click Create Automation.
  3. Select the Create or edit records after a task is edited trigger and expand the trigger using the following settings:
    AutoMgrEx IfAssetTypeIsWaterMotor.png

The Status Is Completed and Status (initial value) Is Not Completed conditions allow the automation to only run once when the task is closed.

  1. Select the Update Record block to update your fields.

  • Was this article helpful?