You can support a friendly URL that a customer can enter. This
URL takes the customer to a specific page that shows the results of the
search of category JA
, for example. You should test a dynamic URL
mapping.
-
Select
site > Merchant Tools >
Online Marketing > Source Code Groups.
-
On the Source Codes Groups page, click Find to view
the list of source code groups.
-
Open the selected source code group.
-
On the Codes tab, enter SpringSale into the
Source-Code Specification field and click Add.
-
On the Redirects tab, select the Active: Category
option, enter the JA category code, and click
Apply.
-
Select
site > Merchant Tools >
SitePreferences > Source-Codes.
-
On the Source Code Preference page, enter src into the
URL Parameter Name field.
-
Enter http://www.yourstore.com/specials/ into the
Standard Redirect URL field.
-
Click Apply.
-
Select
site > Merchant Tools > SEO > Aliases.
-
On the Aliases page, enter www.yourstore.com.
-
Click Save.
-
Select
site > Merchant Tools > SEO > Dynamic
Mapping.
-
On the Dynamic Mapping page, enter /specials/?src=*
p,,,SourceCodeRedirect-Start,,src,{0}.
-
Click Save.
What appears on the left side of the space characters
(/specials/?src=*
) is only a fragment of a URL. Salesforce B2C
Commerce searches through the aliases list to find an entry (in this case,
www.yourstore.com) that can complete the URL. B2C Commerce then interprets
src as a parameter and knows to give it the value "SpringSale".
The left side of the space character is
replaced by the codes on the right side. B2C Commerce interprets the right side of
the assignment as an instruction to go to the Start node of the
SourceCodeRedirect
pipeline and pass in the value of the
source code in the calling URL. While src
is the name of the
parameter, {0}
references the first argument of the URL.
-
Select
site > Online Marketing >
Source Code Groups.
-
On the Source Codes Groups page, click Find to show
the list of source code groups.
-
Open the selected source code group.
-
On the Codes tab, enter a test source code into the
Source-Code control and click Test Match.
One or more sample Redirect URLs are listed at the bottom
of the page. Copy one sample URL at a time into the navigation bar of
your browser to test how it behaves.