Route mappings allow you to create permanent (301) and temporary (302) redirects as well as a special ‘rewrite’ which renders the existing content without any redirect. A permanent route mapping is created automatically when you change the path of a product, product category, page or article. The Route Mapping record can be deleted if the redirect is no longer required. Your route mapping records can be found in the storeConnect® Config app.
Products have a slug which must be unique within Salesforce, meaning no other product can have the same slug. Product Categories, Pages and Articles each have a path. These only need to be unique within each store, meaning two stores can each have a page with the same path.
It can occur sometimes where you try to create a new record and you get an error saying the slug or path must be unique. After checking, you find there is no other record with the same path. What has possibly happened is that a record did once have that same path and has since been given a new path or perhaps deleted. Check the Route Mapping records for a reference to the path you want to use and delete it to free up the path for use.
Migrating to storeConnect
If migrating an existing store into storeConnect, you will want to ensure any search engines and external links can still get traffic to your new site. To make sure this occurs, you can create your own Route Mapping records to redirect from the old URL to the current URL. This works best when your new store is on the same domain as the old so you can use relative paths for the redirects. These can also be bulk uploaded using a tool like dataloader.io.
A product by default has
/products/ before its specified slug to create its relative path. This can be changed by editing the Product2 URL Path setting in your orgs Custom Metadata Types setting from Setup.
Back to Documentation