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 ...
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/...
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.
...
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....
7
votes
Accepted
How can I use Sitecore Rules in Scriban templates in SXA 9.3
Yep! You can do it by adding Rule item under your Sriban template item and using sc_evaluate function inside of the template.
Example:
I have a page which has two fields:
Title
Brand
And I want to ...
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 ...
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 ...
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 ...
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 ...
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.
...
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 ...
4
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 ...
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 ...
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 ...
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....
4
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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, ...
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 ...
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 ...
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 ...
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>...
3
votes
Accepted
Sitecore personalization based on at least two pages visited from set of pages
Mahendra almost has it right, but for the rule that should be triggered if 2 or more pages have been visited, you would need to use a combination of Profiles and Values.
Create a Profile Card for ...
3
votes
Custom Personalization rule: hide component if url contains a regex condition
When creating the code for your custom personalization rule it should implement StringOperatorCondition class:
public class CustomQuerystringCondition<T> : StringOperatorCondition<T> where ...
2
votes
Capture Rules Engine Stack Overflows
It might be possible to achieve this with a little hackery (if you can stomach it)...
Unfortunately, as you correctly identified, the RuleFactory is static, and therefore you can't replace it ...
2
votes
Accepted
General Link Dialog "InsertLinkViaTreeDialog" misses InsertLinkRules after Upgrade to 8.2u2
Sitecore 8.2u1
Previously InsertLinkButton values were populated with InsertLinkButtonRule (rule item id: {CEDD4633-193B-4D79-8DCC-C49B3C8D0F53}). Where TargetControl of this rule is InsertLinkButton ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
rules-engine × 68personalization × 27
sxa × 6
wffm × 4
segmentation × 4
xdb × 3
content-search × 3
content-testing × 3
marketing-automation × 3
geo-location × 3
goals × 3
xconnect × 2
exm × 2
experience-analytics × 2
presentation × 2
list-manager × 2
validation × 2
solr × 1
sitecore-client × 1
powershell-extensions × 1
media-library × 1
publishing × 1
upgrade × 1
mvc × 1
multilingual × 1