Skip to main content

How to add a new business rule calculation

To create a new business rule, navigate to the Business Rules screen using the configuration search. Business Rules can be configured either the company or system level.To create business rules, click

Updated over 2 weeks ago

To create a new business rule, navigate to the Business Rules screen using the configuration search. Business Rules can be configured either the company or system level.

To create business rules, click

plus new button

to add a new business rule calculation.

New

After clicking on the

plus new button

, the new Business Rule details screen will displayed. The following fields are available to populate:

Details on new Business Rules

Inactive: This is unticked by default. When the checkbox is ticked, the Business Rule will not appear in any of the drop down lists where Business Rules are used.

Name: This is a mandatory field. Users should give the business rule a specific name to differentiate it from other instances of business rules.

Output Type: This is a mandatory field. When a business rule is used in a Cost Estimate (CE) / Compensation Calculation (CC) line item, <Money> must be used. For Election Sets, either Money or Number are allowed. The output type can be of any of the other available types when using Business Rules for other features as well as cascading Business Rules inside other Business rules. Select from the following:

  • Boolean

  • Currency

  • DateTime

  • Number

  • Text

  • Money

Contexts

At least one of the three checkboxes must be ticked in order to save the business rule record.

  • Assignment - Select to apply the Business Rule in the context of an Assignment such as Cost Estimates Compensation Calculations, Invoice Auditing, Election Sets, Quick Workflows, Checklists or Pulse Checks

  • Authorization - Select to apply the Business Rule in the context of an Authorization such as Benefit Sets

  • Company - Select to apply the Business Rule in the context of a Company such as What-If Cost Estimates

Click

save button

to create a business rule and proceed to adding additional details and the logic.

Note: After saving the business rule, it is possible to edit the context of a business rule and convert it to a multi-context business rule.

When a business rule is created, the Step and Usage sections appears and the Steps section is expanded. You can add additional information in the Details section

Details section

The Details section records additional information about the Business Rule. Click on the header bar, to expand/collapse the section.

Details on Business Rules

The following additional fields are available to populate:

  • Description: Descriptive text about the business rule which is only viewable by users editing the business rule.

  • Additional Info: Allows "rich" information to be added about the business rule such as images, tables, links, files, etc.

  • Status: This can be used to manage the current status of the business rule. The values can be customized in the Lookup Maintenance screen under the LookupField value of <Business Rule Status>.

  • Labels: Click on Add a Label to enter the label name. Labels added will appear in this section and can be easily deleted. When labels are added, it allows business rules to be categorized and rules can be searched using labels.

Clicking the

Status History Button

below the Status field displays the Status Transitions History modal. Below is an example of the Status Transaction History of a business rule.

Business Rules Status History

Steps section

The Steps section is where the user configures the business logic and the outcome results for the configured business rule. By default, each step will be named as "Step" followed by a number. Click on the name to rename the Step.

Steps Section in Business Rule

Each steps include a visualizer

Visualizer icon

that provides a clear, unified view of the components used within each step. This will display nodes (pill shaped) for components including Multi Context, Function, Math, Input, Table Lookup and other business rules. See additional details when hovering on the nodes.

Business Rules Visualizer
IF-THEN-ELSE

IF part of the structure

The IF box is where all the business logic or condition sits. A condition in its simplest form takes two Data Sources (operands) and uses a comparison operator (e.g. is Equal To, is not Equal To, etc) to compare the sources to determine if the condition is True or False. Users can create as many conditions as they require to replicate their business logic.

Start by clicking on the

chevron

button and click on one of the options to select a Data Source.

Configuring Steps in BR

For multi-context business rules (where more than one context has been selected), the list of options differs slightly from single context business rules.

Configuring Steps for Multi Context

The Fixed Value and Table Lookup options are replaced by the Multi-Context Option. This option also appears when a rule that previously was configured for multi-context is changed to single-context.

Selecting an option determines how the data is fetched and can be:

  • Field - database fields (appears when a single context is selected)

  • Table Lookup - lookups existing User Tables, Data Providers Tables or Database Tables with aggregate functions (select top row, average, max, etc)

  • Input - allows users to set logic for four specific fixed inputs

    • Cost Estimate Year - to use and set a specific Cost Estimate Year

    • Cost Estimate Total of Years - to use and set a specific total number of years (for the Cost Estimate)

    • Cost Estimate Post Assignment Year - to use and set if a specific Cost Estimate has the post assignment year flagged or not;

    • Origin - to use and set the origin where Business Rule should start (Benefit Set, Checklist, Compensation Calculation, Cost Estimate, etc.)

    • Variable - to use and create a Variable Input to be fed by a different line item

  • Math - perform calculations (sum, multiply, etc) between different operators (+, -,x,/) with currency selector and output type (money & number)

  • Function - perform logic using Equus (Exchange Rate Get, CDR Line Item, etc) & SQL ( Get Date, Coalesce, etc) functions

Once a data source is selected in the IF box for the first operand, the comparison operator appears to the right of it. Select one of the values from the drop down list. Once selected, click on the

chevron

button to select the data source for the second operand.

Configuring operator actions

The user can add as many conditions as desired by clicking on the

level button

button and using an

and button

or

or icon

operand between the conditions. The user can also add as many different levels by clicking on the

level icon

button allowing them to set conditions and groups of conditions in the same IF box. These buttons only appear when a condition/level is created and the cursor is placed to the right of the condition/level in the IF box.

Using the buttons mentioned above, the following example was created. To change the operand from AND to OR, place the cursor on the operand and select OR as shown in the example below. The example below, checks IF Relocation Policy = Permanent Transfer AND To Country = United States OR Canada.

Level in Business Rules

THEN and ELSE parts of the structure

The THEN box is the outcome if the IF box is True and the ELSE box is if the outcome of the IF box is False. As part of the THEN or ELSE boxes, the user can use one of the above options to retrieve a value or perform a calculation.

In the example below, the condition checks IF Relocation Policy = Permanent Transfer and if it is True it performs a calculation where the Maths component is called Bonus / 12, and if it is False a Fixed Value of 0 USD is returned.

When the Maths option is used, you have the option of creating a new component or use an existing one. Once a component is used, the name is displayed. Clicking on the name displays the details of the component.

Business Rule example

Maths functions are selected for the THEN and ELSE boxes. Click

save

to save the changes made to the business rule or alternatively, click on the [Save & Run] button to check the business rule works.

In the THEN or ELSE boxes, the user also have the option to select Jump to Step action from the Data Sources options. When selected, the Business Rule "jumps" to a different step. The step must be added in the Business Rule by pressing on the [Add Step] button in order for the step to be selected.

Once a business step is created, use the copy icon

copy

to create similar business logic and use the rubbish bin icon

delete

will remove any unwanted steps. It is also possible to make a step inactive which is particularly useful when troubleshooting and testing the business rule.

Jump To Step in BR

Things to Note:

Did this answer your question?