# Explain the difference between Global Optimization and In-Day Optimization in SFS.

**Topic:** Field Service · **Difficulty:** Hard · **Asked at:** PwC, Slalom, Salesforce · **Tags:** Field Service, Optimization, Scheduling

Read it on the site: https://www.forcechallenges.com/interview-questions/explain-the-difference-between-global-optimization-and-in-day-optimization-in-sfs

## Answer

#### 1. Architectural Overview & Core Concepts
Global Optimization and In-Day Optimization serve distinct phases of dispatch operations. **Global Optimization** runs batch calculations over a broad time horizon (e.g., overnight or weekly) to optimize entire regional schedules, minimize total travel distance, and balance workload across resources. **In-Day Optimization** operates in real-time during the active workday to handle disruptions, cancellations, and urgent insertions efficiently.

#### 2. Technical Mechanics & Differences
* **Scope & Horizon:** Global optimization evaluates multi-day or multi-week schedules across thousands of appointments. In-day optimization focuses on a sliding window (e.g., the next 4 hours) for a specific territory.
* **Execution Frequency:** Global optimization is typically scheduled as a recurring batch job. In-day optimization triggers dynamically or upon dispatcher request to adapt to daily chaos.

#### 3. Real-World Business Example
* **Global Optimization:** Every Sunday at midnight, the engine reorganizes the upcoming week's routine maintenance appointments for 200 technicians to reduce fleet fuel consumption by 15%.
* **In-Day Optimization:** At 11:00 AM, a technician calls in sick with truck trouble. The dispatcher triggers an In-Day Optimization run for the local territory, instantly redistributing the remaining afternoon appointments to nearby available technicians.

#### 4. Architectural Pitfalls & Best Practices
* **Avoid Overlapping Runs:** Never schedule Global Optimization jobs during peak daytime hours when dispatchers are actively modifying schedules in real-time, as it can cause record locking and scheduling conflicts.

---
Source: ForceChallenges · last updated 2026-10-25
