---
schema_version: "1"
id: 70c977a2a0b97ca460760cd8ddabeb8b5f3d1c79e70fc158480cbed685bb78c5
title: Keep Important Appointments Scheduled During Optimization (Generally Available)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/release-notes/262-0-0/rn_fieldservice_262_keep_scheduled.md
canonical_url: https://help.salesforce.com/s/articleView?id=release-notes.rn_fieldservice_262_keep_scheduled.htm&release=262.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: c2c08371bda7485f4ffd13e057fec8a649d6ba536349fef4fdf0e6b419e3ff75
description: Safeguard important service appointments, such as those with customer commitments, by preventing them from being dropped from the schedule during global and in-day optimization. Define which appointments to keep scheduled by using Keep Scheduled Criteria. For example, ensure emergency appointments remain scheduled. During optimization these appointments can move to a different resource or time within the SLA. Previously, you could only pin appointments, limiting the ability to create the most optimal schedule. You can also keep appointments scheduled via API by using the updated Optimize global Apex method, which is helpful when you want to schedule optimization runs and aren't relying on manual actions.
products:
  - Cross Cloud
release: "262"
---
# Keep Important Appointments Scheduled During Optimization (Generally Available)

Safeguard important service appointments, such as those with customer commitments, by preventing them from being dropped from the schedule during global and in-day optimization. Define which appointments to keep scheduled by using Keep Scheduled Criteria. For example, ensure emergency appointments remain scheduled. During optimization these appointments can move to a different resource or time within the SLA. Previously, you could only pin appointments, limiting the ability to create the most optimal schedule. You can also keep appointments scheduled via API by using the updated Optimize global Apex method, which is helpful when you want to schedule optimization runs and aren't relying on manual actions.

**Where:** This feature is available in Lightning Experience and Salesforce Classic in Enterprise, Unlimited, and Developer editions with the Field Service manager package installed.

**How:** In Setup, go to Field Service Settings and verify that Field Service Enhanced Scheduling and Optimization is enabled. In the Field Service Admin app, click **Field Service Settings**. Under Optimization, in the Scheduled Jobs tab, configure Keep Schedule Criteria.

![Scheduled job with keep scheduled](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-release-notes-salesforce_release_notes-262-0-0-production-enus/e945111b-3e0a-4011-accc-d5949363bfcc/salesforce_release_notes/images/rn_optimize-job-keep1.png)

Then under Optimization, in the Logic tab, you can define a default value to show for this setting. Then, enable the **Include Keep Scheduled in Optimize Window** custom permission set to show this field in the Optimize window accessed from the dispatcher console.

![Optimize window](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-release-notes-salesforce_release_notes-262-0-0-production-enus/e945111b-3e0a-4011-accc-d5949363bfcc/salesforce_release_notes/images/rn_optimize-dispatcher.png)

Alternatively, use the new KeepApptScheduled property with the Optimize global Apex method, to define the value of the designated Boolean field within the Service Appointment object. For example, define IsEmergency to ensure all appointments with this property stay scheduled during optimization.

#### See Also

- [_Salesforce Help_: Optimize Your Schedule from the Field Service Dispatcher Console](https://help.salesforce.com/s/articleView?id=sf.pfs_optimize_dispatcher.htm&language=en_US)
- [_Salesforce Help_: Manage Scheduled Jobs in Field Service](https://help.salesforce.com/s/articleView?id=sf.pfs_set_up_jobs_enhanced.htm&language=en_US)
- [_Salesforce Help_: Set Custom Permissions for Field Service](https://help.salesforce.com/s/articleView?id=sf.pfs_custom_permissions.htm&language=en_US)
- [_Field Service Developer Guide:_: OAASRequest Class](https://developer.salesforce.com/docs/atlas.en-us.250.0.field_service_dev.meta/field_service_dev/apex_class_FSL_OAASRequest.htm)