Loading

Field Service: GradeSlotsService Returns Incorrect Slot End Times for Complex Work with Dependent Appointments

Fecha de publicación: Jul 8, 2026
Descripción

When using FSL.GradeSlotsService.getGradedMatrix() with complex work that includes dependent appointments on a required resource, the scheduling engine returns time slots with correct start times but end times that extend to the shift boundary. The engine does not factor in busy blocks on required resources assigned to dependent appointments when calculating the slot end time. This is confirmed as by-design behavior.

When calling `FSL.GradeSlotsService.getGradedMatrix()` for a Service Appointment that is part of a complex work configuration with:

- A main appointment routed by skills and territory
- A concurrent dependent appointment ("Same Start" dependency) assigned to a required resource
- A preceding dependent appointment ("Immediately Followed By" dependency) assigned to the same required resource

The returned time slots show a correct start time that respects the required resource's first busy block, but the end time extends to the shift boundary instead of stopping at the next busy block.

**Example:** If the required resource is busy from 9:00 AM to 11:00 AM and again from 1:00 PM to 2:30 PM (with a shift ending at 5:00 PM), the API returns a single slot of 11:00 AM–5:00 PM. The expected result is two separate slots: 11:00 AM–1:00 PM and 2:30 PM–5:00 PM.

This behavior occurs regardless of:
- Whether Enhanced Scheduling Optimization (ESO) is enabled
- Whether "Use all-or-none scheduling for related appointments" is enabled or disabled
- Whether the ExactAppointment field is set to true on involved Work Types
- The Salesforce release version (reproduced on both Spring '26 and Summer '26)
- Whether the scheduling policy includes objectives or not

 

When using `FSL.GradeSlotsService.getGradedMatrix()` with complex work (dependent appointments), the scheduling engine calculates the slot end time based solely on the target Service Appointment's shift boundary. It does not factor in busy blocks on required resources assigned to other appointments in the dependency chain. This can result in slots that appear longer than the actual available window.

 

Solución

Expected Behaviour- When using `FSL.GradeSlotsService.getGradedMatrix()` with complex work (dependent appointments), the scheduling engine calculates the slot end time based solely on the target Service Appointment's shift boundary. It does not factor in busy blocks on required resources assigned to other appointments in the dependency chain. This can result in slots that appear longer than the actual available window.

Número del artículo de conocimiento

005388678

 
Cargando
Salesforce Help | Article