19

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; the Rules Engine operates on an if-else-then basis, and it does so by-component. You have no control over component relationships. Reasons for this are many; but ...


13

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 lo and behold the exception disappeared and my rules were executed without any problems. Seeing as the documentation never mentions this, it is a very easy ...


11

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 current date is Wednesday: <r xmlns:p="p" xmlns:s="s" p:p="1"> <d id="{FE5D7FDF-89C0-4D99-9AA3-B5FBD009C9F3}"> <r uid="{B343725A-...


9

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 two renderings (A and B) defined, you add personalization to A and B to swap. e.g. On A, set a personalization rule to display B with B's datasource when the ...


8

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/system/Marketing Control Panel/Personalization/Predefined Rules item (in older Sitecore versions the item was called Predefined Conditions) Create new item using ...


7

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.Foundation.SitecoreExtensions.Rules { public class IsExperienceEditorMode<T> : StringOperatorCondition<T> where T : RuleContext { ...


6

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. public class ExmReminderEmailDateCondition : ICondition, IMappableRuleEntity, IContactSearchQueryFactory { public Expression<Func<Contact, bool>> ...


6

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 is \sitecore\RedirectUrl.aspx. Because that's the case, there isn't an item in Sitecore that allows you to tap into that action through the Sitecore UI, ...


6

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 met, set the Placeholder to Y". There is more details on the specifics on this blog post: Changing placeholders with Rules The downside of this is that the ...


6

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 values gathered in all the contact interactions. From what I remember (but DO double check it) current visit values are not included when calculating this one.


5

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 need to create a very simple custom field for this, or alternatively create a custom rule action as per the linked article.


5

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 dropdown on WFFM form designer and then hide some of them with javascript. Thanks to this you will not have to register any values for valudation.


5

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 performant in general, so it's really the performance of the individual conditions that would matter. Some personalization conditions would be relatively ...


4

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 able to suggest a better method, but here are a couple of suggestions: Setting parameters during rendering You could look at amending the mvc.renderPlaceholder ...


4

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. After this, you can use the built-in rule. Point it to your "Message Opened" state that you mentioned, and you're good to go.


4

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 the rule via your definition string. where the cookie [operatorid,StringOperator,,compares to] [value,,,value] While you could extend your class for this, it ...


4

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 current investor matches one of these [AssociatedInvestor,Treelist,root=/sitecore/content/Home/Investor Types,selected types] The below screenshot is the outcome ...


4

[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.ExperienceAnalytics Actually is nowhere to be found in the Sitecore 9 Sitecore.ExperienceAnalytics assemblies. So I decided to file a Sitecore support ticket. The ...


4

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 repeating A condition for every OR part but I don't think there is any better solution unless you create a predefined rule with the whole B or C or D part and then you ...


3

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 regex which says: I want a guid {[^}]+} a pipe | and another guid {[^}]+} then maybe pipe |? Everything is wrapped with ( and )* so you say that you want 0 ...


3

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 their browser. The reason behind this is that the IdentifyAs() method was being called in a component that isn't executed until Sitecore has already determined ...


3

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 your rules or extend and replace the OOTB Sitecore.Mvc.Pipelines.Response.RenderPlaceholder processor. From a performance standpoint, your best bet would be to ...


3

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 through a parameter named MimeTypesNotAllowed, and these are injected into a property of the same name and map them in Sitecore. Take a look at https://...


3

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, that you can use to manipulate Rule XML. If what you really want to do is convert a RuleList<T> back to XML then you could reverse engineer the Sitecore....


3

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 you cache some parts of your pages how fast your servers are how fast you can get the client zip code and many many more. Maybe instead of creating ...


3

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 would not consider it significant enough to have any real performance impact for up to a good chunk of conditions. That said, there are a few things to consider: ...


3

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 lot of projects I've been involved in however. Either as-is, or I've made some tweaks based on actual requirements. Jan Bluemink has an Open Source module called ...


3

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> <rule uid="{A7CBE2DB-B320-49CE-B16C-6BFE6DAF8A9F}" s:name="Member - ALTS"> <conditions> <and uid="...


3

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 this rule to use and add a Profile Key Go to each page, and using the Profile Card button, edit the profile card and set the value for the Profile Key to 1: Now ...


3

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 if you have tracking enable on your CD instance, it won't show up on your CM instance. The visibility rule is configured at /sitecore/system/Settings/Rules/...


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