---
schema_version: "1"
id: 529eaf11b631d34701e72e83e1fb380bf6f8728680364ec5da835fbcb0935d4c
title: Fine-Tune the Scheduling Policy
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/pfs_scheduling_policy_tuning.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.pfs_scheduling_policy_tuning.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 905b6642fb3d8d1415b094b1082dd2c8b5384331a6e60ab3a70aad9ddcbe8fc1
description: In scheduling policies, you set weights to service objectives. These weights represent the importance of each objective when the engine generates an optimal schedule. You can fine-tune the weights through an iterative tuning process to set weight values in your scheduling policy that closely align with your business KPIs.
products:
  - Field Service
release: "264"
---
# Fine-Tune the Scheduling Policy

In scheduling policies, you set weights to service objectives. These weights represent the importance of each objective when the engine generates an optimal schedule. You can fine-tune the weights through an iterative tuning process to set weight values in your scheduling policy that closely align with your business KPIs.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Available in Lightning Experience and Salesforce Classic in these editions where Field Service is enabled: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d171804e63">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d171804e63 ">To enable Enhanced Scheduling and Optimization:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d171804e63 ">Customize Application</td>

          </tr>
        </tbody>
      </table>

![Package icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_field_service-264-0-0-production-enus/3f7dceb9-dd70-454a-b49e-bbb4526a158d/support_field_service/images/fs_package.png) _This is a Field Service managed package feature._

These steps are a starting point. They outline a general framework for fine-tuning your scheduling policy weights through an iterative process: simulate, collect data, analyze, and refine. You can modify and expand these steps to meet your specific requirements.

1. Collect production-like data in a sandbox to use for simulation testing. Preferably perform a refresh from production into a full sandbox.
2. Select two or three service territories to perform simulation testing on. Preferably choose diverse territories so you can test on a dataset that is representative of all your Salesforce data.
3. Select a future date range start time to perform testing, depending on how long you expect testing to take. It’s better to select a date range in the future so the passing of the current time doesn’t affect the optimization window. For example, if today is January 1, 2024, and you expect the tuning exercise to take 3 days, select a date range for optimization to start no later than January 5, 2024. This way the current date doesn’t overlap with your optimization date range and interfere with results.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_field_service-264-0-0-production-enus/3f7dceb9-dd70-454a-b49e-bbb4526a158d/images/icon_note.png)
    
    Note For a more realistic test dataset, update the dates within the dataset based on the amount of test data available for the selected date range.
4. The optimization horizon date range must match what you intend to configure in production. For example, if you are testing the global optimizer that has a horizon of 3 days, the optimization horizon for the testing is January 5, 2024 to January 7, 2024.
5. Create a copy of the scheduling policy that you’re testing for fine-tuning and rename it to show that it’s the baseline scheduling policy. For example, ABC\_Baseline.
6. Set up Optimization Insights, or, if you’re using Enhanced Scheduling and Optimization, set up the Optimization Hub.
7. Unschedule all the appointments in the testing data domain.
8. Run Global Optimization on the selected service territories for the time horizon that you selected. It's easier to use the OAAS API to run the test because it gives you the flexibility to choose future dates. When you’re using Enhanced Scheduling and Optimization, you can control the time range directly from the scheduled job page.
9. Measure the results.
    - Measure runtime.
    - Collect results using [Optimization Insights](https://help.salesforce.com/s/articleView?id=service.pfs_monitor_optimization_insights.htm&type=5&language=en_US) or the [Optimization Hub](https://help.salesforce.com/s/articleView?id=service.pfs_optimization_hub_parent_page.htm&type=5&language=en_US) to determine how many appointments were scheduled, utilization, travel time, and more metrics, according to your specific business KPIs.
    - Take screenshots of the Gantt.
    - If possible, save the schedule by exporting the service appointment schedule times and Assigned Resource records for analysis.
10. Run the same test one or two more times and average out the result. The result acts as the baseline metric to compare against.
11. Review the Gantt and the metrics and identify areas where you want to improve and which KPIs to focus on. Consider the types of service territories you chose and analyze the differences in results among the territories.
12. Copy the scheduling policy and rename it to show the test number and what you are planning to change in this policy.
13. Update the service objective weights to impact the KPI that you want to see an improvement on. We recommend you change only one variable at a time, and test how it affects the results. Otherwise, it can be difficult to determine which change impacted the results. Keep in mind that objective weights are relative to each other.
14. Repeat the process from step 8.
15. Continue the simulation tests until you see no significant improvements from further tuning of the scheduling policy.

When you’re happy with the results, you can use your newly tuned scheduling policy in your production environment. We recommend you test the new policy with a few service territories first and get feedback from users before you roll it out to all service territories.

#### See Also

- [OAAS Class](https://developer.salesforce.com/docs/atlas.en-us.field_service_dev.meta/field_service_dev/apex_class_FSL_OAAS.htm#apex_FSL_OAAS_optimize)
- [Manage Scheduled Jobs in Field Service](https://help.salesforce.com/s/articleView?id=service.pfs_set_up_jobs_enhanced.htm&type=5&language=en_US)
- [Optimization Horizon](https://help.salesforce.com/s/articleView?id=service.pfs_optimization_horizon.htm&type=5&language=en_US)
- [Gain Visibility into Optimizations with Field Service Optimization Insights](https://help.salesforce.com/s/articleView?id=service.pfs_monitor_optimization_insights.htm&type=5&language=en_US)
- [Explore Metrics in Field Service Optimization Hub](https://help.salesforce.com/s/articleView?id=service.pfs_optimization_hub_parent_page.htm&type=5&language=en_US)