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.
From Setup, in the Quick Find box, enter
All Sites, and then select All Sites.
To enable Apex Classes for the guest user, click Builder next to that guest user.
Click settings and in General settings, click the guest user profile link.
On the guest user profile page, click Enable Apex Classes, and then click Edit.
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.
Click Save and exit the guest user profile.
To enable sharing rules, from Setup, in the Quick Find box, enter
Sharing Settings, and then select Sharing Settings.
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
nullin the Value field.
For Share With: Select the guest user.
Repeat this step for the standard Objects: