Manage Complex Decisions-Making using Salesforce Business Rule Engine

Business Rule Engine is new addition to Salesforce platform that enables complex decision making with low-code / no-code approach. Well, the term Business Rule Engine may sound new but if you have worked on Vlocity Managed Package (now acquired by Salesforce) then you can co-relate this with Calculation Matrix & Calculation Procedure that has been driving simple to complex pricing engine for Salesforce Industries Solution.

When Salesforce decided to offer Vlocity Core Capabilities (OmniScript, Data Raptor & Integration Procedure) as OmniStudio, I was wondering, why other two great features of Vlocity (Calculation Matrix & Calculation Procedure) are left out.

As always, Salesforce engineering & innovation team has done great work to optimize and improve these features and now these capabilities are available in Salesforce Industry Solutions as Business Rule Engine. You may need to request Salesforce to enable Business Rule Engine if that is not available in your Salesforce Org.

Business Rule Engine

Components of Business Rule Engine

Business Rule Engine provides set of tools that can be used independently or together to automate complex business decisions. At broader level Business Rule Engine offers two components: –

  • Lookup Tables: As the name suggests, Lookup tables contains rows and columns. We have been using custom Object or Custom Metadata for our lookup requirements. Lookup tables has completely transformed the way we manage our decision data in lookup tables. Some of the capabilities of Lookup tables that differentiates it from our traditional approach of using custom object or custom metadata are listed below. You can refer Salesforce documentation for more details here
    • We can use a csv file to create lookup table. Business Rule Engine takes care of creating table with all the data. We do not have to maintain a Salesforce Objects
    • These tables are meant for Lookup. We have to indicate column(s) as Input and Column(s) as Output. When we use these tables, we have to pass the input and it returns the output
    • We can have multiple versions of our Lookup tables. We can define the dates and priority (ranking) that determine which version to use
    • It offers different types of Lookup tables: Decision Matrices & Decision Tables. These are for different purposes, so we need to evaluate our requirement and use a lookup table that best fit our requirement.
    • Salesforce offers support for Lookup table in Salesforce Lightning Flow and OmniStudio tools like integration Procedure. It means you do not need to write any APEX to use it for your automations. It can also be used by other Business Rule Engine Component called Expression Sets
    • Once it is setup and business rules are defined, it does not require any technical expertise and it can be managed by business users
  • Expression Sets: This is other component of Business Rule Engine that I can co-relate with Vlocity Calculation Procedure. Expressions Sets are series of business rules that are string together with variable, constant and calculation logic. It supports basic arithmetic and logical expressions, and it can use lookup tables to get necessary data and do pre and post processing as needed and returns processed data to Salesforce flow and OmniStudio.

Usage of Business Rule Engine

Business Rule Engine should be a tool of choice wherever we get requirement of simple and complex decisions. We can use lookup tables independently or we can use lookup tables in expression sets and then use expression sets in Salesforce flows and OmniStudio.

Some of the use cases that I have been using business rule engines are: –

  • Health Insurance Quoting: Health Insurance premium depends on multiple factors and these factors are normally captured in Lookup tables. One or more expression sets are configured to use these lookup tables and compute the premium by applying all necessary computation logic
  • Complex Matrix based record assignment: Lookup Table and Salesforce Flow can be used together to achieve complex assignment requirements of records. Salesforce Assignment Rules could be ideal solution for some of these requirement, but assignment rules are not available for all objects, and it may not fit your requirements
  • Standard Lookup: Business Rule Engine can be used for all your lookup requirements as it provides several capabilities that differentiates it from other approach

Summary

I have covered the basics of Business Rule Engine and provided some context, so we understand and explore it for our business requirements. There could be dozens of different use cases where Business Rule Engine can be a great solution that would not require any complex customization and it can be scaled and managed by business users.

Scroll to Top