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