The Rule Engine is the feature in WalkMe where you can write rules specifying when WalkMe takes certain actions. The Rule Engine is built into many WalkMe features, allowing you to create logic statements that initiate actions or enable features only when a Rule is evaluated as true. Effective rules allow you to make WalkMe responsive and contextual for your users.
The Rule Engine is an integral part of WalkMe. Using the Rule Engine, you can create support, training, or promotional content that appears in the right place, at the right time, to the right audience.
The Short Version
The Rule Engine is used to create rules that define many features such as Flow Steps, Segments, and Goals. Rules can be created to check all kinds of conditions such as elements on screen, the URL, the date and time or even variables in your software.
For example, you may want to only show WalkMe to the Sales department at your company. Using the Segmentation Center, you can target that user group. After creating a segment, you will define it with a rule that checks if a user is part of the Sales team by looking at their variables.
Some other common uses of the Rule Engine include:
- Create an Error Handling Group in a Smart Walk-Thru to add steps that only appears if the user gets an error message
- Create a Start Point that will direct a Smart Walk-Thru to start steps from a certain place depending on user context
- Create a ShoutOut with an AutoPlay rule so that it will play automatically during a certain time frame
- Create a rule to determine if input is valid for a Validation SmartTip
Think of rules in WalkMe like a boardgame. When playing a boardgame we might learn that IF you land on a certain spot on the board THEN you get to jump ahead a few spaces. This basic form of logic can be applied to understand how the Rule Engine works. For example, IF a user starts on a specific URL, THEN a Smart Walk-Thru should start from the third step in the guidance. This action is taken only IF the criteria we specify is true though, meaning the user is on the specified URL.
The Rule Engine allows you to write conditions. WalkMe uses these conditions in many features by determining that if the condition is true, then something else will happen, for example a Smart Walk-Thru will play a specialized message, a ShoutOut will play automatically, or a goal will be marked as complete.
WalkMe checks rules created in the Rule Engine starting with the top statement and moves down the list to each subsequent one. Together, these statements determine if the rule itself is true. If a rule is true, the relevant feature is activated. If a rule is false then the feature is not activated.
The Rule Engine checks the browser window you have open to evaluate each statement, so you must be on the correct page or be logged in as a certain type of user to check if a rule is actually evaluating as true or false. A statement created to check if a user clicks or hovers over an element cannot be evaluated while you have the rule engine open because it’s not possible to click or hover over those elements while the rule engine is open.
Creating A Rule
Rule TypesRule Types are all the different criteria you can check with a statement. Selecting a Rule Type will then allow you specify it using additional menus, operators, and input.
NOTE: Some Rule Types are only available for specific features.
On Screen Element OptionsWhen On Screen Element is selected as a Rule Type, three menu options appear allowing you to refine, change, or view the element you have selected.
- Re-select Element - Change the element for your Rule
- Gear - Modify the precision settings for the element. Read more about Precision
- View Element - See a screenshot of the selected element
Note: Only specific operators appear for each Rule Type:
|Visibility||Is/Is Not Visible:||Checks if the element is visible on screen|
|Exists/Does Not Exist||Checks if the element is or isn't in the html code (regardless of its visibility)|
|True/False||Tests if jQuery element is found in the page code|
|Element Count||Checks the number of times a jQuery element is identified in the page code|
|Content||Text is/Is Not||Checks the text for a selected element|
|Text Is Like/Is Not like||Checks if a selected element contains specific text with the option to use wildcards. Like/Not Like allows the use of *, also known as a wildcard. Wildcard characters are used to substitute for any other character or characters in a string.
Not using a Wildcard before or after your specified input, designates that there is not text either before or after it.
|Contains/Does Not Contain||Checks if selected element contains specific text or numbers. Ignores any text before or after the input specified. Types include UR, User Data, On Screen Element|
|Is/Is Not||Checks for an exact match for numbers and text elements.|
|Text is Empty/Not Empty||Checks if a field is empty or has input in it.|
|Was Reached/Was Not Reached||Checks whether Onboarding Tasks and Goals have been reached|
|Value is Greater Than/Less Than||Checks if number is greater or lesser than the input value. Applicable for Types that may include numbers
|Length is Equal To/Less Than/Greater Than||Checks the number of characters in a field and compares it to your number value|
|Word count is Equal To/Less Than/Greater Than||Checks the number of words used in a field and compares it to your number value|
|Type||Valid/Invalid Number||Checks if a number has been inputted|
|Valid/Invalid Date||Checks if a date has been inputted|
|Valid/Invalid Time||Checks if time has been inputted|
|Valid/Invalid US Phone Number||Checks if a US phone number is inputted|
|Valid/Invalid Email Address||Checks if an email address is inputted|
|Is Selected/Is Not Selected||Checks if the element is or is not selected. Is Selected/Is Not Selected is used for radio buttons or checkboxes|
Sometimes the text input may be quite long and you can’t see all of the entry in the Rule. Simply click into the text field to expand and see full text.
Use the AND or OR toggle specify if both statements must be true for a Rule to be true or if only 1 of them must be true.
When Using AND between statements, both statements are checked and must be true. When using OR between statements, either of the rules must be true.
For example, when checking for a Goal we often use multiple statements for a Rule. The first statement checks if the user is on the correct URL AND the second statement checks if the user clicks the submit button. Both statements must be true for the Rule to be true and the Goal to be tallied so we connect this with AND. This allows us to be more specific by verifying that the user didn’t click the submit button on another page.
You can also drag and drop Rules into a different order (you will have to first unlink Rules if grouped). Simply hover over the left-hand side of the rule, click and move into the desired order. Make sure to re-check your Rules for accuracy.
RegEx tester to see what you can do. If you are interested in this feature, contact your CSM or firstname.lastname@example.org
To import rules, click Import Rules, select an App, Then select the item from which you would like to copy the rule.
The performance difference between Types is generally very small (microseconds), but these can add up when combined with your own site's performance.
The following Rule Types are listed in descending order, from the fastest that WalkMe can check to the slowest.
- URL /User Data
- jQuery Element
- On screen element [clicked or hovered]
- On screen element [visible/exists/Text is, etc]
To the right of each statement, WalkMe shows if the statement is True (✔), False (!) or if it is unable to check it currently (?). At the bottom, you’ll also see if the entire Rule is True, False or if WalkMe Cannot Assert if it is either.
In the simple example above, the first Statement (URL), is evaluated independently and here is marked as true.
The next two statements are evaluated together: These statements are grouped and connected by an AND relationship. Since one of the statements is false they both evaluate as false.
Since OR is used between the first statement and grouped statement the Rule itself is marked as true because only one of the statements needs to be true for the whole rule to be true.
To Group statements, check the boxes of the Statement you'd like to group and click Group:
Try it Out
- Segment your user groups using custom variables from your website
- Create a Goal that checks if the user is on the correct page and clicks a button to finish a process
- Create an Autoplay rule for a ShoutOut that only displays it for the next two weeks
- Configure your SmartTip set to only appear on the page that has the correct form