Loading
Agentforce Field Service and Operations
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Guidelines for Generating Work Orders from a Maintenance Plan

          Guidelines for Generating Work Orders from a Maintenance Plan

          Field Service maintenance plans offer a quick way to automate the creation of work orders for periodic maintenance visits. Learn how to generate work orders from a maintenance plan.

          Required Editions

          Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience
          The Agentforce Field Service and Operations core features, managed package, and mobile app are available in Enterprise, Unlimited, and Developer Editions.
          User Permissions Needed
          To create work orders from maintenance plans

          Create, view, and edit on Service Appointments, Work Orders, and Work Order Line Items

          View and edit on Maintenance Plan, Maintenance Work Rules, and Maintenance Assets

          AND

          View on Assets

          To view, create, and update recordset filter criteria

          View, create, and edit on Service Appointments, Shifts, Recordset Filter Criteria, and Recordset Filter Criteria Rules

          AND

          Delete on Recordset Filter Criteria and Recordset Filter Criteria Rules

          View access on the Source Object, Filtered Object, and Filtered Object fields

          Note
          Note Refer to Guidelines for Working with Maintenance Work Rules for details on how work orders are generated from maintenance work rules.

          How Many Work Orders Are Generated at a Time?

          Maintenance plan work orders are generated in batches. The number of work orders in a batch is based on several maintenance plan settings:

          • Generation timeframe: determines how far into the future work orders are generated
          • Frequency: determines the amount of time between work order dates
          • Number of maintenance assets: work order is created per asset, per suggested maintenance date

          For example, with a generation timeframe of 1 year, a frequency of 2 months, and two maintenance assets, one batch contains 14 work orders that cover 1 year’s worth of maintenance visits. Work orders are also generated for the final day of the timeframe. If the generation timeframe is 1 year and the Date of the first work order in the next batch is January 1, 2020, work orders are also generated for January 1, 2021.

          Note that the Work Order Number field might not correspond sequentially with the Suggested Maintenance Date field. For more information, refer to the Work Order developer documentation.

          How Do I Generate Work Orders?

          You can manually generate each batch of work orders or choose to have a new batch generated automatically. If frequent changes are needed after each visit, manual generation gives you more control. Automatic generation provides the assurance that you’re delivering the maintenance you promised to your customer.

          Both methods allow you to customize batch generation timing using Generation Horizon (Days) or select Generate new batch upon completion. For details, see Maintenance Plan Fields.

          Note
          Note If Generate new batch upon completion is selected, a new batch of work orders isn’t generated for a maintenance asset until the final work order for that asset in the current batch is completed. If one maintenance asset’s final work order is completed but another’s is stalled, work orders are generated only for the first maintenance asset. This behavior results in a staggered batch generation schedule for the maintenance plan.

          To manually generate work orders from a maintenance plan:

          • Confirm that Auto-generate work orders isn’t selected.
          • Click Generate work orders. When the Work order generation status on the maintenance plan changes to Complete, the generated work orders appear in the Work Orders related list.
          • When creating a maintenance plan, maintenance asset, or maintenance work rule, enter a Next Suggested Maintenance Date that starts in the future (starting tomorrow).
          • If the maintenance work rules date of the first work order in the next batch is earlier than the current date minus the generation time frame, the update Next Suggested Maintenance Date to fall into the eligible date range.
          • If the Next Suggested Maintenance Date is outside the eligible generation window, adjust that date to align with the date of generation to yield expected results. For example, if you expect work orders to be created on a specific date of the month, ensure that the Next Suggested Maintenance Date is within the eligible generation window.

          To turn on automatic generation, select Auto-generate work orders.

          If Auto-Generation Is Turned On, When Is a New Batch Generated?

          When you’re using maintenance plans without maintenance work rules:

          • If the maintenance plan includes assets, a new batch is generated for each maintenance asset on the maintenance asset’s Date of the first work order in the next batch.
          • If the maintenance plan doesn’t include any assets, a new batch is generated on the maintenance plan’s Date of the first work order in the next batch.

          When you’re using maintenance plans with maintenance work rules, the maintenance plan gets picked up regardless of the next suggested maintenance date on the maintenance plan or the maintenance asset.

          To further customize batch generation timing, specify a Generation Horizon (Days) or select Generate new batch upon completion. For details, see Maintenance Plan Fields.

          Can I Get a Report of the Work Orders Generated?

          To receive a Chatter post detailing the work orders, work order items, and service appointments generated for each maintenance plan, see the following topics:

          How Do Generation Methods Work?

          Generation methods can help simplify dispatch by combining work for the same day into a parent work order with a work order line item for the relevant asset covered by the maintenance plan. Also, you can choose to create a service appointment for the work order or suite work order line item.

          On a maintenance plan, select your generation method preferences.

          • Choose whether to create one work order or one work order line item for each maintenance asset. Where you have maintenance work rules on a maintenance asset, it means one work order or one work order line item for each maintenance work rule.
          • If you select One work order line item per asset, choose whether to create a service appointment for each work order or each work order line item.

          To ensure that all assets with the same suggested maintenance date are maintained under one work order, select One work order line item per asset. If each asset needs a separate service appointment, select One service appointment per work order line item.

          When One work order line item per asset is set, a work order line item is generated for each relevant asset and maintenance work rule. All work order line items sharing Next Suggested Maintenance Date are grouped under a work order.

          Note
          Note To provide guidance on which asset to service first, second, and so on, create guided actions, or flows, in the parent work order.

          If Work Order Generation Method is left as None, the generation is defaulted to one work order per asset.

          Work Order Generation MethodService Appointment Generation MethodResult
          One work order per assetOne work order line item per assetOne service appointment per work orderOne service appointment per work order line item
          selected   invalid invalid

          If Work Order Generation Method is set to One work order per asset, you can’t set a Service Appointment Generation Method.

          Each asset and relevant maintenance work rule creates a work order. If a work type is associated with auto-create service appointment enabled, a service appointment is created for each work order.

          Example: A maintenance plan with four assets, a generation time frame of 6 months, and a frequency of 1 month produces:

          • Four work orders a month, 24 work orders for 6 months.
          • A service appointment for each work order, if the auto-create service appointment is enabled on an associated work type.
            selected    

          Invalid: If Work Order Generation Method is set to One work order line item per asset, you must select a Service Appointment Generation Method.

            selected selected  

          One parent work order is created, a work order line item is created for each asset and relevant maintenance work rule, and one service appointment is created for the parent work order, even if the associated work type doesn’t have auto-create service appointment enabled.

          The exception is when the maintenance plan lacks any associated maintenance assets and solely has a plan-level maintenance work rule. In this scenario, the generation method is disregarded, and only a single work order is created. However, if the Auto-create service appointment option is enabled, a service appointment is created for the parent work order.

          Example: A maintenance plan with four assets, a generation time frame of 6 months, and a frequency of 1 month produces:

          • One work order each month, six work orders for 6 months.
          • Four work order line items on each work order.
          • A service appointment for each parent work order, 1 per month, and six work orders for 6 months.
            selected   selected

          One parent work order is created, a work order line item is created for each asset and relevant maintenance work rule, and if the associated work type has auto-create service appointment enabled for work order line items, one service appointment is created for each work order line item.

          Example: A maintenance plan with four assets, a generation time frame of 6 months, and a frequency of 1 month produces:

          • One work order each month, six work orders for 6 months.
          • Four work order line items on each work order.
          • If auto-create service appointment for work order line item is enabled on the work type, a service appointment for each work order line item, four service appointments per month, 24 work orders for 6 months.

          Why Aren’t Service Appointment Due Dates Following Maintenance Plan Settings?

          When a service appointment is created for a generated work order, the work type Due Date Offset overrides the due date set by the maintenance plan.

          To avoid this override, create two work types, one for non-maintenance plan service appointments and another for maintenance plan service appointments. Leave the Due Date Offset empty in the work type for maintenance plan service appointments. For example, create a Site Survey work type with a Due Date Offset of 5 days and Site Survey - Maintenance Plan with Due Date Offset left empty.

          How Are Addresses Added to Work Orders?

          You can automatically add an address to the work orders in an org. The address on the work order is then automatically added to any resulting service appointments. To determine the address, the work order or work order line item looks for an address to add in this order: the asset address, the visitor address on the asset's location, and then the shipping address on the maintenance plan account.

          The address field on the work order or work order line item is populated only if:

          • The Populate Address for Work Orders or Work Order Line Items permission is selected in Field Service Settings.
          • The maintenance plan uses maintenance work rules.
          • The generation method isn’t one work order line item per asset, and the service appointment isn’t one service appointment per work order.

          Before you select this option, review the addresses for your assets, locations, and accounts. Make sure that the City and State fields are specified. Clean up the addresses so that they’re consistent with your maintenance plan conventions. For example, if all assets have an address or location address and use 1asset1WOLI and 1SA1WOLI, make sure all assets under the same maintenance plan have the same address or location address.

          How is the Work Order Subject Created?

          The work order Subject field consists of the Suggested Maintenance Date and the Asset or Account fields from the maintenance plan. The subject is formatted as follows:

          Maintenance <Asset/Account/Empty>: <Suggested Maintenance Date>

          Where <Asset/Account/Empty> is based on the following precedence:

          • If the asset field is available, it takes precedence and is used. 
          • If the asset field isn’t available, the account field is used.
          • If the asset or account fields aren't available, the section is left empty.

          How Do I Change Generation Methods or Maintenance Schedules After Work Orders Are Generated?

          If your maintenance plans have work orders or work order line items associated with them, changing their generation schedule on the maintenance asset or in the maintenance work rules isn’t recommended. To change maintenance plan generation frequencies, either delete the incomplete work orders and regenerate them. Or set an end date to expire the current maintenance plan and create one with the appropriate generation method and recurrences.

           
          Loading
          Salesforce Help | Article