Scenario:
Two ORs are triggered at the same time for two different Service Territories. The Service Resources in these territories have the following membership:
| Service Resource | Territory 1 (Primary) | Territory 2 (Secondary) |
| Service Resource A | Primary | Secondary |
| Service Resource B | Primary | Secondary |
Both ORs start simultaneously:
| Optimization Request | Target Territory | Start Time | Completion Time | Overlaps Created? |
| OR 1 | Territory 1 | 01:00 AM | 01:14 AM | No |
| OR 2 | Territory 2 | 01:00 AM | 01:28 AM | Yes |
The FSL optimization engine uses an optimistic concurrency model to process scheduled runs:
Data Snapshot: At the start of execution, each OR captures a point-in-time snapshot of all relevant resource availability and appointment data.
Isolated Execution: The optimization engine runs entirely against this frozen, isolated snapshot.
Commit Phase: Upon completion, the OR commits its scheduling results to the database without re-checking whether the underlying data changed during its execution window.
When OR 1 and OR 2 launch simultaneously, they capture an identical data snapshot. The first OR to finish (OR 1) successfully commits its valid assignments. However, when the second OR (OR 2) finishes, it writes changes based on its now-stale snapshot, inadvertently overwriting OR 1's allocations and creating overlapping appointments.
# Why Match Territory Does Not Prevent This:
Administrators often expect the Match Territory work rule to isolate territory optimization. While the rule behaves correctly, it governs policy scope rather than database transactions:
| Match Territory Behavior | Does it prevent this issue? |
| Restricts OR for Territory 2 to schedule Territory 2 SAs | Yes (Respected correctly) |
| Restricts OR for Territory 1 to schedule Territory 1 SAs | Yes (Respected correctly) |
| Prevents cross-territory SA assignments | Yes (Respected correctly) |
| Locks shared resources from concurrent OR processing | No (Outside the scope of this rule) |
| Refreshes resource availability mid-execution | No (Outside the scope of this rule) |
| Detects conflicts between concurrent running ORs | No (Outside the scope of this rule) |
The resulting overlap is not a policy violation or misconfiguration. It is a data race condition where two independent processes schedule the same physical resources into identical time windows.
Stagger the Optimization Request schedules for any Service Territories that share a pool of Service Resources.
Identify Overlaps: Map out all Service Territories that share the same Service Resources (Primary or Secondary).
Prioritize Primary Territories: Schedule the OR for the primary/high-priority territory to execute first.
Introduce a Buffer: Ensure there is sufficient separation between start times. Apply a buffer of 20–30 minutes after the typical completion time of the first OR before starting the next.
| Schedule Model | OR 1 (Territory 1) Start | OR 2 (Territory 2) Start | Result |
| Before (Problematic) | 01:00 AM | 01:00 AM | Race condition & overlapping appointments. |
| After (Recommended) | 01:00 AM | 01:30 AM | Clean execution. OR 2's snapshot captures OR 1's committed changes. |
By staggering the ORs, the second OR takes a snapshot that already reflects the first OR's committed changes, eliminating the race condition.
005387523

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.