---
schema_version: "1"
id: 449ff8a5bb969491c1f2be8b00593366035e51927d9cd0a027aab2f1c6ae39b0
title: Enable Apex Classes and Sharing Rules for Guest User Profile
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries/cme/guides/comms-enabling-apexclasses-sharingrules-for-guest.md
canonical_url: https://developer.salesforce.com/docs/industries/cme/guide/comms-enabling-apexclasses-sharingrules-for-guest.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: d21498a7e946bebe3e86eb3465ff62d2d6b6c021e12e0597c5643a1858021108
products:
  - Communications, Media, Energy and Utilities APIs (Managed Package)
  - Industries Developer Documentation
---
# Enable Apex Classes and Sharing Rules for Guest User Profile

Enable the apex classes and sharing rules for a guest user profile to access the Standard Digital Commerce APIs.

**Before You Begin**

- You are assigned with Admin role.
- The guest user profile is available in the org.

Enable the apex classes and sharing rules.

1.  From Setup, in the Quick Find box, enter `All Sites`, and then select **All Sites**.

2.  To enable Apex Classes for the guest user, click **Builder** next to that guest user.

3.  Click **settings** and in General settings, click the guest user profile link.

4.  On the guest user profile page, click **Enable Apex Classes**, and then click **Edit**.

5.  Move all the apex classes in the enable apex classes column to the disabled apex classes column. Select **APIGetOffersV3** and **APIBasketOperationsV3** apex classes and click the right arrow to enable the classes for the guest user.

6.  Click **Save** and exit the guest user profile.

7.  To enable sharing rules, from Setup, in the Quick Find box, enter `Sharing Settings`, and then select **Sharing Settings**.

8.  In the Product Sharing Rules section, click **New**. Enter Product Sharing Rules and save the changes.

    For Criteria: Select **Created By ID** and **not equal to** from the Field and Operator drop down respectively. Enter `null` in the Value field.

    For Share With: Select the guest user.

    Repeat this step for the standard Objects:

    - CachedAPIResponse
    - Catalog
    - ConfigurationSnapshot
    - PriceList
