20 votes
Accepted

Can I change the order of components in placeholder based on personalization?

No. But it won't take all that much custom development to achieve. A full detailed answer would be blog post sized; so am just posting the general principle here for inspiration. Your problem is; ...
Mark Cassidy's user avatar
  • 25.1k
15 votes
Accepted

Automation Engine can't find custom predicate

Turns out this had a really easy answer (after conferring with Sitecore Support). XML-files for Automation Engine must have the prefix sc., so I renamed MyPredicates.xml to sc.MyPredicates.xml, and ...
TheHvidsten's user avatar
  • 1,004
11 votes
Accepted

How to invoke other actions in Conditional Renderings?

When you set a conditional rendering, the data for the condition and action is stored inside the Layout. Here is an example of a rendering with an "Alternative Datasource" rule that is applied if the ...
Kasaku's user avatar
  • 4,164
10 votes

Can I change the order of components in placeholder based on personalization?

A less ideal, but easier to implement solution, would be to personalize both the datasource and the rendering (assuming these are different types of components). Assuming you have a placeholder with ...
Jason St-Cyr's user avatar
  • 6,761
8 votes
Accepted

How to group multiple rules to one rule condition?

There are already predefined rules in Sitecore. You can create your own rule there and then use it while setting personalization for a component. Here are the steps: Open in Sitecore /sitecore/...
Marek Musielak's user avatar
  • 23.6k
7 votes
Accepted

List segmentation on custom rule YourLinqIsTooStrongException error

Sadly, my solution was too ambitious for the Sitecore predicate engine. The solution was to re-write the condition to a bare-bones implementation where a Facet it retrieved by strong-typed class. ...
Mark-Danney's user avatar
7 votes
Accepted

Is there any way to check Page mode like edit/preview using Sitecore Rule?

You need to create your custom rule for this. Create a class which inherits StringOperatorCondition: using Sitecore; using Sitecore.Rules; using Sitecore.Rules.Conditions; namespace ClientName....
Peter Procházka's user avatar
6 votes
Accepted

How do I execute an action when a user clicks a link in an EXM email?

I think the part you might be missing is that actual action of clicking a link in an EXM sent email message is that the link goes to a page that sits outside of the Sitecore item structure. That page ...
Pete Navarra's user avatar
  • 14.6k
6 votes

How to invoke other actions in Conditional Renderings?

It's possible to utilise Global Rules in order to set the placeholders, the Global Rules however are essentially "Condition and Action" items which would allow you to then use a "where CONDITION X is ...
jammykam's user avatar
  • 13.8k
6 votes
Accepted

Difference between current visit and contact

You're right. Current **visit** is for the current interaction. Whatever happened during your current visit will be used to find the best matching pattern. Current **contact** is for the overall ...
Marek Musielak's user avatar
  • 23.6k
5 votes
Accepted

Prepopulate WFFM field with username

Based on this blog post the only valid options are Comment, Name and Full Name. You can try changing your value from User Name to Full Name but I'm not sure if it will give you what you need. You may ...
Christian Hagelid's user avatar
5 votes
Accepted

ClientScript.RegisterForEventValidation in a custom RuleAction class

Not sure if it is possible to call RegisterForEventValidation from inside RuleAction. You can try different approach. Instead of adding your values from javascript add all possible values into ...
Bartłomiej Mucha's user avatar
5 votes

How many personalization rules are too many? At what point does page/site performance start to take a hit?

Without having done any testing, I think that one of the important considerations here would be "what kind of personalization conditions will cause performance impacts?" The rules engine is very ...
Matthew FitzGerald-Chamberlain's user avatar
4 votes

Adjust component parameters based on placeholder

You're quite right about why it's not working - MVC renderings don't execute the global conditional rendering rules. This is not something I've had to do, but here's a suggestion. Someone might be ...
Kasaku's user avatar
  • 4,164
4 votes
Accepted

How to check if contact has ever opened specific EXM email?

You don't need to implement anything. You already have what you need. First, enable Engagement Automation for the Rules Engine group you need it for. I'm going to show you Conditional Renderings. ...
Mark Cassidy's user avatar
  • 25.1k
4 votes
Accepted

WhenCondition<T> Rule custom code not firing

What you're building isn't really a WhenCondition<>. It's a StringOperatorCondition<>. As it stands right now, your code pays no attention to the operatorwhich would be configurable in ...
Mark Cassidy's user avatar
  • 25.1k
4 votes
Accepted

Rule condition with multiselect?

OOTB Sitecore, this is not possible. However, you can still use the Treelist and there is no need to create different conditions. The way I use the treelist is as shown below Rule Creation where ...
Hishaam Namooya's user avatar
4 votes
Accepted

Some Sitecore 8 conditions for conditional renderings seem missing in Sitecore 9

[Answering my own question here] After some digging I found that this rule, which has as 'Type' definition: Sitecore.ExperienceAnalytics.Aggregation.Rules.Conditions.ReferrerCondition,Sitecore....
Joost's user avatar
  • 505
4 votes
Accepted

Insert Options Rules with AND taking precedence over OR

You are right. OR takes precedence. You can try (A and B) or (A and C) or (A and D) rule: where true would be your A condition, and template rules would be your B, C and D. Yeah, I know it's ...
Marek Musielak's user avatar
  • 23.6k
4 votes
Accepted

Missing personalization rules around GeoIP

I just had this issue yesterday. The problem is that if you have tracking disabled on your CM instance, there is a visibility rule that prevents the whole section from showing up. This means that even ...
Matthew FitzGerald-Chamberlain's user avatar
3 votes
Accepted

Sitecore validation rule at field level in multi-list value selection range

You can pretty much reuse the first regex, just instead of saying that you need 0-5 guids, you should say that you need 0 or more groups of 2 guids: ^({[^}]+}[|]{[^}]+}[|]?)*$ So in fact you use ...
Marek Musielak's user avatar
  • 23.6k
3 votes
Accepted

Sitecore personalization rule "goal was triggered during a past or current interaction" not being triggered

After spending some time with the question asker, we determined the root issue. The root problem statement was that Personalization wasn't occuring unless the user in the above example refreshed ...
Pete Navarra's user avatar
  • 14.6k
3 votes

Adjust component parameters based on placeholder

Just to add onto @Kasaku's response, if you are looking to create a processor for the <renderPlaceholder> pipeline that will run rules then you will either want to create a new processor to run ...
Zachary Kniebel's user avatar
3 votes

How do I restrict mime types on files uploaded through a WFFM form in MVC?

I know that you are looking for a way to do it via the Rules Engine. However, you can do it with a custom field validator. You can restrict the MIME types that are passed to the custom validator ...
C Sigmon's user avatar
  • 421
3 votes
Accepted

Dependency Injection for a Sitecore Rule

I do not know of any version of Sitecore that supports Dependency Injection for Rules out of the box. Using dotPeek against 8.2 Sitecore.Kernel.dll it looks like you can override the default ...
Joe Bissol's user avatar
3 votes
Accepted

Converting RuleList back to XML

The Short Answer The short answer is that you can't convert a RuleList<T> back to XML, in Sitecore, using the Sitecore API. However, there is a class, the Sitecore.Rules.RuleDefinition class, ...
Zachary Kniebel's user avatar
3 votes

How many personalization rules are too many? At what point does page/site performance start to take a hit?

In my opinion, the only answer to your question is "it depends". It depends on many factors: what is the acceptable page generation time how many visits your site has how many servers you have can ...
Marek Musielak's user avatar
  • 23.6k
3 votes

How many personalization rules are too many? At what point does page/site performance start to take a hit?

Nothing significant from a performance perspective. But there are other issues. I wouldn't worry about this from a performance perspective. While there is a certain overhead on the Rules Engine I ...
Mark Cassidy's user avatar
  • 25.1k
3 votes
Accepted

Insert Options Rule where Item contains language (NOT Item language is)

I don't think the Rules Engine can really help you here. The reason being; it comes with a lot of pre-baked conditions related to items. As opposed to item versions. I've done something else for a ...
Mark Cassidy's user avatar
  • 25.1k
3 votes

How do I assign the same Conditional Rendering Rules to Multiple Components?

There is no easy way to copy the rules from page to page. This is because the rules are in the xml for the presentation details. And it is really tough to read. <rls> <ruleset>...
Chris Auer's user avatar
  • 13.1k

Only top scored, non community-wiki answers of a minimum length are eligible