---
schema_version: "1"
id: 311cfeb8f2759621551fa2b46657852fc9c62607a6e91185644a9f57d302246a
title: Field Service Preventive Maintenance Data Model
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/field-service-dev/guides/field-service/source-files/fsl-dev-soap-maintenance.md
canonical_url: https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-soap-maintenance.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 266bcf6850c1204e9db3f3f7d7bea598358842cc55b979e7ddb796c1a125ff54
products:
  - Field Service Developer Guide
  - Service Cloud Developer Content
---

# Field Service Preventive Maintenance Data Model

Manage periodic maintenance with the help of maintenance plans, which define the maintenance schedule for specific assets. Maintenance plans typically reflect the terms in a customer’s service contract or entitlements.

**note:** Asterisks in the following diagram signify required fields.

A _maintenance plan_ can be linked to an _account_ and _contact_—representing the customer—and, if the customer has one, to a _service contract_.

A maintenance plan can cover multiple _assets_. For example, you can create a maintenance plan to track the monthly maintenance of 20 laser printers installed in a customer’s office building. The assets covered by a maintenance plan are represented as child records of the maintenance plan called _maintenance assets_. For more complex reoccurring maintenance, you can define _maintenance work rules_ for most assets and maintenance plans. With this feature you can, for example, set up a schedule for minor monthly maintenance and a major yearly service. You can also link a maintenance plan to a _location_ to indicate where the assets are installed. For example, link a plan to a location of the Site type that represents the office building where the printers are installed.

After you create a maintenance plan or maintenance work rules, it’s time to generate _work orders_ for the planned maintenance visits. Maintenance plans come with a Generate Work Orders quick action, which can also be called with Apex code. Your maintenance plan settings determine how many work orders and work order line items are generated at once and what their settings are. You can opt to generate one work order per maintenance asset for each visit, or a parent work order for each visit with one work order line item per maintenance asset.

Maintenance plans, maintenance assets, and maintenance work rules can be associated with a _work type_:

-   If you specify a work type on a maintenance plan, the plan’s work orders use that work type.
-   If you specify a work type on a maintenance asset, generated work orders that are associated with the maintenance asset use the maintenance asset’s work type.
-   If you specify a work type on a maintenance work rule, generated work orders that are associated with the maintenance work rule use the maintenance work rule’s work type.

![Maintenance diagram](https://developer.salesforce.com/media/field-service-dev/fsl_dev_maint.png)

**See Also**  


-   [Generate Work Orders on Maintenance Plans with Apex](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-code-samples-wo.md)

