Create an A/B Test for B2C Commerce
A/B tests contain multiple user experiences, one of which is the control group. For each experience (and the control group), assign one or more promotions, slot configurations, or overrides to default category sorting rules.
Required Editions
| Available in: B2C Commerce |
Quotas enforce the following limitation: Maximum of five test segments within a test, including the control group segment, so four user-defined segments total. We recommend that you run one test at a time.
After you create and usedan A/B test, you can change it to focus on different metrics, promotions, content, or sorting rules or customer groups.
-
Click App Launcher
, and then select
Merchant Tools | Site | Site Preferences | A/B Tests. Enable A/B testing for the appropriate instance on the A/B test
Preferences page.
-
Click App Launcher
, and then select Merchant Tools | Site | Online Marketing | A/B Tests.
-
On the A/B testing list page, click New to create a test
configuration (or double-click an existing test configuration).
When you open an existing test, you see an error: Fields are disabled because this test has already started. Click here to enable editing this test. If you click this message, a window opens asking, Are you sure you want to enable editing this test? Editing a test could invalidate its results. Click Enable or Cancel.
-
On the A/B test details page, enter or modify the following information:
- Enter a unique ID or accept the default that was automatically created. This field isn't modifiable if you’re editing an A/B test.
- Select Enabled (Yes or No).
- Enter or modify the optional description.
- Enter or modify the optional email notification address. Emails are sent hourly. They occur when a test ends, the results become statistically significant, or a test is paused or resumed.
- Enter optional tags into the Tags field (separated by a comma, if entering multiple tags), and click Add to add them. Use tags to group similar tests and find them more easily in a search on the A/B testing dashboard page.
- Select a key metric.
-
Select a participation.
For a Category Page View trigger, click Edit to select one or more categories.
For a Pipeline Call trigger, enter a pipeline name.
- Select a participant expiration type (Session or Never).
- Specify the scheduled start and end dates. Schedule an A/B test to last up to 90 days.
-
To make the A/B test effective for certain customer groups, click
Edit beside Customer Groups.
On the Assign Customer Groups page, use search and navigation controls to find the customer groups you want.
Select one or more customer groups.
Select Qualifying customer must belong to all the selected customer groups if membership in all selected customer groups is required for the customer to qualify. When this isn't selected, membership in only one customer group is required for the customer to qualify.
Click Apply.
- Scroll down to the A/B test Segments section.
-
Delete test segments and test experiences within test segments.
- To delete a test segment, click the delete icon beside the test segment (to the right of the Add Experience button).
- To delete an experience, click the delete icon beside the experience (beside the Enabled column header).
- To delete an experience element, click the delete icon beside the experience element (beside the item's enabled setting).
-
For each test segment:
- The mandatory ID is accessible by the Salesforce B2C Commerce API and import/export.
- The optional description isn't available from the B2C Commerce API because it isn't for use in the storefront.
- The description isn't localizable and not available from the B2C Commerce API because it isn't for use in the storefront.
- Define an allocation percentage that determines the distribution of participants among the test segments, including the control group.
- Create a test experience for promotions, slot configurations, and sorting rules.
- Click New Test Segment. A panel for the new test segment is added to the page.
-
In the A/B test Segments section, click Add Experience to add
user experience.
-
Click Add Slot Configuration.
On the Assign Slot Configurations page, select one or more slot configurations and click Apply.
-
Click Add Promotion.
On the Assign Promotions page, select one or more promotions and click Apply.
-
Click Add Sorting Rule.
On the Assign Sorting Rules page, select one or more sorting rules and click Apply.
Note Link the selected sorting rule to a storefront sorting option that is set to display in A/B tests only. -
Click Add Keyword Search Sorting Rule.
On the Assign Sorting Rules page, select one or more sorting rules and click Apply.
- Click Add Custom Scripting.
-
Click Add Slot Configuration.
- Click Apply to accept the changes to your A/B test.
- To review a test segment on the storefront, click the Preview Icon.

