---
schema_version: "1"
id: ab63a1f0b9122352837849b95f554e5b4e98e80f36963ed66fd2b17a5380bb75
title: Set Up Visit and Inventory Access
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/admin_intelligent_sales_profiles.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.admin_intelligent_sales_profiles.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e6ed43febb85c3eae15abef196070750dfc37aad2fcf865cdbf3c729f26f2bb3
description: Set up the right object permissions so that users access just the visits and inventories they’re responsible for. You can use Sharing Settings and custom Apex triggers to set up access.
products:
  - Life Sciences
release: "264"
---
# Set Up Visit and Inventory Access

Set up the right object permissions so that users access just the visits and inventories they’re responsible for. You can use Sharing Settings and custom Apex triggers to set up access.

### 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;">
              <p>Available in: Lightning Experience</p>
              <p style="margin-bottom:0;">Available in: <strong>Enterprise</strong> and <strong>Unlimited</strong> Editions with Health Cloud
                or Life Sciences Cloud</p>
            </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="d44946e58">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d44946e58 ">To set default sharing access:</td>
            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d44946e58 ">Manage Sharing</td>
          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d44946e58 ">To edit object permissions:</td>
            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d44946e58 ">
              <p>Manage Profiles and Permission Sets</p>
              <p style="margin-bottom:0;">AND</p>
              <p style="margin-bottom:0;">Customize Application</p>
            </td>
          </tr>
        </tbody>
      </table>

Before you set up view permissions, it’s a good idea to create different profiles for the different business functions at your organization.

Here’s how you configure object permissions related to visits and product inventories for a sales rep.

1. From Setup, enter Sharing Settings in the Quick Find box and select **Sharing Settings**.
2. Click **Edit** for Organization-Wide Defaults.
3. Set Product Fulfillment Location, Product Item, and Visit to **Private**.
4. Save your changes.
5. Enter Profiles in the Quick Find box and select **Profiles**.
6. Click the profile you set up for your sales reps.
7. Click **Edit** and go to the Standard Object Permissions section.
8. Select **Read**, **Create**, **Edit**, and **Delete** for Visits, Product Items, and Product Fulfillment Locations.
9. Deselect **View All Records** for Visits, Product Items, and Product Fulfillment Locations.
10. Save your changes.

Now, you can implement appropriate Apex Classes and Triggers in your org to control how visit and inventory access is shared with your users. You can write these classes and triggers in any way that best suits the needs of your organization. In this article, we've provided some sample Apex classes and triggers to help you get started.

- **[Sample Apex Trigger for Visit and Inventory Access](https://help.salesforce.com/s/articleView?id=ind.admin_intelligent_sales_apex.htm&release=264.0.0&type=5)**  
    Implement appropriate Apex Classes and Triggers in your org to control how visit and inventory access is shared with your users. You can write these classes and triggers in any way that best suits your organization's requirements. Here are some sample Apex classes and triggers to help you get started. The Visit trigger provides sharing access to the Visit object and related objects at the time a visit is created or updated. The Visitor trigger provides access to the user who is assigned to a visit. You can use these Apex triggers with profile-based permissions and organization-wide sharing settings to make sure that users access just their visits and inventories.