Loading
Agentforce Field Service and Operations
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Limit Access to Field Service Records

          Limit Access to Field Service Records

          When you install the Field Service Managed Package, org-wide default sharing settings are set to Public Read/Write for the Work Orders, Work Order Line Item, and Service Appointment objects. Therefore, all users can view and update these records even if the records are owned by other users. However, most Field Service customers choose to limit access to these records so that their team members see only the records that are relevant to them and on a need-to-know basis, for example, a dispatcher with access only to service appointments for the service territories that they manage.

          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 limit access to field service records: Field Service Admin Permissions

          Package icon This is a Field Service managed package feature.

          Limit Default Access to Field Service Objects

          Limit default access to core Field Service objects (Work Order, Work Order Line Item, Service Appointment, Service Resource, Service Territory).

          1. In Setup, enter Sharing Settings in the Quick Find box, and then select Sharing Settings.
          2. Click Edit.
          3. In the Default Internal Access column, select Private for the objects that you want to limit access to.
            To share dispatched service appointments to Experience Cloud site users when Default Internal Access is Private or Public Read Only, set Default External Access to Private or Public Read Only also. If the Default Internal Access setting is Public Read/Write, Experience Cloud site users can see dispatched appointments only if the external setting is Public Read/Write and you enable dispatch sharing to resources.
          4. Save your changes.

          Share Field Service Object Records with Public Groups

          Configure functionality to share service appointments, work orders, service territories, and service resources with Public Groups. When using a Private sharing model for Service Resource, Service Territory, Service Appointment, Work Order, and Work Order Line Item objects, dispatchers or call center reps must have access to the records of service resources and service appointments within their managed territories.

          1. In Field Service Settings, select Sharing, and then select Scheduled Jobs.
          2. Select Enable User Territories Sharing.
            When a service territory is created, a Public Group is created in Setup with its name, and the service territory is shared with the Public Group. In addition, when a service appointment is created with a service territory defined, a share rule is created to share the appointment with the service territory associated with the appointment. This sharing process ensures that any user who is a member of the Public Group for the territory has access to records shared with it.
          3. Select Share parent Work Order when Service Appointment is shared.
            This option ensures that any work order is shared with the Service Territory Public group, created in the previous step.
          4. Select Automatically populate user groups based on User Territory.
            When a User Territory record is created, the user defined on the record (typically either an call center rep or dispatcher that manages a specific territory) is added to the Public Group that corresponds to the territory defined on the record. This process gives the user access to all records shared with the Public Group for that service territory

          Configure the User Territory Job

          Service resources require initial and regular assessments to determine if they must be added to or removed from the Public Group based on their territory assignment duration. Field Service offers a User Territory Job feature to facilitate the evaluation of service appointments for sharing.

          1. Click the + icon next to User Territories to expand the User Territory Job menu and confirm that Active is selected.
          2. Select which territories to check sharing for. Limit each job to fewer than 200 territories.
          3. Select a value for Time Horizon in days.
            The Time Horizon in days field determines how far in advance of a resource’s territory membership they must be shared with the public group associated with their territory. Therefore, how far in advance users (call center reps and dispatchers) that are members of that public group have access to their service resource record and see the resource in the Classic Dispatch Console Gantt. For example, select 7 to share service resources with dispatchers 7 days before their territory membership for the territory that the dispatcher manages.
          4. Select a value for Time Horizon in days (Backwards).
            The Time Horizon in days (Backwards) field determines how far after a resource’s territory membership has ended the resource must be shared with the public group associated with their territory. For example, select 7 to ensure dispatchers see the service resource’s work in the previous week’s schedule on the Gantt. After 8 days, the dispatcher no longer sees the service resource or their schedule.
          5. Configure the job’s Frequency settings.
            1. Select Recurring.
            2. Select all the months under the Month section.
            3. Select Specific Hour and then enter a value for the Hour and Minute fields to define when the job runs. We recommend having the job run outside working hours so that record access doesn’t change during a working day. For example, select 0 for the Hour field and 0 for the Minute field so that the job runs at midnight. To define how often the job runs, select Recurring Time and then use the up and down arrows to select the interval.
            4. Configure how often the job should run. If a service territory membership changes frequently, select Day of week and then select each weekday to evaluate territory membership every day. If a service territory membership doesn’t change frequently, you can schedule the job to run less often. Select Day of month and then select a non-working day such as Sat to run the job once every 30 days.
          6. Save your changes. 
          7. Optionally, click Run now to reevaluate and update sharing records for service resources to or from Public Groups.

          Add Dispatchers and Call Center Reps to a Service Territory's Public Group

          Give call center reps and dispatchers access to the records (Work Order, Work Order Line Item, Service Appointment, Service Resource, Service Territory) that they manage.

          1. From the App Launcher, find and open User Territories.
          2. Click New.
          3. Select a service territory.
          4. Select the user you want to add as a member of that territory's public group.

          The user is added to the public group for that territory, and the user gets access to all work orders, service appointments, service resources, and any other records shared with the public group.

          Set up Sharing for Field Service Resources

          These settings allow dispatchers to control access to the appointment and its related information until they’ve finalized the appointment's details.

          1. From Setup, enter Field Service Settings in the Quick Find box, and then select Field Service Settings.
          2. Select any of these options. Hover over a setting’s information icon for details.
            1. Share dispatched service appointments with their assigned resources
            2. Share service appointments’ parent work orders with their assigned resources
            3. Let service crew members edit their service appointments
          3. Save your changes.

          Considerations for Field Service Object Sharing

          Before you start sharing objects, make sure you review some considerations.

          General Considerations

          • When a service resource is removed from a service appointment, sharing is deleted only for that service appointment. Sharing on the parent work order is retained.
          • When using customized sharing logic, ensure that every dispatcher gets Read/Write access and not just Read-Only access to the service appointments in their territory, so they can edit the Service Resources' schedule.
          • When an appointment is canceled, it’s visible only to the appointment owner and the relevant dispatchers based on the user territory object.
          • You can give dispatchers access to records by sharing information across territories and syncing calendars to include absences and other events.
          • In some Salesforce orgs, the Field Service Admin app has similar sharing options. We recommend disabling the app sharing settings and using the Setup settings.
          • When you change the owner of ‌a shared object, sharing of this object is removed for the service territory public group, and you can reapply it only if you update the Service Territory field of the object. For the Service Appointment object, you can also reschedule the appointment to a different resource.
          • When one of these settings is enabled, an async sharing job can run after every status change on a service appointment: Field Service Settings | Sharing | Scheduled Jobs | Enable User Territories sharing, or Field Service Settings | Dispatch | Scheduled Jobs | Mention assigned user when the Service Appointment is dispatched.

          Considerations for Service Resource Sharing (User Territory Job)

          • When User Territory Sharing is enabled and the option to Automatically populate user groups based on User Territory is selected, the User Territory Apex rule performs these actions.
            • If you create a service territory, a public group with the same name is created. The public group is added to the ServiceTerritoryShare object.
            • If you create a user territory record, the user is added to the public group for that service territory.
            • If you create a service appointment with that service territory, the public group is added to the ServiceAppointmentShare object to grant access to the record.
            • When a service appointment with that territory is shared, associated parent records (such as accounts, assets, opportunities, work orders, and work order line items) are also shared. The service appointment record and its parent record are shared with the associated public group and its users. If the parent record of the appointment is a work order line item, the associated work order is also shared. Optionally, in Field Service Settings under Scheduled Jobs in Sharing, select which parent objects are shared when an appointment is shared. For example, to share work orders but not accounts, select Share parent Work Order when Service Appointment is shared and deselect Share parent Account when Service Appointment is shared.
          • If you don't have User Territory Sharing enabled or sharing settings weren’t private when you created the service territory records, you must manually create the sharing records.
          • Public group names must be unique. For example, User Territory Sharing doesn't work if you have a queue with the same name as one of your public groups.
          • When a service appointment is created without a user territory, it’s associated with the Field Service Default public group. This default group allows a user to access a service appointment and work order even when no territory is associated. Field Service adds users in all user territories as members of this public group. If you’re a dispatcher, you can filter the Gantt and show service appointments that aren’t associated with a territory.
          • Dispatchers must have sharing settings for the primary service territory of a service resource in order to manage the resource's schedule.
          Example
          Example

          John is a dispatcher for the New Jersey service territory. His user territory record gives him access to New Jersey field service records. Madison is a mobile worker for the Pennsylvania service territory, but on August 1 she’s moving to the New Jersey territory.

          To reflect Madison’s move, add an end date of July 31 to her Pennsylvania service territory member record. Then, create a New Jersey service territory member record for Madison with a start date of August 1. 

          With the User Territory sharing job configured to run daily for all service territories, including Pennsylvania and New Jersey, this job calculates which records users need access to. Because the job’s backward time horizon is set to 1 day, John receives access to Madison’s field service records 1 day before she starts work in New Jersey.

           
          Loading
          Salesforce Help | Article