Installing SAP Commerce Cloud 2205 for use with Composable Storefront
The following instructions describe how to install and configure SAP Commerce Cloud release 2205 for use with a composable storefront. In these instructions, SAP Commerce Cloud is installed to your local computer, so localhost is used in the browser URLs.
Important Disclaimers
-
Starting with release 2005, SAP Commerce Cloud ships with all users inactive and without passwords. These users may need to be restored for certain back end functionality to work. For example, although you will be able to add products to cart and check out, certain users are required to fulfill orders with Order Management as used in the default cx recipe. For more information, and for a sample ImpEx that enables such users, see Setting Passwords for Default Users.
-
Starting with release 1905, SAP Commerce Cloud ships without a default admin password. You must specify a password when running recipe commands, or you can specify a password in a file named custom.properties that is stored in CXCOMM*\installer\customconfig. The sample custom.properties file included in these instructions contains the default password nimda. We strongly recommend you change this password to suit your requirements, as it should not be used for production servers.
-
The sample custom properties file and OCC credentials supplied here are for evaluation purposes only. Aside from a default password, for example, the CORS settings are permissive to prevent access issues. We strongly recommend that a professional SAP Commerce Cloud administrator review these settings to suit your requirements, as they should not be used for production servers.
Installation and Configuration Instructions
Summary:
-
Step 1: Download, unzip, and create the new recipe
-
Step 2: Build and initialize the recipe
-
Step 3: Import OCC credentials
-
Step 4: Update system and user credentials (optional)
Step 1: Downloading, Unzipping, and Creating the New Recipe
Procedure
Step 2: Building and Initialize the New Recipe
Procedure
Step 3: Importing OCC Credentials
Composable storefront uses OCC REST API calls to get information from and make changes to the backend. To do this, the backend must be configured with certain credentials.
Procedure
Step 4: Updating System and User Credentials (Optional)
You may need to enable users and passwords for certain functionality to work.
See Setting Passwords for Default Users for more information.
All Done
You can now start composable storefront. After you have configured SAP Commerce Cloud to accept OCC REST API calls, you can set up and start your storefront. See Building the Composable Storefront From 6.0 Libraries for more information.
Notes
General
-
Some of the steps in this procedure are derived from the documentation for installing SAP Commerce Cloud using recipes. For more information, see Installing SAP Commerce Cloud Using Installer Recipes.
-
The default cx recipe is used to create the recipe for composable storefront. Among other extensions, the cx recipe uses the Order Management Services feature (OMS). If you make an order, OMS doesn't ship the order, so orders remain in processing. To ship the order, a Warehouse Agent must confirm order shipment. For more information, see Order Management Services Module.
Spartacus Sample Data Extension
-
The Spartacus Sample Data extension contains sample data modifications used by the composable storefront and by the project "Spartacus" open source software. The extension makes a copy of any existing sample stores, if present. You can also use you own sample data as long as it includes extensions that support OCC APIs like commercewebservices.
-
The Spartacus Sample Data extension copies data from the electronicsstore, apparelstore, or powertoolstore extensions. Note that the time to initialize is longer because SAP Commerce Cloud first builds the standard stores, then the stores for composable storefront. If you do not need all sample stores, you can comment them out in your recipe's build.gradle file. At a minimum, one sample store is required.
-
For more information about the changes that are implemented with the Spartacus Sample Data extension, see Spartacus Sample Data Extension.
Sample Configuration Properties
The sample custom properties file is meant for development and evaluation purposes only. Please be careful to at least review the following properties:
-
The admin password (initialpassword.admin) (default is nimda).
-
CORS settings as described further in this document, and in the composable storefront documentation.
The following table summarizes the settings included in this file:
| Setting | Description |
|---|---|
|
initialpassword.admin |
Admin password so you can access the console and Backoffice |
|
occ.rewrite.overlapping.paths.enabled |
Defines if certain B2B OCC calls are prefixed with 'org' to avoid endpoint conflicts (the default is set to true to ensure that both B2C and B2B storefronts can run in parallel) |
|
sop.post.url |
Defines where to send mock payment creation requests, so you can check out |
|
corsfilter* |
Defines various CORS settings required for composable storefront functionality to work (see more information below) - note that the settings are permissive and should be changed to match your site configuration |
|
mockup.payment.label.billTo* |
Defines extra state and phone number fields for payment, used by composable storefront |
|
yacceleratorordermanagement.fraud* |
Increases the fraud score limits so you mock purchases are not cancelled |
|
task.polling.interval.min |
Defines how long the system waits to kick off a new task - smaller values speed up order processing |
|
build.parallel |
Speeds up initialization if your system has multiple cores |
Sample OCC credentials
By default, SAP Commerce Cloud successfully replies to OCC REST API calls that do not require authentication. For example, you can do the following:
-
Display Open API documentation: https://localhost:9002/occ/v2/swagger-ui.html
-
Display information about the Electronics base store: https://localhost:9002/occ/v2/electronics/basestores/electronics
To be able to register users and check out, SAP Commerce Cloud must be configured with a client ID and password. When required, your composable storefront sends this client ID and password when communicating with the back end.
-
When you import the OCC credentials ImpEx in Step 3: Importing OCC Credentials, you add the client ID mobile_android and password (or secret): secret. The values for client ID and password are samples. You would use different values for your production environments.
-
For more information on this topic, see Configuring OAuth Clients.
CORS Settings
-
CORS settings are very important for security. We strongly recommend that a professional SAP Commerce Cloud administrator review these settings to suit your requirements, as the sample properties should not be used for production servers.
-
CORS (Cross-Origin Resource Sharing) defines a way for a browser and a server to decide which cross-origin requests for restricted resources can or cannot be allowed. Certain composable storefront functionality, such as checkout and consent management, may not work properly if the CORS OCC REST API settings are not configured properly in SAP Commerce Cloud.
-
You can add these settings using the Hybris Administration Console. Hover your mouse over the Platform tab, click Configuration, then update the CORS settings.
-
For information on composable storefront and CORS settings, see Cross-Origin Resource Sharing (CORS).
-
There are a number of other composable storefront features that also require additional CORS settings. For more information about CORS, see ycommercewebservices Extension.
Troubleshooting
-
If SAP Commerce Cloud installer doesn't work, make sure there are no spaces in the path to the SAP Commerce Cloud folder.
-
If composable storefront starts or partially starts, check all CORS settings. For more information, see Cross-Origin Resource Sharing (CORS).

