Skip to main content

Questions tagged [rules-engine]

For questions related to Sitecore's Rules Engine feature, which facilitates the processing of conditions and actions in Sitecore for personalization and other features, both native and custom

Filter by
Sorted by
Tagged with
18 votes
2 answers
1k views

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

I've seen a few examples on how you can use personalization in Sitecore to personalize the way a component (rendering / sub-layout) is displayed on your webpage. However, most of these guides explain ...
Søren Engel's user avatar
  • 1,523
13 votes
2 answers
699 views

How to invoke other actions in Conditional Renderings?

Another question here (Can I change the order of components in placeholder based on personalization?) got me thinking - maybe there was a way to actually dynamically assign a placeholder to a ...
Mark Cassidy's user avatar
  • 25.3k
12 votes
1 answer
928 views

Automation Engine can't find custom predicate

I have create a custom predicate according to the documentation: https://doc.sitecore.net/developers/xp/segmentation/create-a-custom-predicate.html The rule has been defined in /sitecore/system/...
TheHvidsten's user avatar
  • 1,004
10 votes
1 answer
326 views

Prepopulate WFFM field with username

I would like to use the rules engine to prepopulate a WFFM form field with the logged in user's username. Unfortunately, I can't seem to get this to work, even though the conditions and actions that I ...
Zachary Kniebel's user avatar
8 votes
2 answers
1k views

Dependency Injection for a Sitecore Rule

I've got a Sitecore Rule, based on WhenCondition<T> where T : RuleContext Is there a way to use dependency injection on a sitecore rule? Currently having to use service locator pattern within ...
Ian's user avatar
  • 1,072
7 votes
2 answers
565 views

Adjust component parameters based on placeholder

I'm trying to add Parameters to a rendering based on the placeholder it's been inserted into. I've been trying to handle this using rules (after reading through this blog post): I created a new ...
MarkRadford's user avatar
7 votes
2 answers
387 views

Binary rule for list segmentation

We have custom facets for contacts and these facets are used for segmentation in lists (segmentation rules defined at '/sitecore/system/Settings/Rules/Definitions/Elements/Segment Builder'). ...
Daniil's user avatar
  • 878
6 votes
3 answers
436 views

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

A client wants to do basic personalization with a rule that changes a header image based on geolocation/zip code. They would like to try and cover as many individual zip codes as possible in a region. ...
Jim P.'s user avatar
  • 61
6 votes
1 answer
836 views

How to group multiple rules to one rule condition?

We are looking on how to consolidate a list of rules under a category or group condition. So, instead of content editor selecting multiple rules on a component, he/she selects something like "where ...
Mohit's user avatar
  • 361
6 votes
2 answers
894 views

List segmentation on custom rule YourLinqIsTooStrongException error

I've made a custom rule that enables the user to get a date field from any facet and see if that date's passed. I've made two variants, one for personalization and one for list segmentation/Marketing ...
Mark-Danney's user avatar
6 votes
1 answer
142 views

Difference between current visit and contact

What's the difference between current visit and contact in the Sitecore rule engine? From the description, it sounds like Current visit is based on the current user session's interaction Current ...
Fredric Foo's user avatar
  • 1,000
6 votes
1 answer
1k views

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

I would like to execute an a rule (condition and action) when a user clicks a link in an EXM email. The ability to trigger a goal would also be acceptable. This seems like a simple request, but ...
Ben Golden's user avatar
  • 3,313
6 votes
1 answer
222 views

ClientScript.RegisterForEventValidation in a custom RuleAction class

I managed to have my dependent droplists (WFFM dependent drop lists) populated via a custom WFFM RuleAction by using a lot of JavaScript but now since I add dynamically the values in my second ...
Adrian C.'s user avatar
  • 534
6 votes
1 answer
3k views

WhenCondition<T> Rule custom code not firing

I need an assist. I'm running into a situation where code that was written for a custom rule is not firing. I have put breakpoints in Visual Studio and the breakpoints are never hit. My solution is ...
Derek Port's user avatar
6 votes
1 answer
425 views

Contact Custom facet not appearing in ListManager

I've setup and configured a custom facet on the contact but we now want to be able to segment on the fields it contains in the ListManager but they aren't available there. What do I need to do to see ...
Steve Ward's user avatar
5 votes
1 answer
2k views

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

I came across this multi-list field restrictions to limit range(selection) using regex. I got few references to add basic validations. Both work fine. Ref1: ^({[^}]+}\|?){0,5}$ http://www.benramey....
Siva Sankar's user avatar
5 votes
1 answer
704 views

A/B testing a product landing page

I am trying to figure out if the following use cases are supported natively in Sitecore 9 or if there would be custom development (and if so, the best approach to leverage): Simplified Test Scenario - ...
Chris Brady's user avatar
5 votes
1 answer
154 views

Capture Rules Engine Stack Overflows

It is possible within the rules engine to create a scenario where a set of rules cause an infinite loop. Take for example the following rule that has a When Condition to itself: This example is very ...
Michael Edwards's user avatar
5 votes
1 answer
1k views

Custom Sitecore rule, define query for parameter item

I am creating a custom Sitecore Rule, in the rule text I need to define a parameter that allows the user to pick an Item using the Tree interface. However the tricky part is that the root needs to be ...
Michael Edwards's user avatar
5 votes
0 answers
260 views

Check if boost rule has been applied to an item

I am implementing functionality to push certain items in my content tree down in search results depending on a "discontinued" checkbox field. I have created a rule item under /sitecore/system/Settings/...
Matthew Dresser's user avatar
5 votes
0 answers
48 views

Is it possible to personalize content via Xamarin SDK or SSC using rules?

I was looking into Xamarin SDK and Creating a SSC to provide data to a Xamarin App, but I was wondering ... Is there a way to personalize data shown in Xamarin(or any Mobile App for that matter) based ...
Anderson Cardozo's user avatar
5 votes
0 answers
67 views

WFFM - Rule Set Editor - Active Directory Federated Identity

I am trying to create a rule for a WFFM email address field to populate the field with the logged in users email address. But, I am not sure what rule to use or if any of the rules will work at all ...
ADH's user avatar
  • 1,765
4 votes
2 answers
1k views

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

Is there any way to check Page mode like edit/preview/normal using Sitecore Rule? I want to render specific field in rendering variant of SXA component based on page mode (editor/preview).
Sushil Pal's user avatar
4 votes
1 answer
1k views

How can I use Sitecore Rules in Scriban templates in SXA 9.3

In SXA 9.3 we have the possibility of using Scriban Templates. I wonder if there is a possibility to use Sitecore rules engine inside of those templates. Let say that I would like to render part of ...
Dawid Rutkowski's user avatar
4 votes
1 answer
414 views

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

I am using Sitecore 8.2 initial release and EXM 4.0.0 rev. 161028 for it. I am creating an engagement plan and I want to create a rule condition which would say "Has contact opened email with ...
Volodymyr Hil's user avatar
4 votes
1 answer
744 views

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

Here is what I did: I set Component A to show after Goal A was triggered during a past or current interaction'. Then I triggered Goal A and I was successfully identified as a contact by adding an ...
Shu Jackson's user avatar
3 votes
1 answer
47 views

Insert Options Rules with AND taking precedence over OR

I have a condition that is essentially A and (B or C or D or...). So for the rule to fire condition A has to always be met. And on top of that, one condition of either B or C or D etc. I can't seem ...
asontu's user avatar
  • 181
3 votes
2 answers
969 views

Rule condition with multiselect?

I'm trying to find a way to allow a user to pick from a multi-select list as part of a rule condition, but I'm not having any luck. My exact scenario is that each user on the site needs to identify ...
jtresidder's user avatar
3 votes
1 answer
111 views

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

My client has 12 sites, most of which have a specific language that the entire site is in. Editors are multilingual and jump between sites, forgetting to change the language in the upper right of the ...
asontu's user avatar
  • 181
3 votes
1 answer
389 views

Converting RuleList back to XML

I have a piece of code to add a new Rule to an Item field but i can't work out how to convert this back to XML, Can anyone point me in the right direction? :) The RuleFactory doesn't appear to offer ...
Stuart Bronk's user avatar
3 votes
1 answer
546 views

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

I am looking for a way to restrict MIME Types on files uploaded through a WFFM form. What I am really hoping for is a way to control the allowed MIME Types using the rules engine. Even if the solution ...
Zachary Kniebel's user avatar
3 votes
1 answer
271 views

Conditional Rendering Rule Order

Does anyone know how to change the order of the conditional rendering rules when you try to personalize a component? I've added a custom rule that I'd like to show up at the top of the list, but it's ...
jtresidder's user avatar
3 votes
1 answer
170 views

Personalization Rules Chaining

I need to use sitecore rules to personalize the contents that I want to display to users. For example, I configured two basic rules on a component. When used separately, both rules evaluate to true. ...
adarsh's user avatar
  • 818
3 votes
1 answer
561 views

Custom Personalization Rule - Geo IP Country not working [duplicate]

I Have enabled Sitecore GEOIP services to my local instance and tried personalization based on country. This not worked as I worked local environment so it returns the local IP address (127.0.0.1). ...
Rajasekar's user avatar
  • 692
3 votes
1 answer
444 views

Device Detection Rules not triggering

I am using Sitecore 9.0.1 where I have created a new device (in the name of "AMP") item under layout/device in my content editor. I would be configuring Layouts/Renderings (AMP files) in my page ...
Adithya K.'s user avatar
2 votes
2 answers
546 views

Custom Personalization rule: hide component if url contains a regex condition

I need to create a personalised rule that hides the component if the url contains a certain pattern and I'm a bit stuck in an early phase. I have two questions: What condition should my ...
iusmar's user avatar
  • 239
2 votes
2 answers
410 views

Sitecore personalization based on at least two pages visited from set of pages

I am looking to specify a personalization rules in Sitecore 8.2 where at least two pages are visited from a specific set of pages on the websites for example: Content - Home - car loans (1) ...
Arun Kumar's user avatar
2 votes
2 answers
184 views

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

How could a Content Author copy a Conditional Rendering Rule from one component, to many others? I think the best solution would be to set the Conditional Rendering Rule on the Data Template of the ...
Christopher W's user avatar
2 votes
1 answer
749 views

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

I tried to use some of the OOTB conditional rendering rules for personalization I had running in a Sitecore 8 instance, after upgrade/migrate to Sitecore 9 and ran into the fact that some of them no ...
Joost's user avatar
  • 505
2 votes
2 answers
455 views

How to display a field value in rendering variant only if host name matches?

I need to display a field value only in a certain domain. Iam using rendering variant with below rule enabled but not able to see the value coming even in the domain 'sc9.local'.
Manideep Yechuri's user avatar
2 votes
2 answers
100 views

Automatic asset replacement at a fixed time

We want to schedule an automatic asset (graphic, text etc) replacement. Here is my plan that makes the purpose also clear. I want a particular image to get automatically replaced at midnight on ...
Arun Agrawal's user avatar
2 votes
1 answer
119 views

How to handle insert rules in multisite environment?

I've got some insert rules defined for my website, now I have to convert this into a multi site solution. My current insert rules apply to the new site. How can I restrict insert rules to work only on ...
Sandeep's user avatar
  • 785
2 votes
1 answer
69 views

Issue with Personalization Rules in Upgrade Project

We are currently working on the Upgrade Project from version 9.0.2 to 10.3. During our work on personalization rules, we encountered an issue. Some items' IDs are missing on components where the ...
Avinash Sharma's user avatar
2 votes
1 answer
724 views

Rule to set datasource based on search result

Using sitecore 8 (8.2 update 3 to be specific) I'm looking to be able to create a rule based on some condition which will set the datasource (and maybe rendering) to the most appropriate result from ...
Ian's user avatar
  • 1,072
1 vote
1 answer
327 views

Missing personalization rules around GeoIP

I'm trying to set up and test GeoIP personalization rules in a Sitecore 9 instance. However, when I go to personalize a page or component, the GeoIP section of the rules is missing. I've compared ...
Evan's user avatar
  • 367
1 vote
2 answers
64 views

upload rules from csv file

I need to create segmentation rules for showing a banner in my site based on zip. It is difficult to create rules for each zip as there might be 1000s of zip code. Is it possible to create and ...
pradeep biswal's user avatar
1 vote
1 answer
164 views

Overlapping rules

I am trying to create two versions of our homepage for two different types of clients, based on their site tendencies. I can get the page to function as desired with either of the two client ...
Travis's user avatar
  • 11
1 vote
1 answer
362 views

General Link Dialog "InsertLinkViaTreeDialog" misses InsertLinkRules after Upgrade to 8.2u2

We recently upgraded from Sitecore 8.1u1 to Sitecore 8.2u2 and noticed that the general link field dialog "InsertLinkViaTreeDialog" has a different structure now. We had a custom field that was ...
z00mable's user avatar
  • 621
1 vote
1 answer
145 views

Sitecore Rule Editor Regex syntax validation

Is there any way to validate regex pattern input on the rule editor when the string operator condition is selected as match regular expressions? We would like to avoid typos on regex input.
rkrathna's user avatar
1 vote
3 answers
57 views

The type or namespace name 'ICondition'/'IContactSearchQueryFactory' could not be found, despite references to appropriate dlls

In this Sitecore article, there is a code sample implements ICondition and IContactSearchQueryFactory. We believe that this code will help us to add custom rules to the Sitecore List Manager. However, ...
James G.'s user avatar
  • 135