---
schema_version: "1"
id: 632a8cb38a61dcdf19d4c7558132baafff0246637617c6c9e9498d4aa426694a
title: Create an Appointment Bundle Sort Policy
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/fs_set_up_bundling_sort_policy.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.fs_set_up_bundling_sort_policy.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 92b06500885078362256150f1e131743be6c91d66e123394c72fc2099afe5a66
description: Use the default policy, or create multiple sort policies. For manual bundling, define a policy for sorting the bundle members within a bundle. The sorting is applied when bundling and unbundling service appointments. For automatic bundling, define a policy that determines the order that’s used to examine the bundling candidates.
products:
  - Field Service
release: "264"
---
# Create an Appointment Bundle Sort Policy

Use the default policy, or create multiple sort policies. For manual bundling, define a policy for sorting the bundle members within a bundle. The sorting is applied when bundling and unbundling service appointments. For automatic bundling, define a policy that determines the order that’s used to examine the bundling candidates.

### 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: both Salesforce Classic (not available in all orgs) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">The Agentforce Field Service and Operations core features, managed package, and mobile app are available in <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="d84427e72">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d84427e72 ">To create items:</td>

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

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

1. If your service appointments have custom fields, make sure to give the fields read access. See [Appointment Bundling Limitations](https://help.salesforce.com/s/articleView?id=service.fs_set_up_bundling_limitations.htm&release=264.0.0&type=5 "Review the limitations of Appointment Bundling.").
    1. From Setup, in the Quick Find box, enter Users, and then select **Permission Sets**.
    2. Click **Field Service Integration**.
    3. Click **Object Settings**.
    4. Click **Service Appointment**.
    5. For each custom field, select **Read Access**.
2. In the Appointment Bundle Policy, go to the Related tab.
3. In the Appointment Bundle Sort Policies panel, click **New**.
4. Give the policy a unique name.
5. For Sort Field Name, select the service appointment field that sorts the bundle members. The fields in the list are service appointment fields, not work order fields. The only exception is Skill Requirements, which is a work order field.
6. For Sort Direction, set the order of the appointments in a bundle to ascending or descending.
7. For Sort Type, select one of these options.
    
    Sort Within a Bundle
    
    Defines the order of bundle members. It’s also used when you unbundle to define the order that the service appointments are scheduled on the Gantt.
    
    Sort for Automatic Bundling
    
    Defines the order that automatic bundling uses to evaluate the candidate service appointments to be bundled.
8. For Sort Order, determine in which order the sort policy is triggered. For example, enter 1 to trigger this policy first.
9. Save your changes.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_field_service-264-0-0-production-enus/3f7dceb9-dd70-454a-b49e-bbb4526a158d/images/icon_example.png)

Example A mobile worker must read all the water meters on a long street. According to the default sort policy, the worker must complete the appointments in ascending order according to their due date, without considering the house numbers. To save time, let the mobile worker complete all appointments on one side of the street before continuing to the other side.

1. Create a custom numeric field for the house number.
2. Create a numeric formula field that differentiates between odd and even house numbers. If the house number is even, leave it as is. If the house number is odd, multiply the number by −1.
    
    ```
    IF(MOD( HouseNumber__c,2)=0, HouseNumber__c, -1*HouseNumber__c)
    ```
3. Create restriction policies for the City and Street fields, meaning that all bundle members must be in the same city and on the same street.
4. Create a sort policy for the numeric formula field that you created. Set the policy to sort the bundle members in ascending order. For example, on a street with 10 houses, the appointments are now sorted in this order: −9, −7, −5, −3, −1, 2, 4, 6, 8, 10.

#### See Also

- [Create an Appointment Bundle Restriction Policy](https://help.salesforce.com/s/articleView?id=service.fs_set_up_bundling_restriction_policy.htm&release=264.0.0&type=5 "Use an appointment bundle restriction policy to define restriction fields so that only service appointments with the same field values can be bundled together. Use the default policy, or create multiple restriction policies. For automatic bundling, you must have at least one restriction policy.")
- [Default Appointment Bundle Policy](https://help.salesforce.com/s/articleView?id=service.fs_set_up_bundling_default_policies.htm&release=264.0.0&type=5 "If no policies exist, a default appointment bundle policy is created along with some of its related policies. Access Appointment Bundle Policy from the App Launcher. Access the remaining policies from the Related tab of the appointment bundle policy.")