Logical Rules

Rules Engine Platform consists of Logical rules which are the heart of the Rules Engine Platform, which are used for defining the rules for Page, Posts, Categories, Widgets, Themes, Language and URL Redirection. A logical rules is defined using 12 categories like User Role, User Profile, Pages, Posts Geo location etc, 28 subcategories like Email, Registered Date, Country, Date and Time etc and with 9 like conditions like equals, not equal, greater than etc.

Please Note : This video is recorded Using RulesEngine Plugin and same feature will be applied to RulesEngine Platform too except the child rules which are shown in the video.

Many more are categories and subcategories are planned in feature release.

Logical rules also provide two important developer friendly features:

  • Define custom hook : Developers can define a method in their code and add this method in logical rules, which will be called by rules engine plugin once the rule is satisfied. Hook can be further used to develop customer features like sending email, show important messages in site.
  • Logical rule status : Access the evaluated value of the logical rule using the utility method in the code.
    RulesEngine::is_rule_valid(“Rule Name”);


See below table of categories, sub categories corresponding values for defining logical rule. We can combine the rule criteria using logical “AND” “OR” logically separate them using “BRACKETS” to define more complex rule.

Category SubCategory Value Condition
User Profile
User Id List of User Ids Equals and Not Equals
Unregistered User (Guest User) Unregistered User Equals and Not Equals
Email Id List of Email Ids Equals, Not Equals, Contains, Does not contains and Domain is
Registered Date Date Equals, Not Equals, Greater than and Less than
User Role
User Role Name List of User Roles Equals and Not Equals
Page
Page Title List of Page Titles Equals and Not Equals
Post
Post Title List of Post Titles Equals and Not Equals
Category
WordPress Category List of WordPress categories Equals and Not Equals
WooCommerce Category List of WooCommerce categories Equals and Not Equals
Request
URL URL (e.x : http://wiki-rulesengine.wc.lt ; http:google.com) Equals, Not Equals, Contains and Does not contains
Parameter name=value (e.x : bis_country=IN) Equals, Not Equals, Contains and Does not contains
Form data name=value (e.x : bis_country=IN) Equals, Not Equals, Contains and Does not contains
Referral URL URL (e.x : http://rulesengine.in ; http:google.com) Equals, Not Equals, Contains and Does not contains
Response
Status Code 404 – Not Found Equals and Not Equals
Cookie name=value (e.x : bis_country=IN) Equals, Not Equals, is Set and is not Set
Mobile Device
Mobile iPhone, Andriod Phone, BlackBerry and Windows Phone. Equals and Not Equals
Mobile Device Type Mobile, Table and Smart Phone Equals and Not Equals
Mobile Operating System IOS, Andriod and Windows Equals and Not Equals
Tablet ipad, Andriod Table, HP TouchPad and BlackBerry Tablet Equals and Not Equals
Date and Time
Date Date Equals, Not Equals, Greater than and Less than
Time Time Equals, Not Equals, Greater than and Less than
Date and Time Date and Time Equals and Not Equals
Day of Week Day of Week (Sunday, Monday etc) Equals and Not Equals
Month Months (January, February etc) Equals and Not Equals
Geo Location
Country India, USA etc (Included all countries) Equals and Not Equals
State or Region Texas, Andhra Pradesh etc (Included all States and Regions) Equals and Not Equals
City NewYork, New Delhi (Included all important cities) Equals and Not Equals
Continent Asia, Europe, Africa (Included all continents) Equals and Not Equals
Currency Rupee, Dollar, Yen (Included important currencies) Equals and Not Equals
IP Address 182.17.155.87 Equals, Not Equals, Begins with, Ends with, contains and does not contains
Browser
Browser Name Internet Explorer, Google Chrome, Firefox, Safari and Opera Equals and Not Equals
Language
Language Name English, French, Japaneese (List of all Active Languages) Equals and Not Equals

Note: The above table is the complete list of categories and subcategories which are used for creating a logical rule, please check individual plugin for the list of categories which can be applicable to them.

 

2 thoughts on “Logical Rules

  1. qq66368

    I really like your blog.. very nice colors & theme. Did you
    make this website yourself or did you hire someone to do it for you?
    Plz respond as I’m looking to create my own blog and would
    like to know where u got this from. thank you

Comments are closed.