---
schema_version: "1"
id: 470329c322cb43a045bc34e39a9449e48096ace29d5bfc93e4e6cbf831a0b8e6
title: Example of How to Isolate Data Between Partners
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/ls_isolate_data_between_partners.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.ls_isolate_data_between_partners.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 9a3d29e341535b2082b77b013eb22f94d6b5d73b61f2c1bb617a0f568f517e6a
description: This example shows how to set up partners such that they’re unable to access each other’s data.
products:
  - Scheduler
  - Salesforce Platform
release: "264"
---
# Example of How to Isolate Data Between Partners

This example shows how to set up partners such that they’re unable to access each other’s data.

### 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: Lightning Experience.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong> and <strong>Unlimited</strong> Editions</td></tr></tbody></table>

## An Automotive Company and Its Stakeholders

Dream Horse, an automotive company, uses Salesforce Scheduler to book customer appointments, such as booking test drives. Dream Horse now wants to set up Salesforce Scheduler for its dealerships (partner accounts): Chantilly Stables and Versailles Stables. Chantilly Stables has branches in Sacramento and San Francisco. Versailles Stables has branches in San Francisco and Boston. Let’s look at the stakeholders involved and their requirements.

![An image that shows Dream Horse, its partners and partner locations. It also shows all the stakeholders.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/scheduler/images/ls_isolate_data_between_partners_1.png)

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small " summary="Dream Horse Stakeholder List and Dream Horse Stakeholder Requirements">
        <caption>Dream Horse Stakeholder List and Dream Horse Stakeholder Requirements</caption>
        <colgroup>
          <col style="width:33.33333333333333%">
          <col style="width:33.33333333333333%">
          <col style="width:33.33333333333333%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d31163e83">Role</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d31163e86">Responsibilities</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d31163e89">Licenses Required</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Role" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e83 ">Salesforce Admin</td>

            <td data-label="Responsibilities" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e86 ">
              <ul>
                <li>Set up Experience Cloud flows</li>

                <li>Administer Service Territories for initial setup</li>

                <li>Set up data access policies for partners</li>

              </ul>
            </td>

            <td data-label="Licenses Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e89 ">—</td>

          </tr>
          <tr class="">
            <td data-label="Role" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e83 ">Client Customer Care Agent</td>

            <td data-label="Responsibilities" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e86 ">
              <ul>
                <li>Manage skills for all contractors</li>

                <li>Create accounts, leads, and opportunities for all the dealerships</li>

                <li>Book and manage service appointments, such as booking test drives, for all the
                  dealerships</li>

              </ul>
            </td>

            <td data-label="Licenses Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e89 ">Salesforce Platform, Salesforce CRM, or above</td>

          </tr>
        </tbody>
      </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small " summary="Dream Horse Partner Stakeholder List and Dream Horse Stakeholder Requirements">
        <caption>Dream Horse Partner Stakeholder List and Dream Horse Stakeholder Requirements</caption>
        <colgroup>
          <col style="width:33.33333333333333%">
          <col style="width:33.33333333333333%">
          <col style="width:33.33333333333333%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d31163e164">Role</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d31163e167">Responsibilities</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d31163e170">Licenses Required</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Role" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e164 ">Partner Customer Care Agent</td>

            <td data-label="Responsibilities" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e167 ">
              <ul>
                <li>Create accounts, leads, and opportunities for their own dealership </li>

                <li>Manage skills and availability for their dealership Book and manage service
                  appointments for their own dealership </li>

                <li>Create appointment invitation links for partner users or contractors</li>

              </ul>
            </td>

            <td data-label="Licenses Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e170 ">Customer Community Plus, Partner Community, or above</td>

          </tr>
          <tr class="">
            <td data-label="Role" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e164 ">Partner Territory Manager</td>

            <td data-label="Responsibilities" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e167 ">
              <p>Administer a partner branch (service territory):</p>
              <ul>
                <li>View appointment records for their service territory</li>
                <li>Create service territory member records by editing the service territory record and
                  assigning resources (appointment attendees and assets) to the record </li>
              </ul>
            </td>

            <td data-label="Licenses Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e170 ">Customer Community Plus, Partner Community, or above</td>

          </tr>
          <tr class="">
            <td data-label="Role" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e164 ">Partner Users or Contractors</td>

            <td data-label="Responsibilities" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e167 ">
              <ul>
                <li>View their dealership’s accounts, leads, and opportunities</li>

                <li>Book and manage appointments</li>

                <li>Manage their own skills</li>

                <li>Manage their own shifts and absences.</li>

                <li>Create appointment invitation links</li>

              </ul>
            </td>

            <td data-label="Licenses Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e170 ">
              <ul>
                <li>Customer Community Plus, Partner Community, or above </li>

                <li>Salesforce Scheduler add-on</li>

              </ul>
            </td>

          </tr>
        </tbody>
      </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small " summary="Dream Horse Customer Types, Dream Horse Partners, and Dream Horse Partner
     Requirements">
        <caption>Dream Horse Customer Types, Dream Horse Partners, and Dream Horse Partner
          Requirements</caption>
        <colgroup>
          <col style="width:33.33333333333333%">
          <col style="width:33.33333333333333%">
          <col style="width:33.33333333333333%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d31163e278">Role</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d31163e281">Responsibilities</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d31163e284">Licenses Required</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Role" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e278 ">Prospect (Guest user)</td>

            <td data-label="Responsibilities" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e281 ">
              <ul>
                <li>Book a service appointment with any partner from Dream Horse’s experience cloud
                  site.</li>

                <li>Book an appointment using a link.</li>

              </ul>
            </td>

            <td data-label="Licenses Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e284 ">Guest</td>

          </tr>
          <tr class="">
            <td data-label="Role" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e278 ">Customer (Authenticated)</td>

            <td data-label="Responsibilities" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e281 ">
              <ul>
                <li>Book a service appointment with any partner from the Dream Horse’s experience cloud
                  site.</li>

                <li>Modify appointment details with any partner from the Dream Horse’s experience cloud
                  site.</li>

                <li>Book an appointment using a link</li>

              </ul>
            </td>

            <td data-label="Licenses Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e284 ">Customer Community Plus, Partner Community, or above</td>

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

In this example, partner stakeholders have the Partner Community license.

## Experience Cloud Sites

The Salesforce Admin at Dream Horse creates these Experience Cloud sites for different stakeholders.

An Experience Cloud site for partners

A site for partners' customer care agents and contractors who use the Inbound New Appointment flow to book appointments. In the Inbound New Appointment flow, the isOutboundCommunity flow variable is set to true and the IsInbound flow variable is set to false. The site is used by all the partners and the data available to the partners depends on their data access.

An Experience Cloud site for customers

A site for authenticated customers who use the Inbound New Appointment flow to book appointments. Customers can avail of services from all the dealerships and all their locations.

An Experience Cloud site for guest users

A site for guest users who use the Inbound New Guest Appointment flow to book appointments. Customers can avail of services from all the dealerships and all their locations.

## Permissions and Hierarchies

The Salesforce admin of Dream Horse uses these permissions and hierarchies to ensure that all the users have only the required access.

- Portal role hierarchy: To create a hierarchy for partner stakeholders such that users get access to data owned by or shared with users below them in the role hierarchy.
- External Account Hierarchy: To make sure that a partner account has access to data from all its service territory accounts.
- Manual sharing: To share records that are created by Dream Horse admin with portal roles.
- Apex sharing: To provide access to shift records to the respective service resource.
- The Resource Appointment Sharing setting: To share appointment records with the respective service resources.
- Sharing rules: To share records with Dream Horse customer care agents (client customer care agents), guest users, and authenticated users.

Set Up Portal Role Hierarchy

Use portal role hierarchy to make sure that users who are above in the hierarchy have access to data owned by or shared with users below them in the hierarchy. Make sure that in the Settings for Digital Experiences, the number of partner roles is specified as 3. If you use Customer Community Plus licenses, make sure that the number of customer roles is 3.

By default, Salesforce creates these roles:

- Executive
- Manager
- User

To ensure that partner users, contractors, and assistants can access only their own data and data that's shared with them, add them at the lowest level in the portal hierarchy. To ensure that territory managers can access only their own data and their team’s data, add territory managers above their team in the hierarchy. To ensure that partner customer care agents can access the data of all the employees across the service territory, add them above territory managers in the hierarchy.

![An image that shows the stakeholders at Dream Horse and its partners, and their portal roles.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/scheduler/images/ls_isolate_data_between_partners_2.png)

Set Up External Account Hierarchy

To make sure that a partner account can access data from all its service territory accounts, use external account hierarchy.

Before you set up an external account hierarchy, create an account for the parent company, Dream Horse.

![The account page of Dream Horse.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/scheduler/images/ls_isolate_data_between_partners_3.png)

Then, create partner accounts for Chantilly Stables and Versailles Stables with Dream Horse as the parent account.

![The account page of Chantilly Stables.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/scheduler/images/ls_isolate_data_between_partners_4.png)

And create accounts for each branch (service territory) with its dealership as their parent record.

![The account page of Chantilly Stables' San Francisco branch.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/scheduler/images/ls_isolate_data_between_partners_5.png)

For each dealership, create an external account hierarchy with the dealership as the parent record and its branches as the child records. For example, create an external account hierarchy with Chantilly Stables as the parent record and Chantilly Stables San Francisco and Chantilly Stables Sacramento as the child records. Also ensure that the hierarchy is active.

![The account hierarchy for Chantilly Stables and its branches.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/scheduler/images/ls_isolate_data_between_partners_6.png)

Provide Entity Access to the Client and Partners

After you set up the portal-role hierarchy and the external-account hierarchy, records are automatically shared up the hierarchies. For stakeholders who are below in the hierarchies, manually share the records, such as branches (service territories) and appointment topics (work types).

Here’s a table that lists the entities and the access required for different roles. We provide object access through user profiles and record access through sharing. The overall access depends on both the object access and the record access. Salesforce applies the most restrictive of these two accesses to determine the overall access.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col style="width:16.666666666666664%">
              <col style="width:16.666666666666664%">
              <col style="width:16.666666666666664%">
              <col style="width:16.666666666666664%">
              <col style="width:16.666666666666664%">
              <col style="width:16.666666666666664%">
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d31163e471">Entity</th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d31163e473">Admin</th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d31163e475">Client Customer Care Agent</th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d31163e477">Partner Customer Care Agent</th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d31163e479">Partner Territory Manager</th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d31163e481">Partner Users, Contractors, and Assistants</th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="Entity" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e471 ">Service Territory (Object access)</td>
                <td data-label="Admin" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e473 ">All</td>
                <td data-label="Client Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e475 ">Read/Edit</td>
                <td data-label="Partner Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e477 ">Read</td>
                <td data-label="Partner Territory Manager" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e479 ">Read/Edit</td>
                <td data-label="Partner Users, Contractors, and Assistants" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e481 ">Read</td>
              </tr>
              <tr class="">
                <td data-label="Entity" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e471 ">Service Territory (Record access)</td>
                <td data-label="Admin" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e473 ">Owner</td>
                <td data-label="Client Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e475 ">Read/Write</td>
                <td data-label="Partner Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e477 ">Read/Write</td>
                <td data-label="Partner Territory Manager" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e479 ">Read/Write</td>
                <td data-label="Partner Users, Contractors, and Assistants" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e481 ">Read/Write</td>
              </tr>
              <tr class="">
                <td data-label="Entity" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e471 ">Service Territory (Overall access)</td>
                <td data-label="Admin" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e473 ">Owner</td>
                <td data-label="Client Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e475 ">Read/Write</td>
                <td data-label="Partner Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e477 ">Read</td>
                <td data-label="Partner Territory Manager" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e479 ">Read/Write</td>
                <td data-label="Partner Users, Contractors, and Assistants" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e481 ">Read</td>
              </tr>
              <tr class="">
                <td data-label="Entity" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e471 ">Service Resource (Object access)</td>
                <td data-label="Admin" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e473 ">All</td>
                <td data-label="Client Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e475 ">Read/Edit</td>
                <td data-label="Partner Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e477 ">Read/Edit</td>
                <td data-label="Partner Territory Manager" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e479 ">Read</td>
                <td data-label="Partner Users, Contractors, and Assistants" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e481 ">Read/Edit</td>
              </tr>
              <tr class="">
                <td data-label="Entity" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e471 ">Service Resource (Record access)</td>
                <td data-label="Admin" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e473 ">Owner</td>
                <td data-label="Client Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e475 ">Read/Write</td>
                <td data-label="Partner Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e477 ">Read/Write</td>
                <td data-label="Partner Territory Manager" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e479 ">Read/Write</td>
                <td data-label="Partner Users, Contractors, and Assistants" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e481 ">Owner to their Service Resource record. Read only access to other contractors in
                  their territory.</td>
              </tr>
              <tr class="">
                <td data-label="Entity" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e471 ">Service Resource (Overall access)</td>
                <td data-label="Admin" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e473 ">Owner</td>
                <td data-label="Client Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e475 ">Read/Write</td>
                <td data-label="Partner Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e477 ">Read/Write</td>
                <td data-label="Partner Territory Manager" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e479 ">Read</td>
                <td data-label="Partner Users, Contractors, and Assistants" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e481 ">Owner to their Service Resource record. Read only access to other contractors in
                  their territory.</td>
              </tr>
              <tr class="">
                <td data-label="Entity" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e471 ">Work Type Group and Work Type (Object access)</td>
                <td data-label="Admin" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e473 ">All</td>
                <td data-label="Client Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e475 ">Read</td>
                <td data-label="Partner Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e477 ">Read</td>
                <td data-label="Partner Territory Manager" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e479 ">Read</td>
                <td data-label="Partner Users, Contractors, and Assistants" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e481 ">Read</td>
              </tr>
              <tr class="">
                <td data-label="Entity" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e471 ">Work Type Group and Work Type (Record access)</td>
                <td data-label="Admin" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e473 ">Owner</td>
                <td data-label="Client Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e475 ">Read</td>
                <td data-label="Partner Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e477 ">Read</td>
                <td data-label="Partner Territory Manager" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e479 ">Read</td>
                <td data-label="Partner Users, Contractors, and Assistants" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e481 ">Read</td>
              </tr>
              <tr class="">
                <td data-label="Entity" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e471 ">Work Type Group and Work Type (Overall access)</td>
                <td data-label="Admin" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e473 ">Owner</td>
                <td data-label="Client Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e475 ">Read</td>
                <td data-label="Partner Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e477 ">Read</td>
                <td data-label="Partner Territory Manager" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e479 ">Read</td>
                <td data-label="Partner Users, Contractors, and Assistants" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e481 ">Read</td>
              </tr>
              <tr class="">
                <td data-label="Entity" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e471 ">Operating Hours (Object access)</td>
                <td data-label="Admin" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e473 ">All</td>
                <td data-label="Client Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e475 ">Read</td>
                <td data-label="Partner Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e477 ">Read</td>
                <td data-label="Partner Territory Manager" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e479 ">Read/Edit</td>
                <td data-label="Partner Users, Contractors, and Assistants" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e481 ">Read</td>
              </tr>
              <tr class="">
                <td data-label="Entity" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e471 ">Operating Hours (Overall access)</td>
                <td data-label="Admin" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e473 ">Owner</td>
                <td data-label="Client Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e475 ">Read</td>
                <td data-label="Partner Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e477 ">Read</td>
                <td data-label="Partner Territory Manager" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e479 ">Read/Write</td>
                <td data-label="Partner Users, Contractors, and Assistants" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e481 ">Read</td>
              </tr>
              <tr class="">
                <td data-label="Entity" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e471 ">Account/Lead/Opportunity (Object access)</td>
                <td data-label="Admin" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e473 ">All</td>
                <td data-label="Client Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e475 ">Read/Create/Edit</td>
                <td data-label="Partner Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e477 ">Read/Create/Edit</td>
                <td data-label="Partner Territory Manager" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e479 ">No access</td>
                <td data-label="Partner Users, Contractors, and Assistants" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e481 ">Read</td>
              </tr>
              <tr class="">
                <td data-label="Entity" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e471 ">Account/Lead/Opportunity (Record access)</td>
                <td data-label="Admin" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e473 ">Owner</td>
                <td data-label="Client Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e475 ">Owner</td>
                <td data-label="Partner Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e477 ">
                  <p>Owner</p>
                  <p style="margin-bottom:0;">Read/Write</p>
                </td>
                <td data-label="Partner Territory Manager" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e479 ">Read</td>
                <td data-label="Partner Users, Contractors, and Assistants" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e481 ">Read</td>
              </tr>
              <tr class="">
                <td data-label="Entity" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e471 ">Account/Lead/Opportunity (Overall access)</td>
                <td data-label="Admin" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e473 ">Owner</td>
                <td data-label="Client Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e475 ">Owner</td>
                <td data-label="Partner Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e477 ">Read/Write</td>
                <td data-label="Partner Territory Manager" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e479 ">No access</td>
                <td data-label="Partner Users, Contractors, and Assistants" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e481 ">Read</td>
              </tr>
              <tr class="">
                <td data-label="Entity" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e471 ">Service Appointment (Object access)</td>
                <td data-label="Admin" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e473 ">All</td>
                <td data-label="Client Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e475 ">Read/Create/Edit/Delete</td>
                <td data-label="Partner Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e477 ">Read/Create/Edit/Delete</td>
                <td data-label="Partner Territory Manager" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e479 ">Read</td>
                <td data-label="Partner Users, Contractors, and Assistants" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e481 ">Read/Create/Edit</td>
              </tr>
              <tr class="">
                <td data-label="Entity" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e471 ">Service Appointment (Record access)</td>
                <td data-label="Admin" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e473 ">Read/Write</td>
                <td data-label="Client Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e475 ">Read or Read/Write</td>
                <td data-label="Partner Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e477 ">Read or Read/Write</td>
                <td data-label="Partner Territory Manager" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e479 ">Read or Read/Write</td>
                <td data-label="Partner Users, Contractors, and Assistants" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e481 ">Read or Read/Write</td>
              </tr>
              <tr class="">
                <td data-label="Entity" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e471 ">Service Appointment (Overall access)</td>
                <td data-label="Admin" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e473 ">Read/Write</td>
                <td data-label="Client Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e475 ">Read or Read/Write</td>
                <td data-label="Partner Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e477 ">Read or Read/Write</td>
                <td data-label="Partner Territory Manager" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e479 ">Read</td>
                <td data-label="Partner Users, Contractors, and Assistants" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e481 ">Read or Read/Write</td>
              </tr>
              <tr class="">
                <td data-label="Entity" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e471 ">Shift (Object access)</td>
                <td data-label="Admin" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e473 ">All</td>
                <td data-label="Client Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e475 ">Read/Create/Edit/Delete</td>
                <td data-label="Partner Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e477 ">Read</td>
                <td data-label="Partner Territory Manager" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e479 ">Read/Create/Edit/Delete</td>
                <td data-label="Partner Users, Contractors, and Assistants" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e481 ">Read/Create/Edit/Delete</td>
              </tr>
              <tr class="">
                <td data-label="Entity" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e471 ">Shift (Record access)</td>
                <td data-label="Admin" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e473 ">Read/Write</td>
                <td data-label="Client Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e475 ">Read/Write</td>
                <td data-label="Partner Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e477 ">Read/Write</td>
                <td data-label="Partner Territory Manager" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e479 ">Read/Write</td>
                <td data-label="Partner Users, Contractors, and Assistants" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e481 ">Owner to their shift record.</td>
              </tr>
              <tr class="">
                <td data-label="Entity" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e471 ">Shift (Overall access)</td>
                <td data-label="Admin" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e473 ">Read/Write</td>
                <td data-label="Client Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e475 ">Read/Write</td>
                <td data-label="Partner Customer Care Agent" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e477 ">Read</td>
                <td data-label="Partner Territory Manager" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e479 ">Read/Write</td>
                <td data-label="Partner Users, Contractors, and Assistants" class="slds-cell-wrap" style="vertical-align:top;" headers="d31163e481 ">Owner to their shift record.</td>
              </tr>
            </tbody>
          </table>

Here’s how you provide the required entity access for different client and partner stakeholders:

- Set up manual sharing: Manually share each record with portal roles (Partner Executive, Partner Manager, and Partner User) and provide the necessary access.
- Set up Apex managed sharing: Use Apex Managed Sharing to share Shift records with partner stakeholders.
- Set up sharing rules: Set up sharing rules for each object to provide access to the client's customer care agents.
- Enable the Resource Appointment Sharing setting: Enable the setting to automatically provide service appointment access to the service resources for whom the appointment is created.

Set Up Manual Sharing

Use manual sharing to share these records with portal roles:

- Service territories
- Service resources (users and assets)
- Work type groups
- Work types
- Accounts, Leads, and Opportunities

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/images/icon_note.png)

Note We provide access to operating hours through the profile, eliminating the need for manually sharing operating hours.

Instead of manually sharing individual records, you can manually share records in bulk by using Data Loader. For more information, see [Create manual sharing rules with Data Loader knowledge](https://help.salesforce.com/s/articleView?language=en_US&type=1&id=000326225).

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/images/icon_note.png)

Note If a user transfers ownership of a record, Salesforce deletes any manual shares created by the original record owner, which can cause users to lose access. When account ownership is transferred, manual shares created by the original account owner on child records, such as opportunities and cases, are also deleted. For more information, see [Manual Sharing](https://help.salesforce.com/s/articleView?id=platform.granting_access_to_records.htm&type=5&language=en_US).

Let’s look at a few examples.

To share the San Francisco (CS) territory, add a manual share for Chantilly Stables San Francisco Partner Executive with the Role, Internal and Portal Subordinates type, and Read/Write access.

![An image that shows how to share the San Francisco (CS) territory.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/scheduler/images/ls_isolate_data_between_partners_7.png)

To share a service resource that belongs to San Francisco (CS), add a manual share for Chantilly Stables Partner Manager with the Role, Internal and Portal Subordinates type, and Read Only access.

![An image that shows how to share a service resource who belongs to the San Francisco (CS) territory.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/scheduler/images/ls_isolate_data_between_partners_8.png)

Set Up Apex Managed Sharing

If you use shifts, when territory managers create shifts for service resources, you must provide access to shift records to the respective service resource. To provide access, use Apex Managed Sharing to programmatically define sharing rules.

Here’s a sample Apex code that automatically shares shift records with the respective service resource.

```
trigger Shift_share_with_Contractor on Shift (after insert, after update) {
if (trigger.isinsert) {
for (Shift shift: trigger.new) {
String srId = shift.ServiceResourceId;
// if shift has no ServiceResource, then no need to share shift
if (srId == null) {
continue;
}
ServiceResource sr = [Select Id, RelatedRecordId from ServiceResource Where Id=:srId];
String userId = sr.RelatedRecordId;
// if the user is owner, no need to create share row
if (userId == shift.OwnerId) {
continue;
}
// create a ShiftShare row
ShiftShare shiftShare = new ShiftShare (
ParentId=shift.Id, // Shift Id
AccessLevel='Edit', // AccessLevel - Read/Edit/All
RowCause='Manual', // RowCause - Manual
UserOrGroupId=userId // Id of the user/group
);
insert shiftShare;
}
}
else if (trigger.isupdate) {
for(Shift shift: trigger.new) {
Shift oldShift = trigger.oldMap.get(shift.Id);
String prevSrId = oldShift.ServiceResourceId;
String newSrId = shift.ServiceResourceId;
// if service resource is changed
if (prevSrId != newSrId) {
// if previous Service Resource was present, remove the share row for that
if (prevSrId != null) {
ServiceResource prevSr = [Select Id, RelatedRecordId from ServiceResource Where Id=:prevSrId];
String prevUserId = prevSr.RelatedRecordId;
// delete ShiftShare
List<ShiftShare> shiftShare = [Select Id from ShiftShare Where ParentId=:shift.Id and UserOrGroupId=:prevUserId];
if (shiftShare.size() > 0)
delete shiftShare;
}
// if Service Resource is updated, then create a share row
if(newSrId != null) {
ServiceResource newSr = [Select Id, RelatedRecordId from ServiceResource Where Id=:newSrId];
String userId = newSr.RelatedRecordId;
// if the user is owner, no need to create share row
if (userId == shift.OwnerId) {
continue;
}
// create a ShiftShare row
ShiftShare shiftShare = new ShiftShare (
ParentId=shift.Id, // Shift Id
AccessLevel='Edit', // AccessLevel - Read/Edit/All
RowCause='Manual', // RowCause - Manual
UserOrGroupId=userId // Id of the user/group
);
insert shiftShare;
}
}
}
}
}

```

Enable the Resource Appointment Sharing Setting

To make sure that service resources can access their appointments, enable Resource Appointment Sharing in Salesforce Scheduler Settings.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/images/icon_note.png)

Note Users who are above assigned service resources in the hierarchy automatically get access to service appointments of users who are below them in the hierarchy.

![The Resource Appointment Sharing setting enabled.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/scheduler/images/ls_isolate_data_between_partners_9.png)

If any appointments are created before you enable the setting, manually share those appointments with the respective service resources.

Set Up Sharing Rules

To share records with client customer care agents, create a role in Salesforce for client customer care agents. Then, create criteria-based sharing for each object to share all the records with the internal role.

Let’s look at examples of how to share work type groups and shifts with all the client customer care agents. Before you create sharing rules, create a role called Dream Horse CCA and assign the role to all client customer care agents.

Create sharing rules to share all the active work type groups with the Dream Horse CCA role.

![The work type rule to share all the active work type groups with the Dream Horse CCA role.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/scheduler/images/ls_isolate_data_between_partners_10.png)

Similarly, create sharing rules to share all shift records with the Dream Horse CCA role.

![The shift sharing rule to share all shift records with the Dream Horse CCA role.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/scheduler/images/ls_isolate_data_between_partners_10_1.png)

Provide Entity Access to Guest and Authenticated Users Using Sharing Rules

To book appointments, provide guest and authenticated users access to all service territory, work type, work type group, service resource, and shift records.

To provide access to guest users, create sharing rules of the type Guest user access, based on criteria to share records with the guest user of the experience cloud site. To provide access to authenticated users, create a public group that includes all the authenticated customers. And then, create sharing rules of type Based on criteria to share records with the public group that contains all the customers.

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/images/icon_important.png)

Important Add any new authenticated users to the group.

Let’s look at some examples.

Create sharing rules to share all the active work type groups with the guest user.

![The work type group sharing rule to share all the active work type groups with the guest user.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/scheduler/images/ls_isolate_data_between_partners_11.png)

Similarly, create sharing rules to share all shift records with the guest user.

![The shift sharing rule to share all shift records with the guest user.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/scheduler/images/ls_isolate_data_between_partners_12.png)

Create sharing rules to share all the active work type groups with the public group that contains all the customers.

![The work type group sharing rule to share all the active work type groups with the public group that contains all the customers.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/scheduler/images/ls_isolate_data_between_partners_13.png)

Similarly, create sharing rules to share all shift records with the public group that contains all the customers.

![The shift sharing to share all shift records with the public group that contains all the customers.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-scheduler-264-0-0-production-enus/0530be2f-891f-4263-a0d7-96ddca56a717/scheduler/images/ls_isolate_data_between_partners_14.png)

After completing the setup, Dream Horse and its stakeholders have the necessary access. And Dream Horse's dealerships can't access each others' data.

#### See Also

- [Share Service Appointments with Assigned Service Resources](https://help.salesforce.com/s/articleView?id=platform.ls_share_appnt_with_srvc_resources.htm&release=264.0.0&type=5 "When you enable the Resource Appointment Sharing setting, Scheduler automatically shares a newly created service appointment with all assigned service resources. This setting provides appropriate permissions to service resources to manage their service appointments.")