Sitecore Experience Commerce

Clean and initialize the environment

You can clean your Commerce Engine environment using the Postman samples provided in the Commerce Engine SDK.

The Clean Environment request takes the current environment as an input parameter, and uses the environment's ArtifactStoreID to match and remove all data in the Shared Environments database associated with that same ID. The ArtifactStoreID is defined in the environment .json file, stored under the c:\inetpub\wwwroot\<Role>\wwwroot\data\Environments folder.

Keep in mind that the database stores all of the commerce data used on the site (for example, catalog data, customer records, pricing information, configured promotions), as well as the generic entities and lists that power the functionality of the various installed plugins.

Any environment data stored in the Global database remains intact.

Using Postman with Sitecore XC

The following instructions assume that you have installed the Postman application, imported the sample collections from the Sitecore Commerce Engine SDK, configured your environment, and retrieved a bearer token to access the Commerce Engine API, as described here.


When you place a call to the Commerce Engine API from outside the Commerce Business Tools (for example, using Postman), you must disable the anti-forgery protection setting in the wwwroot\config.json file.

Clean and initialize the environment

To clean and initialize the Commerce Engine environment:

  1. In the Postman  Collections pane, expand the SitecoreCommerce_DevOps collection.

  2. Open the 2 Clean Environment folder, and execute the Clean Environment request.

  3. Open the 3 Environment Initialize folder and execute the Ensure\Sync default content paths request.

  4. In the same folder, execute the Initialize Environment request.

  5. Open the Sitecore Launchpad in a browser and click on Content Editor.

  6. In the left pane, navigate to the /sitecore/Content/<tenant>/<site>/Home/Catalogs folder.

  7. In the right pane, un-check the Selected Catalog box and save your changes.

  8. Re-check the Selected Catalog box and save your changes again.

  9. Rebuild the Sitecore indexes, as described here.

  10. Republish the site, as described here