Configure the storefront environment

An environment, in Sitecore XC, allows you to configure different configuration behavior for the Commerce Engine and provides the ability to have separately configurable pools of data and service functionality, running in a single-service instance. An environment in Commerce Engine refers to a collection of configuration policies that defines behavior, for example, how a call to the engine is handled.

In a deployment where you have multiple storefronts in the same Sitecore instance, you can configure a Commerce Engine environment specific to each storefront. You configure the Commerce Engine environment associated with a storefront in the Content Editor using the Commerce Control panel. If no value is configured in the Content Editor, Sitecore uses the configuration defined in the Sitecore.Commerce.Engine.Connect.config file.

Important

You can configure different caching behavior between environments to reflect the level of traffic expected for each Commerce Engine service. Best practice is to define and configure a separate environment for authoring and production, where the authoring environment avoids caching and the production environment makes use of caching. Typically, you configure the production environment in the control panel and use the authoring environment when working with the business tools. Sitecore Experience Commerce comes with four sample environments - an authoring environment (Authoring) and a production environment (Shops) for each of the two sample catalogs (Habitat and AdventureWorks).

To configure the storefront environment:

  1. In the Content Editor, go to /sitecore/Commerce/Commerce Control Panel/Storefront Settings/Storefronts/<site>).

  2. In the Commerce Control Panel section, in the Environment field, specify a unique name for the environment and save your changes.

    The Environment field in the Commerce Control Panel section