---
schema_version: "1"
id: 7ad22a4d5b12a796b64c575571e27ebee788e58b6a87854b9b45bd0c9f4efb44
title: A/B Test Rank Precedence for B2C Commerce
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_ab_test_rank_precedence.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_ab_test_rank_precedence.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: de3569d15049cac1588c27eb1d77bca8cdf7b37a8fc2df6c9abb0cc681f5943f
description: 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.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# A/B Test Rank Precedence for B2C Commerce

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.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)

Note The rank of a slot configuration that you assign to an A/B test segment is irrelevant. Slot configurations that you assign to an A/B test take precedence over slot configurations that you assign to a campaign or to a site. A customer can only participate in one A/B test segment at a time. Because of these rules, there’s no case where the rank of the slot configuration that you assign to a segment compares to another rank.

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](https://help.salesforce.com/s/articleView?id=cc.b2c_how_sorting_rules_work.htm&release=264.0.0&type=5 "B2C Commerce Sorting rules enable you to control the presentation of search results to the customer. Use sorting rules to bring products to the attention of customers by having them appear at the top of search results. Use any attribute to sort search results or a weighted blend of multiple attributes. To blend multiple attributes, create dynamic attributes.") 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.