Source Code Best Practices for B2C Commerce

Plan the governance around B2C Commerce source code groups: how you educate your marketing team, test promotions before and after go-live, define build-and-release roles and timelines, stage imports, and decide when to use a source-code pattern instead of individual codes.

These best practices cover the operational side of managing source code groups: how to plan, build, test, stage, and release source code groups so your promotions behave predictably in production.

Education and Documentation

Provide the marketing and merchandising team with a clear understanding of how source code groups have been implemented within the storefront.

Testing Promotions

  • Have source code groups tested by both the creator and requester.
  • Test source code groups as soon as they go live into production.
  • Maintain a main list of campaign, promotion, and source code group assignments.

Implement and Document the Source Code Workflow

Develop a workflow for the build, review, and release of source code groups:

  • Identify clear roles and responsibilities related to source code groups within your organization.
  • How are requests for additional source code groups made?
  • What signatures are required, at which steps?
  • What are the specific timelines and deadlines?
  • Who is creating source code groups?
  • Who is managing source code groups after they go live?

Incremental Imports of Source Code Groups

B2C Commerce supports incremental updates to the set of source code groups. This functionality is useful in cases where external systems provide source code groups in chunks, and you import them into B2C Commerce.

Staging

Import source code groups and their codes into Staging, test them in Staging, replicate and test in development, and then replicate them to production.

Using a Source Code Pattern

Do your source codes follow a pattern? If you need more than 100 source codes per source code group, we recommend that you use a source code pattern instead of individual source codes.

A source code group is a group defined by a pattern. When the system processes a source code, If the pattern matches, the source code group is recognized and activated. You don't need to add all source codes explicitly. Adding the code is an exception, rather than the rule, and limited to a few hundred source codes. The source code group pattern is used for recognition, but the actual code is preserved and stored with the session.

Note
Note If your source codes don’t follow a pattern, consider reimplementing your source code solution.

For example, you have multiple source codes and a series of sale catalogs. One source code is specified for each sale catalog. The storefront encompasses all of these sales catalogs, and you want to direct all of the source codes to one Outlet area of the storefront. You can:

  1. Create a Source Code Group, for example, SALE that encompass all of the catalogs, with an initial Source Code specification of SPRING*.
  2. Use the specification of SPRING* to include all your source-codes with SPRING in the name, representing all Spring Sale catalogs, such as, SPRINGOUTDOOR, SPRINGHOME, SPRINGWOMENS.
  3. On the Redirects tab, associate the SALE source code group with the category ID of the Outlet section of your storefront.

Alternatively, create the same SALE Sources Code Group, and within it, create a series of source code specifications aimed to encompass individual source codes. For example:

  • Source code group: SALE
  • Source code specifications:
    OUTDOOR[N1..1000], HOME[N1..1000] and WOMENS[N1..1000]
    This specification encompasses source codes OUTDOOR1 through OUTDOOR1000, and so on.