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
          A/B Testing for Developers in B2C Commerce

          A/B Testing for Developers in B2C Commerce

          Use the Salesforce B2C Commerce APIs if you want to use more than promotions, sorting rules, and slots to create a unique A/B testing user experience. This topic applies to B2C Commerce.

          For each test segment, include effects in templates that change business logic, visual elements, or other user experiences based on test group participation. Use the B2C Commerce API to determine participation in a specific group of a specific test. Then use this information in conditional logic to alter the experience for participants of the segment in various ways.

          Configure a test group that has automatically applied effects, custom effects or both.

          Tip
          Tip Don't create a test segment without automatically applied effects (for example, sorting rules or promotions) or any custom effects via the scripting API. As a best practice, avoid creating this type of segment because it's the same as the control group and provides no useful results.
          Note
          Note B2C Commerce has no way to validate that custom effects have been applied for a test group.

          To create a custom test experience for a test segment, set the Enable/Disable Custom Scripting setting for that segment within the Business Manager A/B test module. By enabling this setting, you’re notifying B2C Commerce that the specific A/B test segment includes more changes to the storefront that you implement in script. For example, to select a different price book, create a pipeline that makes a price book available to participants in a specific test group.

          Caching Impact

          Assuming that every A/B test group can have a custom experience through a script leads to caching performance problems. These problems occur because B2C Commerce caches a different version of each page for participants in each A/B test segment. It caches different version in case the script affects the segments differently. Instead, B2C Commerce assumes that only the segments where the Enable Custom Scripting setting is set cache separately.

          If you write a script and don’t indicate that a segment has a custom experience, then the cached version of the page is based on the participating segment for the first storefront customer to access the page. Thereafter, all storefront customers get the page as if they were in that segment. If the first storefront customer isn't a participant in any test segments, then it eliminates custom experiences for that page for all test segments.

          Warning
          Warning If you use this setting but don't actually use a script, you can impact performance.
           
          Loading
          Salesforce Help | Article