1

Additional context: most responses I've seen to similarly asked questions either here, or on unofficial salesforce slack channel seem to imply that "custom code" is the solution. After some digging, what I've posted below seems like one possible solution As a follow up to: "Is there a built-in way to filter product search results based on customer group?" I'm curious if anyone has any other workaround approaches using built-ins?

Possible Solution in BM...

CLICK PATH: Merchant Tools>Online Marketing>Campaigns>New Campaign

  • select customer groups
  • select add experiences and then choose your sorting rule as configured below (NOTE: you'd have to configure the sorting rule first in order to use it here)

CLICK PATH: Merchant Tools > Search > Sorting Rules

  • Choose a specific category to sort from Note: you may also want to configure slots to deal with the population of items

1 Answer 1

0

Your proposal w/ dynamic sorting rules would certainly push the products out of the way, that you wouldn't want other customers to see. But it wouldn't make them completely invisible to those people.

For a bandaid fix I think that (above) would possibly work, but it wouldn't hide the category.

To fully complete the solution, you'll need custom code changes but be careful of caching!

My suggestion is to put a custom attribute on the category object. That attribute would have one or more customer group IDs in it.

You'd then need to modify your header menu include to have a promotion sensitive cache. Your experience would need to include a promotion so that it can trigger caching properly for specific customer groups.

Then in Search-Show controller you need to check to ensure that the customer visiting the current category is in one of the customer groups that are listed in that custom attribute. (if it is populated, otherwise it's a 'public' category) If they're not in one of the groups, then show a 404/410 response.

Then in addition to that... you'd likely need to modify the Product-Show controller to see if that product is only merchandised in a category that has customer group limits and if so, ensure that the customer is in one of those groups. Otherwise, show a 404/410 response.

1
  • thank you!! This is a huge help :) Commented Mar 17, 2021 at 15:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .