Minimize Gaps Service Objective
Use the Field Service Minimize Gaps objective to reduce idle time between service appointments and improve resource productivity.
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. |
This is a Field Service managed package feature.
This objective is supported only when you’re using Enhanced Scheduling and Optimization and only for the schedule, bulk schedule, in-day, and global optimization services.
Include the Minimize Gaps service objective in a scheduling policy to prefer scheduling service appointments consecutively and prevent schedule gaps. Use this objective to make sure service resources have a continuous block of service appointments rather than multiple idle times between appointments throughout the day.
This objective, which targets mainly healthcare companies that have part-time employees, lets them better manage employee schedules with back-to-back appointments for improved productivity. It also helps them avoid financial penalties from failing to comply with labor laws.
Typically, the engine schedules appointments as early as possible within a service resource’s availability while considering the time constraints defined in the Match Time Rule work rules, such as the Earliest Start Permitted and Due Date work rules. With this objective, if the resource has an assigned appointment later in the day, the engine first tries to schedule a new appointment at a later time so that the appointments are scheduled together. If that’s not possible, it schedules the appointment at the earliest available time within the resource’s availability.
For example, a healthcare company needs a nurse practitioner, whose operating hours availability is between 8:00 AM and 8:00 PM, to see four patients in one day. They prefer those appointments to be scheduled consecutively rather than spread out across the day. The nurse practitioner’s first scheduled appointment has an arrival window between 12:00 PM and 4:00 PM. The appointment is scheduled to start at 12:00 PM, the earliest time possible. The next appointment that needs to be scheduled has an arrival window between 8:00 AM and 12:00 PM. Without the Minimize Gaps objective, the engine schedules this appointment to start at 8:00 AM, the earliest time possible. With the objective, the engine schedules this appointment closer to the end of its arrival window, so it’s scheduled back-to-back with the first scheduled appointment, while taking travel time into account.
The time frame you define for the service appointment directly impacts whether schedule gaps are minimized when you use this objective. For example, if two appointments have a different arrival window, one between 8:00 AM and 12:00 PM and the other between 4:00 PM and 8:00 PM, the engine doesn’t schedule the appointments consecutively.
The Minimize Gaps objective also reduces the number of service resources dispatched to the field. For example, if a service appointment can be assigned to one of two service resources but one resource has no assigned appointments and the other has an assigned appointment, the engine schedules the appointment with the resource who already has an assigned appointment.
Because each company has a different definition of a gap, you must configure the minimum duration that your company considers a gap. A gap is considered idle time between service appointments. Travel time isn’t considered idle time. For example, let’s say you configured the minimum gap duration to 30 minutes. Your first appointment is scheduled from 8:00 AM to 9:00 AM, and your next appointment is scheduled to start at 10:00 AM. It takes 35 minutes to travel between these appointments. Because travel time isn’t considered idle time, the actual gap is 25 minutes, which is less than the minimum gap duration you configured. Therefore, the engine doesn’t minimize this gap. The gap remains.
When You’re Using Enhanced Scheduling and Optimization
When you’re using Enhanced Scheduling and Optimization, these limitations apply.
- This objective is supported only for the schedule, bulk schedule, in-day, and global
optimization services. It isn’t supported for these services.
- Book Appointments
- Drag and Drop
- Emergency Wizard
- Fix Overlaps
- Get Candidates
- Resource schedule optimization (RSO)
- This objective doesn’t support multiple flexible lunch breaks.
- This objective doesn’t support multiday service appointments.
When You’re Not Using Enhanced Scheduling and Optimization
This service objective isn’t supported.

