Restricting a catalog to a buyer
This indirection is deliberate. Because the restriction lives on the Store, you can point several Business Units at the same Store to share an assortment, or give a Division its own Store (using the Store Override Rule from Module 1) when it needs a different one. The catalog follows the Store, not the buyer.
Choosing a mode: Individual vs IndividualExclusion
A Product Selection specifies a subset of the catalog in one of two modes. You pick the mode based on which list is shorter to maintain.
Individual: use this as an allowlist when the buyer should see a small, curated slice of the catalog.IndividualExclusion: use this as a denylist when the buyer should see most of the catalog, with only a few restricted lines removed.
Individual; a buyer who may see 4,950 of 5,000 is far easier to model with IndividualExclusion. The mode is fixed when you create the Product Selection, so choose based on how the assortment will be maintained over time, not just its initial size.Individual Product Selection for Pacific Property Group's Commercial division. With Individual mode, the selection starts empty and you add Products to it explicitly.POST /{projectKey}/product-selections HTTP/1.1
Content-Type: application/json
{
"key": "pacific-commercial-assortment",
"name": { "en-AU": "Pacific Commercial assortment" },
"mode": "Individual"
}
mode confirms the selection's behavior and productCount starts at zero until you add Products.{
"id": "b2c3d4e5-1111-2222-3333-444455556666",
"version": 1,
"key": "pacific-commercial-assortment",
"name": { "en-AU": "Pacific Commercial assortment" },
"mode": "Individual",
"productCount": 0
}
Attaching selections to a Store
POST /{projectKey}/stores/key=pacific-commercial-store HTTP/1.1
Content-Type: application/json
{
"version": 2,
"actions": [
{
"action": "addProductSelection",
"productSelection": {
"typeId": "product-selection",
"key": "pacific-commercial-assortment"
},
"active": true
}
]
}
active flag defaults to false. Omitting it attaches the selection in an inactive state, so its Products do not become part of the assortment until you activate it. Set active: true explicitly when you intend the selection to take effect immediately.The inactive-selection trap
- A Store with no Product Selections includes all Products in the Project.
- A Store with at least one active Product Selection includes only the Products in its active selections.
- A Store whose selections are all inactive and include at least one
Individualselection includes no Products at all, an empty assortment. - A Store whose only selections are inactive
IndividualExclusionselections still includes all Products in the Project.
Individual selections: deactivating the last active selection does not fall back to "show everything." It falls forward to "show nothing." A buyer whose Store has one or more Individual selections attached but all of them inactive sees an empty catalog and cannot place an order, even though the Project is full of Products.active defaults to false, attaching a selection without setting active: true adds it in an inactive state. A Store whose only Individual selection was added with the default flag is already empty, before anyone deactivates anything.Individual mode, the assortment becomes empty; only a Store with no Product Selections, or one left with solely inactive IndividualExclusion selections, shows the full catalog. When troubleshooting an unexpectedly empty B2B catalog, check the active flag and mode on each of the Store's Product Selections before anything else.You toggle the active state with the Change Product Selection Active action. The following request deactivates a selection, the operation behind an empty-assortment incident if it is the Store's only selection.
POST /{projectKey}/stores/key=pacific-commercial-store HTTP/1.1
Content-Type: application/json
{
"version": 3,
"actions": [
{
"action": "changeProductSelectionActive",
"productSelection": {
"typeId": "product-selection",
"key": "pacific-commercial-assortment"
},
"active": false
}
]
}
Worked example: Pacific Property Group
Pacific Property Group is a Company with two Divisions, Residential and Commercial. Both buy from Zen Electron Trade's catalog, but Commercial is entitled to a broader range that includes commercial-grade appliances Residential should not see.
A clean way to model this with the shared-base pattern:
- Create a shared Product Selection in
Individualmode,zen-trade-core, holding the Products both Divisions may buy. Attach it, active, to both Divisions' Stores. - Create a Commercial-only Product Selection in
Individualmode,pacific-commercial-assortment, holding only the commercial-grade Products. Attach it, active, to the Commercial Store only. - Residential's Store carries just
zen-trade-core; its assortment is the shared range. - Commercial's Store carries
zen-trade-corepluspacific-commercial-assortment; its assortment is the union: the shared range plus commercial-grade lines.
pacific-commercial-assortment on the Commercial Store, and because zen-trade-core is still active there, the Store falls back to the shared range rather than to an empty assortment, avoiding the inactive-selection trap.Key takeaways
- A buyer's catalog is restricted by attaching Product Selections to the buyer's Store; Products are never assigned to a Business Unit directly.
- A Store with no Product Selections shows every Product; restriction is something you add deliberately.
Individualmode lists the Products to include;IndividualExclusionlists the Products to exclude. Choose the mode whose list is shorter to maintain.- A Store's assortment is the union of its active Product Selections, which enables a shared-base-plus-buyer-specific pattern.
- Deactivating every selection on a Store empties it when any inactive selection uses
Individualmode, rather than reverting to the full catalog: the inactive-selection trap.