In-Day and Global Optimization for Workforce Scheduling

Use In-Day Optimization to recover from same-day disruptions — such as last-minute schedule changes — by optimizing the team’s schedule across one or more service territories. Use Global Optimization to reoptimize the schedule across one or more service territories over a longer date range. In-Day and Global Optimization are relevant to field work only.

Required Editions

Available in: Lightning Experience
Available in: Enterprise and Unlimited Editions

In Setup, configure the org-level pin criteria (which statuses lock appointments during optimization) and the Commit Mode (what happens when a scheduling change occurs during a run) for each optimization type. See Configure Optimization for Field Work in Workforce Scheduling.

Trigger In-Day and Global Optimization through the Workforce Scheduling optimization APIs. The API request specifies the optimization type, service territories in scope, date range or day, and scheduling policy to apply.

In-Day Optimization

In-Day optimization is ideal for same-day schedule changes such as last-minute appointments that need immediate action, or cancellations that leave gaps in the schedule. It runs in up to 5 minutes, fast enough for on-demand changes. This only covers the optimization engine runtime and doesn’t include data fetching or committing results to the Gantt. For example, if a dispatcher sees the Gantt as disabled for 10 minutes during an in-day optimization run, the system hasn’t crashed. The data loading and saving happens on either side of the 5-minute calculation window. In-Day Optimization runs across the current day and next day, over one or more service territories. You can extend In-Day optimization across multiple days, but it’s best for immediate issues on the current or next day.

Global Optimization

Global Optimization is the most thorough optimization type — use it to reoptimize the entire schedule. It optimizes every unpinned appointment across the selected service territories and applies the highest-scoring schedule the engine can find within the run’s time horizon (date range). Global Optimization runs across one or more service territories and a date range of up to 30 days. Runtime is capped at 2 hours. This only covers the optimization engine runtime and doesn’t include data fetching or committing results to the Gantt. For example, if a dispatcher sees the Gantt as disabled for 3 hours during a global optimization run, the system hasn’t crashed. The data loading and saving happens on either side of the 2-hour calculation window. Global Optimization is designed for overnight batch use — schedule it for a time when concurrent changes are unlikely. For example, use Global Optimization for:

  • Nightly rebalancing to prepare for the next day of service.
  • End-of-week resets after a busy period changes the schedule.
  • Recovery after a change to work rules, service objectives, or scheduling policies.

If a run stays in the In Progress status longer than expected, increase your org’s session timeout to at least 2 hours.