---
schema_version: "1"
id: 27780fc23c96cd9212982bf9cefcb057b52248c730b2106864643db500e6c5fa
title: Fill Schedule Gaps in Field Service
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/pfs_fill_schedule.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.pfs_fill_schedule.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: bb3daa138204644d7ef0ddc705a90338dc17791a43071083eff2a7e5e77dd7e1
description: Field Service provides many tools to fill gaps in a service resource’s schedule. One such tool is the Fill-In Schedule feature, which feature creates a list of appointments for a mobile worker and finds the optimal schedule.
products:
  - Field Service
release: "264"
---
# Fill Schedule Gaps in Field Service

Field Service provides many tools to fill gaps in a service resource’s schedule. One such tool is the Fill-In Schedule feature, which feature creates a list of appointments for a mobile worker and finds the optimal schedule.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">The Agentforce Field Service and Operations core features, managed package, and mobile app are available in <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions.</td></tr></tbody></table>

![Package icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_field_service-264-0-0-production-enus/3f7dceb9-dd70-454a-b49e-bbb4526a158d/support_field_service/images/fs_package.png) _This is a Field Service managed package feature._

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_field_service-264-0-0-production-enus/3f7dceb9-dd70-454a-b49e-bbb4526a158d/images/icon_note.png)

Note When you’re using Enhanced Scheduling and Optimization, the Fill-In Schedule feature isn’t available. However, newer and more powerful features are available. These features include Sliding, Resource Schedule Optimization (RSO), and In-Day Optimization. You can also [Fill Gaps in a Service Resource's Schedule with Agentforce](https://help.salesforce.com/s/articleView?id=service.pfs_copilot_dispatcher_filling_gaps.htm&release=264.0.0&type=5 "Quickly and easily fill gaps in your resource’s schedules caused by schedule changes such as cancellations, no-shows or early task completion. With Agentforce, the AI agent recommends appointments to fill these gaps according to your business rules and objectives, and schedules the appointment you choose. Freeing up time for you to work on more complex tasks while ensuring your resources' schedules remain full.").

## Customize Fill-In Schedule Settings

1. From the App Launcher, find and open the **Field Service Admin** app, and then click the **Field Service Settings** tab. Then, click **Scheduling** | **Dynamic Gantt**.
2. Under **Fill-In Schedule**, configure the following settings.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d155580e122">Setting</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d155580e125">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Setting" class="slds-cell-wrap" style="vertical-align:top;" headers="d155580e122 ">Service Appointment Candidate Boolean field</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d155580e125 ">Select any standard or custom checkbox field, including formula fields. This field
              must be selected (set to True) for an appointment to be a candidate in fill-in
              scheduling.</td>

          </tr>
          <tr class="">
            <td data-label="Setting" class="slds-cell-wrap" style="vertical-align:top;" headers="d155580e122 ">Work Order Candidate Boolean field</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d155580e125 ">Select any standard or custom checkbox field, including formula fields. If a service
              appointment’s parent record is a work order, this field must be selected (set to True) for
              the appointment to be a candidate in fill-in scheduling.</td>

          </tr>
          <tr class="">
            <td data-label="Setting" class="slds-cell-wrap" style="vertical-align:top;" headers="d155580e122 ">Work Order Line Item Candidate Boolean field</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d155580e125 ">Select any standard or custom checkbox field, including formula fields. If a service
              appointment’s parent record is a work order line item, this field must be selected (set to
              True) for the appointment to be a candidate in fill-in scheduling.</td>

          </tr>
          <tr class="">
            <td data-label="Setting" class="slds-cell-wrap" style="vertical-align:top;" headers="d155580e122 ">Order candidate appointments by</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d155580e125 ">
              <ul>
                <li><strong class="uicontrol">Priority</strong>: Sort candidates based on their priority field, which
                  is set in <span class="menucascade"><strong class="uicontrol">Scheduling</strong> | <strong class="uicontrol">General Logic</strong></span> . Distance is a secondary consideration.</li>

                <li><strong class="uicontrol">Distance</strong>: Sort candidates based on their proximity to the
                  previous appointment, or if it’s the first appointment of the day, on their proximity to
                  the mobile worker’s home base. After an appointment is scheduled, its location is used to
                  calculate distance. Priority is a secondary consideration.</li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="Setting" class="slds-cell-wrap" style="vertical-align:top;" headers="d155580e122 ">Max appointments to schedule</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d155580e125 ">When searching for nearby appointments, the scheduling engine ends its search after
              finding this many candidate appointments. The maximum is 50 appointments.</td>

          </tr>
          <tr class="">
            <td data-label="Setting" class="slds-cell-wrap" style="vertical-align:top;" headers="d155580e122 ">Max runtime (seconds) </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d155580e125 ">The scheduling engine spends this many seconds searching for nearby service
              appointments. The maximum is 60 seconds. The search ends after either the max runtime or max
              appointments to schedule be reached.</td>

          </tr>
        </tbody>
      </table>

## Considerations

- Fill-In Schedule only schedules appointments for the given day, which is the first day shown on the Gantt.
- By default, the Is Fill In Candidate field on service appointments, work orders, and work order line items is selected. This means that all service appointments are considered as candidates when filling in a schedule.
    
    You might want to limit which appointments are considered as candidates. For example, perhaps repair appointments require a phone booking before a mobile worker is sent to the site. To limit candidate appointments, try one of the following approaches.
    
    - Using Process Builder or an Apex trigger, set the value of the Is Fill In Candidate field to False if specified criteria aren’t met.
    - Create a checkbox formula field that evaluates whether a record is a candidate. Then, change the three settings that control which fields are evaluated when searching for candidates so that your custom field is considered instead of Is Fill In Candidate.
- If candidate appointments are sorted by distance, appointments without a geolocation are sorted last.
- Only unscheduled appointments or appointments that are scheduled on a future date are considered as candidates.
- When a service appointment is scheduled by Fill-In Schedule, the appointment’s Schedule Mode is set to **Automatic**.

#### See Also

- [Optimize Your Field Service Schedule](https://help.salesforce.com/s/articleView?id=service.pfs_optimization.htm&release=264.0.0&type=5 "Use schedule optimization to create an optimal schedule and help comply with service-level agreements while minimizing travel time, overtime, costs, and no-shows.")
- [Reschedule Service Appointments in Field Service](https://help.salesforce.com/s/articleView?id=service.pfs_rescheduling.htm&release=264.0.0&type=5 "Reschedule service appointments manually or let Field Service do it for you. Review the use cases to gain a better understanding of how the tools differ and which tool best suits your needs.")
- [Enable Service Appointment Sliding](https://help.salesforce.com/s/articleView?id=service.pfs_sliding_service_appointment.htm&type=5&language=en_US)
- [Optimize Today’s Field Service Schedule](https://help.salesforce.com/s/articleView?id=service.pfs_in_day_optimization.htm&type=5&language=en_US)
- [Optimize a Single Field Service Resource’s Schedule](https://help.salesforce.com/s/articleView?id=service.pfs_resource_optimization_user.htm&type=5&language=en_US)