# How do Maintenance Plans in Salesforce Field Service generate preventive maintenance Work Orders for assets?

**Topic:** Field Service · **Difficulty:** Medium · **Asked at:** Capgemini, Infosys, IBM · **Tags:** Maintenance Plan, Preventive Maintenance, Work Order, Asset

Read it on the site: https://www.forcechallenges.com/interview-questions/how-do-maintenance-plans-work-in-salesforce-field-service-for-preventative-maintenance

## Answer

**Maintenance Plans** automate recurring preventive visits for assets, so work is planned before equipment fails.

**Setup**
1. A **Maintenance Plan** defines the start date, frequency (for example every 6 months), generation timeframe and maintenance window.
2. **Maintenance Assets** attach the assets covered by the plan.
3. Optionally link a **Work Type** and a Service Contract.

**What happens**
- Salesforce generates **Work Orders** (with Service Appointments, if the Work Type auto-creates them) ahead of each due date.
- The maintenance window sets the Service Appointment's earliest start and due date, giving the scheduler flexibility.
- Dispatchers schedule them like any other job.

```soql
SELECT Id, WorkOrderNumber, Subject, Status, AssetId
FROM WorkOrder
WHERE MaintenancePlanId != null
AND Status = 'New'
ORDER BY CreatedDate DESC
```

**Benefits:** fewer breakdowns, steadier technician workload, longer asset life and a repeatable revenue stream.

---
Source: ForceChallenges · last updated 2026-10-31
