B2C Commerce uses rank to control precedence when you configure multiple promotions to apply at the same time. To determine A/B test promotion rank precedence, choose a number from 10 as set by B2C Commerce; you can configure these system objects without a rank (NONE) is considered the lowest rank and evaluated last. Test promotions apply in the order of lowest rank value to highest rank value.
The rank for a promotion introduced for an A/B test group (even a rank of NONE) has precedence over the rank of a promotion outside the context of A/B testing. For example, a promotion of the lowest rank (NONE) that participation in an A/B test segment imposes outranks a promotion of the highest rank that you generally assign to a campaign. If two promotions for an A/B test have equal rank, the tie is broken via existing promotion precedence rules. For example, with equally ranked promotions, B2C Commerce breaks ties using their schedule and last modified dates.
For example, a merchant is testing two promotions, while there are also two promotions within a campaign, as follows:
| Promotion | Container | Rank |
|---|---|---|
| 20% off on all Damon brand products | A/B test | NONE |
| 30% off on all fall blouses | A/B test | 60 |
| Buy one fall blouse, get one 50% off | Campaign | 10 |
| $10 off on all Damon brand products | Campaign | 20 |
A customer buys two Damon fall blouses. All the promotions in the previous table apply at the same time. Because A/B testing rank has precedence over a rank of the same type of experience outside the context of A/B testing, the customer receives either 30% or 20% off on both blouses, depending on which segment the customer enters.
Sorting Rule Inheritance
B2C Commerce handles sorting rule inheritance the same way for both A/B tests and Campaigns. For example, if you have categories A > B > C and only assign a sorting rule to A, B and C inherit the sorting rule. If you assign a different sorting rule to B, A has its assigned rule and B and C have the rule you assigned to B. If you assign only a rule to A, and create an A/B test that overrides the sorting rule assigned to A, A, B, and C all use that rule. However, if you assign a rule to B, then even if you override the sorting rule at A, B doesn't inherit it.
This is similar to how A/B tests work with promotion exclusivity. A global exclusive promotion that isn’t part of an A/B test still has precedence over a class exclusive promotion that you add as an A/B test experience. A/B tests don’t change these rules. The only precedence A/B tests have is when we’re comparing ranks to see which slot configuration to show, for example, an A/B test experience has precedence over normal site behavior.
However, you must configure your A/B tests to take advantage of sorting rule inheritance. In general, when configuring an A/B test with sorting rules, you must only select the top-level categories and rely on inheritance, and not select all subcategories in the category tree (explicitly assigning a sorting rule to each category). With A/B tests, not only can you change the inherited sorting rule, you can also change the sorting rule that was assigned in the catalog.
For example, assume the following sorting rule inheritance for a catalog:
Catalog (rule 1 assigned)
- category A (rule 1 inherited from catalog)
- category B (rule 2 assigned, overrides rule 1 from category A)
- category B1 (rule 1 assigned, overrides rule 2 from category B)
- category C (rule 1 inherited from catalog)
- category D (rule 3 assigned, overrides rule 1 from category C)
We want to A/B test the effect of assigning rule 1 to categories B and D. Half of the customers get the normal sorting rules; while the other half gets rule 1 for categories B and D. You want the second half of customers to get sorting rules as if you assigned them this way:
Catalog (rule 2 assigned)
- category A (rule 2 inherited from catalog)
- category B (rule 1 assigned, overrides rule 2 from category A)
- category B1 (rule 1 inherited from category B)
- category C (rule 2 inherited from catalog)
- category D (rule 1 assigned, overrides rule 2 from category C)
An A/B test doesn't completely replace the normal configuration for a site, it only adds to it. This means you can't assign rule 1 to the catalog in the A/B test and have all the categories inherit it. Assign sorting rules to categories in the A/B test that change the normal configuration to the one you want for the test. The difference between the two configurations is as follows:
- Instead of assigning rule 2 to category B, assign rule 1 to category B.
- Instead of assigning rule 3 to category D, assign rule 1 to category D.
In Business Manager, this equates to a single sorting rule experience for rule 1 that you assign to categories B and D. Because A/B test experiences take precedence over normal site behavior, when a customer is in the test, the customer gets rule 1 for categories B and D, and their descendants.
In another example, assume a different A/B test of the effect of assigning rule 2 to all categories. In this case, the only normal sorting rule assignment that is correct is for category B. You must change the assigned rules for categories A, B1, C, D, and the catalog. In Business Manager, this equates again to a single sorting rule experience for rule 2 that you assign to categories A, B1, C, and D, and the catalog.