Start tracking your progress
Trailhead Home
Trailhead Home

Create Maintenance Plans

Learning Objectives

After completing this unit, you’ll be able to:
  • Create maintenance plans to automate periodic maintenance visits for customers.
  • Generate work orders from a maintenance plan.
  • Describe the difference between automatic and manual work order generation.

What Are Maintenance Plans?

Ursa Major Solar’s customers are loving their new solar panel systems (the lower energy bills don’t hurt either). However, Sita the CEO knows that her work isn’t over when a system is installed. Solar panel systems work best when they’re checked regularly by a knowledgeable field service technician. To ensure that any issues are nipped in the bud, Ursa Major provides one year of monthly preventive maintenance visits following a solar panel system installation. But who’s going to create all of the work orders for those monthly visits?

Enter maintenance plans! A maintenance plan lets you define the maintenance schedule for one or more assets and generate a batch of work orders for future maintenance visits. With the click of a button, all the work orders for a solar panel system’s monthly maintenance visits can be ready to go. Sita can’t wait to try it.

Set Up a Maintenance Plan

Now that things have finally settled down on the roof of DreamHouse Realty, let’s create a maintenance plan to provide one year of monthly maintenance visits for their Solar Panel System 7000 asset.

  1. Start by creating a work type that the maintenance plan’s work orders will use. Work types are templates with predefined settings for work orders and work order line items. You might remember them from the Field Service Center Customization module.
    Important

    Important

    Don’t see a field that’s mentioned in this unit? Go to the Object Manager in Setup and add it to the Maintenance Plan page layout.

    1. From the App Launcher, select Work Types.
    2. Click New and enter the following details:
      • Work Type Name: Solar Maintenance
      • Estimated Duration: 1
      • Duration Type: Hours
      • Auto-Create Service Appointment: Checked

      You can also add required skills, required products, and knowledge articles to work types to streamline your field service jobs, but we’ll keep it simple for now.

      New work type window with fields completed
    3. Leave the rest of the fields blank, and click Save.
  2. Create a maintenance plan for DreamHouse Realty’s solar panel system.
    1. From the App Launcher, select Maintenance Plans.
    2. Click New and enter the following details.
      • Work Type: Solar Maintenance
      • Account: DreamHouse Realty
      • Start Date: 1st of the next month
      • End Date: One year after the start date. The start and end date indicate when the asset is eligible for maintenance.
      • Work Order Generation Method: One work order per asset. Choosing this work order generation method means that one work order is created for each asset in the maintenance plan. The other option is One work order line item per asset, which creates a single parent work order for every asset.
      • Generation Horizon (Days): 3. The number of days before the next suggested maintenance date that a new batch of work orders is automatically created for an asset.
      • Frequency: 1
      • Frequency Type: Months. The frequency is the amount of time between the plan’s work orders.
      • Generation Timeframe: 2
      • Generation Timeframe Type: Months. The generation timeframe controls how far in advance work orders are created. In this case, work orders will be generated two months ahead. You might set a small generation timeframe if you’re concerned about the contractual terms changing.
      • Maintenance Window Start (Days): 3
      • Maintenance Window End (Days): 3. The maintenance window represents the range of days in which a work order can be scheduled. In this case, each associated service appointment’s Earliest Start Permitted and Due Date will be 3 days before and 3 days after its work order’s Suggested Maintenance Date.
      • Date of the first work order in the next batch: Same as the Start Date. This represents the suggested date of service, and corresponds to the Suggested Maintenance Date on the maintenance plan’s earliest work order. The Suggested Maintenance Date on later work orders is determined by the frequency settings.
      • Maintenance Plan Title: One Year Solar Maintenance
      New maintenance plan window with fields completed
    3. You can leave the rest of the fields blank, and save your changes. To learn more about the other fields, see Maintenance Plan Fields.
Tip

Tip

Since maintenance plans are often used to carry out terms in a service contract, you can link a maintenance plan to a service contract using the Service Contract lookup field. This field is only visible if entitlement management is enabled.

Well done! You’ve defined DreamHouse Realty’s preventive maintenance schedule. Now let’s associate the maintenance plan with the asset that it’s meant to cover.

Add Maintenance Assets

You can associate a maintenance plan with one or more assets by creating maintenance assets, which are records that represent the relationship between the asset and the plan. When you add maintenance assets to a plan, a few neat things happen:
  • For each maintenance date, one work order is created per maintenance asset. So if your plan covers three assets and provides for monthly maintenance visits, three work orders would be created for each month of maintenance.
  • Maintenance assets inherit their maintenance plan’s work type, but you can choose a different work type for the maintenance asset if needed. For example, if you want a particular asset’s work orders to include a required product, you can create a special work type for that maintenance asset.
  • Maintenance assets inherit their maintenance plan’s Date of the first work order in the next batch, but you can update it on the maintenance asset if needed (for example, if the customer has asked for a visit to be postponed). This field auto-updates on each maintenance asset whenever a new batch of work orders is generated.
Let’s add DreamHouse’s solar panel system to their maintenance plan.
  1. From the One Year Solar Maintenance maintenance plan, click New in the Assets related list.
  2. In the Asset field, select Solar Panel System 7000.
  3. Leave the Work Type and Date of the first work order in the next batch fields blank. They auto-populate when you save.
    New maintenance asset window with fields completed
  4. Save your changes. Your plan now covers one customer asset!

Now let’s move on to the real time-saver: generating work orders!

Generate Work Orders

Let’s generate our first batch of work orders for DreamHouse Realty’s monthly maintenance visits.

  1. From the dropdown action menu on the One Year Solar Maintenance maintenance plan, click Generate Work Orders.
    Generate Work Orders action in the maintenance plan action dropdown menu
  2. Dismiss the message, and check the Work Orders related list on the maintenance plan.

Boom! The first batch of work orders has arrived. Let’s observe some of the magic that took place.

Work orders related list on maintenance plan with three work orders
  • (1) The work orders are automatically associated with the maintenance asset.
  • (2) The first work order’s Suggested Maintenance Date matches the maintenance plan’s Date of the first work order in the next batch.
  • Because the generation timeframe is 2 months, work orders were created only for the 2 months following the Date of the first work order in the next batch.
Work order with one service appointment and Generated from maintenance plan selected
  • (3) Because Auto-Generate Service Appointment is selected on the work type, each work order already comes with a service appointment. The work orders and their service appointments inherited the work type’s date and duration settings. (The related lists and fields on your page layout may look different than the screenshot here.)
  • (4) On each work order, Generated from maintenance plan is selected.

The maintenance asset’s Date of the first work order in the next batch has also auto-updated to 1 month after the Suggested Maintenance Date of the latest work order. This way, things are all set for the next batch.

Sure, clicking that Generate Work Orders button feels good. But who wants to click a button when Salesforce can click it for you? You can choose to have a new batch of work orders generated automatically whenever the current batch is completed. This saves you from having to remember to generate a new batch, and gives you the assurance that you’re coming through on the promises you made to your fabulous customer.

Let’s turn on auto-generation for our maintenance plan. (You can do this when you’re creating the maintenance plan so you never have to click Generate Work Orders.)

  1. From the dropdown action menu on the One Year Solar Maintenance maintenance plan, click Edit.
  2. Select Auto-generate work orders.
  3. In Generation Horizon (Days), enter 10.
  4. Save your changes.
These updates mean that a new batch of work orders will be generated 10 days before the Date of the first work order in the next batch listed on the maintenance asset. So if the maintenance asset’s date is August 1, a new batch of work orders will show up in the Work Orders related list on July 22. Pretty spiffy, right? You can rest easy knowing that work orders will be auto-generated until the maintenance plan’s End Date is reached.
Note

Note

If you select Generate new batch upon completion, a new batch isn’t generated until the latest existing work order is completed. Otherwise, new batches are generated regardless of the status of existing work orders.

Whew! Pat yourself on the back: You’ve earned the lofty title of Maintenance Master, and DreamHouse Realty’s solar panel system is in good hands. Now let’s test your understanding of maintenance plans.
retargeting