2
votes

I am looking for a generic method of filtering a series of sitecore items based on the users current profile, I found one promising example:

How do I trigger a profile in Sitecore DMS?

However a few critical references are missing which is a shame as it looks to be a suitably generic function

Resources.Settings.AnalyticsUserProfileEnableSwitch I assume to simply be a boolean switch

The killer is ApplyUserProfile(filter)

1
Do you mean Profile as a Sitecore.Security.UserProfile class from Sitecore.Context.User.Profile or Sitecore DMS Sitecore.Analytics.Data.DataAccess.DataSets.VisitorDataSet.ProfilesRow from the Tracker.CurrentVisit.Profiles? - Marek Musielak

1 Answers

0
votes

Please keep in mind that user profiles are NOT the same thing as profiles in DMS. In DMS this is in reference to Analytics profiles related not to the specific user, but in visiting profiles... i.e. Marketing personas.

If you want to filter items based on user profiles, you simply get the Sitecore.Context.User.Profile and get whatever the property is and implement your logic to how you want to filter.

If you want to filter items based on DMS profiles, then that's something that's going to be difficult to do due to the fact that personas are not entered into the Analytics database real time. Those really aren't something you'll even be aware of at run time and therefore it's going to be difficult to categorize the persona at run time. You could, however, use the rules system to do some filtering based on other criteria (such as using the Engagement plans or something else)... but without more information, that's about as much as can be said.