Dynamically assign guest and authenticated buyers to buyer groups for a B2B store by
using custom Apex logics. When buyers visit the store pages, the Apex logic adds them to a buyer
group based on the defined criteria. Assigning buyers dynamically when they visit a storefront
ensures timely, personalized shopping experiences including targeted product visibility,
pricing, and promotions, without manual intervention.
Required Editions
-
In the navigation sidebar, select a store from the Store
dropdown.
-
Select .
-
Click the Buyer Access tab.
-
Enable Buyer Group Extension.
-
In the Buyer Group Extension tile, click Select Provider. Choose
a provider and select your custom Apex class.
-
Click Next and then confirm your selection.
-
To change or remove the provider, use the dropdown menu on the extension tile.
The Apex logic runs each time a shopper visits a page in your store and assigns them
to a buyer group based on the criteria you’ve defined.