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.
To clean and initialize the Commerce Engine environment:
-
In the Postman Collections pane, expand the SitecoreCommerce_DevOps collection.
-
Open the 2 Clean Environment folder, and execute the
Clean Environment
request. -
Open the 3 Environment Initialize folder and execute the
Ensure\Sync default content paths
request.NoteThe
Ensure\Sync default content path
synchronizes all items in the content path. (The default path is /sitecore/Commerce/Commerce Control Panel, as defined in theCommerce.Plugin.Content.DefaultContentPathsPolicy
, located in thePlugIn.Content.PolicySet-1.0.0.json
file). You can only exercise this request in the context of a clean environment. (To synchronize only a sub-set of new or changed content items, use the sync content item or sync content path samples). -
In the same folder, execute the
Initialize Environment
request. -
Open the Sitecore Launchpad in a browser and click on Content Editor.
-
In the left pane, navigate to the /sitecore/Content/<tenant>/<site>/Home/Catalogs folder.
-
In the right pane, un-check the Selected Catalog box and save your changes.
-
Re-check the Selected Catalog box and save your changes again.
-
Rebuild the Sitecore indexes, as described here.
-
Republish the site, as described here.