This guide covers how to activate store-specific price books and promotions when the shopper sets their local store.
Set the Shopper Context
- Follow the instructions in Set and Retrieve Shopper Context.
- Set the qualifier as key and value pair. Use the same qualifier name as in the assignment.
customQualifiers: Set when you want to trigger pricing and promotion experiences using a dynamic session-based customer group.assignmentQualifiers: Set when using the assignment framework. Can be used to trigger pricing and promotion experiences on pages such as Products, Product Search, Basket, and Shipping method.
{
"assignmentQualifiers": {
"storeId": "boston"
}
}
Create the Assignment in Business Manager
Create the assignments using the import and export feature of Business Manager.
Log in to the Business Manager and go to Merchant Tools > Online Marketing > Import & Export.

Use the following sample assignment.xml file to import the assignment into B2C Commerce.
<?xml version="1.0" encoding="UTF-8"?>
<assignments xmlns="http://www.demandware.com/xml/impex/assignment/2020-11-30">
<assignment assignment-id="assignment_store_boston_promotion">
<description xml:lang="x-default">Promotions assigned to Store Boston</description>
<enabled-flag>true</enabled-flag>
<assigned-sites>
<site>SiteGenesis</site>
</assigned-sites>
<qualifiers match-mode="any">
<qualifier type="storeId">boston</qualifier>
</qualifiers>
<experiences>
<pricebooks>
<pricebook-id>sale_pricebook</pricebook-id>
</pricebooks>
<promotions>
<promotion-id>10_%_off_electronics</promotion-id>
</promotions>
</experiences>
</assignment>
</assignments>