- A storefront is the user-facing website where your buyers can browse products, place orders, and manage their accounts.
- An org needs at least one storefront, and each storefront needs an associated community.
1] Create Storefront Information in CC Admin
Load custom settings, custom object records, and configuration settings for a uniquely named storefront.
CC Admin tab.
2] Create and enable a theme for your storefront
3] Create a Community for the Storefront
4] Configure Public Pages for a Storefront:
- After you create the community, click Administration in My Workspaces
- In the Administration workspace, select Pages from the Administration menu and click Go to Force.com
- Assign B2B Commerce Visualforce pages for the home, registration, and password management pages
- On the Site Edit page, enter the following Visualforce page names and then click Save
- Scroll to the Error Pages section and click Page Assignment
- Return to the community’s Administration workspace and specify the B2B Commerce Visualforce page for the community Home page
- Configure the community to always use the custom Visualforce error pages you specified above.
5] Configure the Storefront Secure Domain.
- Copy the domain name in custom url section
- Paste the domain name to the storefront settings in CC Admin
6] Assign Permissions for Storefront Guest Users.
- Clone the default B2B Commerce Guest permission set
- Return to the community’s Administration workspace ==> Pages ==> Force.com
- In the community’s Site Detail section, click Public Access Settings
- The profile that the community automatically created for your guest users displays
- Verify that the View All Users permission is deselected on the community guest user profile
- Assign the cloned permission set that you created above to the community guest user profile
7] Assign Permissions for Storefront Community Users
- In the Administration workspace, select Members from the Administration menu
8] Assign Visualforce Pages for User Self-Registration
- To allow a guest user to create an account on your storefront, configure the community with the appropriate B2B Commerce Visualforce pages.
- In the community’s Administration workspace, select Login & Registration.
- Save the changes.
9] Create a Default Owner for Records Created by a Storefront Guest User
- Clone the default Customer Community Plus User profile.
- Create a community user that becomes the default owner of all records created by guest users
- Create an account specifically for this user
- Create a contact for the account
- On the contact detail page, select Manage External User, click the contact dropdown menu and select Enable Customer User.
- Verify proper license and profile is selected for the user
- Create a permission set for the user that you created. Clone the default B2B Commerce Guest permission set, and modify it to add read access to the CC Contact Addresses and CC Orders objects
- Assign the cloned permission set to the user that you created
- Update your storefront configuration settings with the ID of the user that you created
- Build and activate a new configuration cache.
10] Configure External Sharing Settings for Storefront Users
- User Visibility Settings section, and deselect Community User Visibility
- Other Settings section, and enable Secure guest user record access
- For Account and Contract external access make OWD private.
11] Create Sharing Rules for Guest User Access to Storefront Objects
- Create new Account sharing rule
- Save.
- Create a sharing rule for the CC Page Label custom object.
- Label, such as CC Page Label Guest Access
- Click Add Filter Logic, and enter 1 OR 2.
- Create a sharing rule for the CC Public Cache custom object.
- If your storefront allows guest users to self-register, repeat the previous steps to create sharing rules for the following objects.
- If your storefront allows guest users to browse without registering, create sharing rules for the following objects. These rules are in addition to the rules you already created.
- If your storefront allows guest users to add products to a cart, create sharing rules for the following objects. These rules are in addition to the rules you already created.
- If your storefront allows guest users to complete checkout, create sharing rules for the following objects. These rules are in addition to the rules you already created.
- Some B2B Commerce for Visualforce custom objects relate to optional features or specific use cases. If your storefront uses the following objects and allows guest users to complete checkout, create sharing rules for the necessary objects. These rules are in addition to the rules you already created
12] Add Account Group to the Standard Account Layout
13] Finalize and Publish Your Storefront
- To prevent malicious actors from inserting unwanted, clickable objects into your storefront pages, enable Clickjack protection.
- Activate your community.
- Test whether guest users can successfully self-register.
- On your storefront, click Login in the header.
- On the registration page, click Create an Account.
- Complete the registration form and save.
- In your org, verify that a new account, contact, and customer community user record exists for the user you registered.