Loading
Get Started with B2C Commerce
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Source Codes as Promotion Qualifiers for B2C Commerce

          Source Codes as Promotion Qualifiers for B2C Commerce

          You can use B2C Commerce to build rules that activate price books, implement storefront redirects, and enable promotions when a valid source code is provided.

          Use source codes to create custom URLs that redirect customers to specialized pages. A source code is typically provided by the customer from a redirect link on an affiliate website or manually entered using a value from a print catalog. Using source codes, you can direct customers to specialized landing pages, featured product detail pages, category lists, and URLs.

          Source code groups contain one or more codes that the storefront handles in a common way. You can configure a source code group to contain one or more source codes or patterns that match multiple codes. You can also map multiple codes to the same set of rules. Define the rules as part the source code group, while still tracking results on a per source-code basis. You can also assign one or more source codes to a campaign, so that all the promotions within that campaign use those source codes.

          A customer can access a merchant's site using a source code URL provided by an affiliate. In that case, the affiliate's source code is activated. When the same customer exits the site then returns to the site from another source code URL, a new source code replaces the previous one. Replacing source codes allows merchants to limit their overall fiscal exposure in both discounts offered and affiliate payments.

          Note
          Note Source code groups have their own effective period and enabled flag. If you want to use a source code group as a qualifier, enable the group and validate that the group dates fall within the promotion schedule.

          A customer can provide an individual source code that is part of an active source code group. Then, the customer qualifies for any active promotion that is associated with that source code group. Only one source code can be active at a time during a session. You can use source codes to control the number and grouping of promotions that a customer can access at one time.

          Source Code Processing of URLs

          When B2C Commerce receives a source code as a URL parameter, it validates the code. It checks the existence, enabled status, start date, and end date of the parent source code group.

          • If the source code is active and valid, B2C Commerce stores the current user session and the source code in a cookie.
          • If the source code isn't active and valid, B2C Commerce ignores it and shows the normal landing page.

          If no source code is received in the URL but cookies are enabled, the storefront tries reading a source code from a stored cookie. If B2C Commerce can retrieve a source code from a cookie, it validates the source code. The length of time that the source code cookie is stored is determined by the cookie duration set for the specific source code group. If no cookie duration is set for the source code group, the cookie duration is set in Business Manager site preferences.

          If more than one active source code group contains the source-code, B2C Commerce uses the most recently created group.

          Source Code Processing of Customer Submissions

          If you want customers to be able to enter source codes into a product page or into the shopping cart, use the B2C Commerce API to validate the source code. If a valid source code is available, B2C Commerce:

          • Enables all promotions that use the source code group as a qualifier
          • Optionally enables a selected price book
          • Optionally redirects the customer to a product, category, page, or URL

          If you want to redirect the customer, you can:

          Source codes that belong to the same source code group get processed in the same way. If the URL contains a second source code parameter, B2C Commerce only evaluates the first parameter and ignores the second. An example of a URL with a second source code parameter:

          http://user.dw.demandware.net/on/demandware.store/Sites-YourShopHere-Site/​default/​SourceCodeRedirect-Start?src=ACME&src=KATJA

          Because only one source code group can be active at a time, B2C Commerce considers source codes that belong to different source code groups to be inactive. These source codes can be mapped in a similar manner, but to a different product, category, page, or URL.

           
          Loading
          Salesforce Help | Article