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
| Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience |
| The Agentforce Field Service and Operations core features, managed package, and mobile app are available in Enterprise, Unlimited, and Developer Editions. |
| User Permissions Needed | |
|---|---|
| To create items: | Customize Application |
-
If your service appointments have custom fields, make sure to give the fields read access.
See Appointment Bundling Limitations.
- From Setup, in the Quick Find box, enter Users, and then select Permission Sets.
- Click Field Service Integration.
- Click Object Settings.
- Click Service Appointment.
- For each custom field, select Read Access.
- In the Appointment Bundle Policy, go to the Related tab.
- In the Appointment Bundle Sort Policies panel, click New.
- Give the policy a unique name.
- 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.
- For Sort Direction, set the order of the appointments in a bundle to ascending or descending.
-
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.
- For Sort Order, determine in which order the sort policy is triggered. For example, enter 1 to trigger this policy first.
- Save your changes.
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.
- Create a custom numeric field for the house number.
- 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) - 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.
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.
Did this article solve your issue?
Let us know so we can improve!

