All you need to know about Sitecore Experience Commerce 9 - Part 2: Configuration
This is Part 2 of my series on all you need to know about Sitecore Experience Commerce 9. You can read Part 1 on XC 9 architecture here.
In this post, I'll be going through the core building blocks for configuration of XC 9.
Core Concepts
The key concepts that you need to understand are as follows:
Policies
- A policy is a group of settings that define and affect the functionality of the individual plugins in the commerce engine.
- It is stored in the Global database.
Environment
- An environment is a collection of policies that affect how a call to the engine is handled.
- Environments allow you to have a different set of functionality and behavior from the same Commerce Engine instance.
Bootstrapping
- Bootstrapping is the process of loading a set of JSON environment and policy configurations into the commerce global database.
Bootsrapping
The environment and policy json configuration files are found under:
Engine instance\wwwroot\data\Environments
Bootsrapping is a process that loads these files into the Commerce Entities table in the global database. This functionality is exposed by the Commerce Engine API and the call can be executed via Postman or Powershell as part of your deployment.
Note that the Commerce Engine reads these configurations directly from the database, not the file system.
Configuring the engine
A specific engine instance is configured by updating:
Engine instance\wwwroot\config.json
Among other things, the environment to be used by the instance is configured here.
Hopefully that gives you a good idea of the basics. In the upcoming posts in this series, I'll dig deeper into customisation, plugins and the commerce service API.