Business Rules: Elements of rules and rule bases

Before you create a rule base, you should be familiar with the elements of rules and rule bases and how these elements are related. The left side of the content pane displays the rules in each of the rule base’s states and functions as well as a list of the rule base’s variables. The right side of the content pane is the editor, which lets you add and edit states, functions, and variables for a rule base. This is also where you add and edit conditions and actions for individual rules.


States and Functions

States and Functions provide a way for you to organize business rules and define the sequence for processing rules. Each rule base must have at least one state (the initial state) before rules processing can begin.

The states and functions are listed alphabetically in the Rules tree, and the rules within each state and function are listed in the order in which you want them to execute. You can add as many states as you need for each stage of your business. You can set up rules in the initial state. Then, depending on the conditions of rules in the initial state, you can transition the object into another state to continue processing the rules in that state.

Like states, functions are also containers for rules. Functions are useful for grouping sets of rules that you want to use in several places. You can set up many separate rules that call the same function, or set of rules, thereby reducing the number of individual rules you need. When a rule in one state calls a function, all the rules within that function process. After all the rules in the function process, the rules engine resumes processing in the original state with the next rule in that state.

The primary difference between states and functions is what happens when the rules engine processes the last rule. When the last rule in a state is processed, the rules engine stops processing (unless it encounters a stop processing rule before the last rule or it transitions to a function or another state). When the last rule in a function is processed, the rules engine returns to the next rule in the state from which the function was called.

While functions are powerful tools for grouping rules, avoiding duplication, and making maintenance easier, you are not required to use them in a rule base. You can still take advantage of the powerful features of business rules by adding as many states as you need based on the processes you want to automate and then creating rules within each state.


A variable is a piece of data with a value that can change during rules processing. You define what its default, or starting, value should be. Then, based on conditions you specify, the variable can be modified by rule actions. You can also use the value of a variable as a condition of a rule. The value of the variable is temporary, existing only during the particular rules processing session. When rules processing is started the next time, the variable’s value is reset to the default value.


Remember that a rule is basically an “if-then” statement. If something meets this condition, then take this action. The “if” statement is the rule’s condition. Each rule base has a unique set of conditions that the rules engine can use to evaluate the object.

Logical expressions

When you add two or more conditions, rules processing uses a logical expression to define the relationship of the conditions. Logical expressions join conditions using an AND (&) or an OR (|) relationship between them.


Actions comprise the “then” part of an “if-then” rule or the “then” and “else” parts of an “if-then-else” rule. If the conditions you specified in a rule are met, then the rules engine implements the rule’s actions. The list of available actions depends on the rule’s object type. An action can be as simple as stopping the rules processing or more complex, such as assigning an incident to an agent, sending that agent a notification, and defining an escalation process if the incident is not resolved within a certain time frame.

Note: When you open a rule base and edit it, RightNow CX maintains the active rule base while you edit a copy in the Rules editor. Your changes are not saved until you activate them.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s