SiteGenesis Source Codes

The source code feature is implemented in the SiteGenesis application as follows.

Path Name Description
Pipelines/Application SourceCodeRedirect.xml

This pipeline retrieves the redirect information from the last processed SourceCodeGroup (active or inactive).

If none exists, the redirect information is retrieved from the source-code preferences, based on the active/inactive status of the SourceCodeGroup. The redirect information is then resolved to the output URL, and the next connector is returned. If the redirect information can't be resolved to a URL, or there is an error retrieving the preferences, then the error connector is returned.

The common/redirect interaction node links to util/redirect/redirect.isml (see below), which is a placeholder for a reporting entry in case a source code is available. This template includes util/reporting/ReportSourceCodes.isml (see below), which reports the use of a source code if it is appropriate.

Pipelines/Application OnSession.xml

This pipeline is called for every new session. You can use this pipeline to select promotions or price books based on source codes in the initial URL.

Important: For performance reasons, keep this pipeline short.
Templates/checkout/cart minicart.isml

This template includes util/ReportBasket.isml (see below), which in turn includes util/ReportSourceCodes.isml (see below) to keep track of source code data.

Templates/util redirect.isml

This template creates a reporting entry for source codes. The source code entry page is a special pipeline that performs a redirect at the end of using this template. Salesforce B2C Commerce only creates a log entry if a source code is available in the session.

The template includes util/ReportSourceCodes.isml (see below) to keep track of source code data.

Templates/util/reporting ReportBasket.isml

This template includes util/ReportSourceCodes.isml (see below) to keep track of source code data.

Templates/util/reporting ReportOrder.isml

This template logs information about an order. It includes util/ReportSourceCodes.isml (see below) to report on source code data.

Templates/util/reporting ReportSourceCodes.isml

This template must be placed on every page that can be a redirect result of a source code incoming to the session/visit. It can also be placed on every page or, as shown in the SiteGenesis application, as part of the minicart, which is part of every page.