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.

br

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.

Variables

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.

Conditions

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

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.

Business Rules: An overview

Business rules are powerful tools for simplifying and automating common business tasks. They link data from all RightNow CX products in the knowledge base, resulting in a responsive, consistent customer experience.

Business rules help you provide a consistent, accurate, and timely experience for customers while streamlining the efficiency of staff members. When the rules engine updates information automatically and immediately, your entire organization has access to a knowledge base that is accurate and current in every customer interaction.

When you create rules to answer routine customer questions, customers enjoy an immediate response. At the same time, staff members work more productively without the distraction of repetitive tasks. As a result, they can deliver more responsive customer service and follow-up

What is a business rule? A business rule is simply an “if-then” statement: If these conditions apply, then take this action. Business rules can also include an Else clause. If the conditions of the rule are not met, the Else clause specifies the action that should be taken.

How are rules organized? RightNow CX products have 8 rule types:

  • Contact
  • Organization
  • Task
  • Incident
  • Answer
  • Chat
  • Offer Advisor
  • Opportunity

Each of these sets of rules is a rule base. The entity to which a rule base applies (answer, incident, contact, chat, opportunity, organization, target, task) is known as the object type.

Every object type has its own rule base, and every rule base is separate from other rule bases. The contacts rule base processes only contacts, the organizations rule base processes only organizations, and so on.

How are rules processed? The rules engine is the software that processes the rules in a rule base. The rules engine begins processing when:

  • Staff members add or edit answers, contacts, incidents, opportunities, organizations, or tasks
  • Customers submit questions on the Ask a Question page
  • Customers update their contact records or incidents
  • Customers request chat sessions

The rules engine looks at every new or updated object and checks to see if the conditions of any rules are met. If a rule’s conditions are met, the action associated with that rule occurs.

Important: The rules engine is triggered when the contact (or other object) is updated, not when the rule base is updated. If you create or edit a rule, objects are not evaluated to see if they meet the conditions of the new or updated rule. Rules processing happens only when objects are added or updated.

Planning business rules: Before you begin creating rules for your organization, it is important to examine your business processes. Once you have a clear idea of the processes your organization uses, you can develop an effective method for applying business rules to automate these processes. Here are some essential steps to help you get started.

  • Identify and outline business processes
  • Develop a rules flowchart
  • Review functionality of rules
  • Create rules
  • Prioritize processes for applying rules
  • Verify and fine-tune rules

Dynamic Agent Desktop: Workspace Rules

The efficiency provided by custom workspaces can be extended even further using workspace rules. Workspace rules are an automation layer used to set properties for different workspace items based on actions and conditions occurring in the workspace. Workspace rules are not available for multi-edit workspaces.

Workspace rules can save your agents a lot of time by simplifying or completely automating routine tasks. For example:

  • If your workspace contains a lot of fields and controls, you can use rules to show only the information that is relevant based on the type of interaction, the data being entered, or the identity of the contact or agent.
  • If a specific tab on the workspace correlates to a specific incident category, you could add a rule that focuses a specific tab based on the category value when the editor loads.
  • If agents are required to select from a certain subset of dispositions when solving incidents, you could create a workspace rule to make the Disposition field required and hide several of its items when incidents are set to Solved.
  • If incidents are escalated among groups based on product and profile, you could add a rule that sets the Assigned field to a specific group based on the product value selected and the profile of the logged-in staff member when a certain button control is clicked.

With workspace rules, you can dynamically adjust the display, behaviour, and values of fields and controls on a workspace based on staff member actions.

Each rule is triggered by one or more events and conditions you define, and can result in one or more actions, including the following:

  • Set the value of a field
  • Set the required status of a field
  • Make a field or control read-only
  • Show or hide a field or control
  • Show only a select group of menu items
  • Open a guided assistance guide
  • Open a specific script
  • Create a named event to trigger another workspace rule or a script rule

At a basic level, each rule defines a triggering event and a resulting action that will occur after the event is triggered.

There are two types of actions: Then and Else. Every rule has at least one Then action, which is the result of the triggering event and conditions. However, once conditions are specified for a rule, you can also add one or more Else actions. An Else action is triggered in cases where the rule’s conditions are not met.

Since business rules are checked after workspace rules, changes made to a record by workspace rules can be overridden by business rules if the rules have similar actions.

Rules are created using the Rule Wizard. The rule wizard is opened by clicking the Rules button on the ribbon.

(Click to enlarge)
(Click to enlarge)

Once you add rules, you can easily edit them, reorder them, or delete them once they are no longer needed. Rules are fired in the sequence in which they are listed. Adjusting them can impact how other rules affect the workspace.