Master no-code decision automation with Expression Sets, Decision Matrices, and Decision Tables for Insurance, Healthcare, and Financial Services
This article has been refreshed with the latest Business Rules Engine capabilities, current limits and pricing tiers, and expanded integration guidance. Originally published December 2025.
According to the official Salesforce documentation, Business Rules Engine is a suite of services, components, and objects that apply advanced logic and automate complex decision-making. The engine powers guided interactions and workflows for virtually any industry process, operating at true business-to-consumer scale capable of maintaining thousands of rules and automating millions of interactions.
What makes BRE unique is its ability to put decision-making power directly into the hands of business users. Instead of waiting for developers to write and deploy Apex code every time a business rule changes, administrators and business analysts can create, test, and modify rules using intuitive visual tools.
Business Rules Engine has its roots in Salesforce's acquisition of Vlocity. The deal was announced on February 25, 2020 and closed on June 1, 2020 for $1.33 billion. Vlocity, founded in 2014 by former Siebel Systems executives, was a pioneer in industry-specific cloud solutions built natively on the Salesforce platform. The acquisition brought technologies like OmniStudio, DataRaptors, and process engines that eventually evolved into what we now know as Business Rules Engine.
Business Rules Engine was officially introduced in the Spring '22 release along with the Decision Explainer feature for audit trails. Initially available only to Salesforce Industries customers (Communications Cloud, Health Cloud, Financial Services Cloud), BRE was a subscription add-on. In the Summer '22 release, Salesforce began including 50,000 BRE calls per month with Unlimited Editions of Industry Clouds.
Today, BRE continues to evolve with each Salesforce release, gaining new features like enhanced Flow integration, improved Decision Table performance, expanded support across more Salesforce products, and the ability to invoke rules from Agentforce actions. Recent releases have added an IF function for expression sets, automatic element naming, proactive constraint alerts, a centralized decision-table monitoring dashboard, and finer control over null and no-match handling.
Before we dive into the technical details, it's crucial to understand why Salesforce created Business Rules Engine and what problems it solves. This understanding will help you evaluate whether BRE is the right tool for your organization.
In traditional Salesforce implementations, complex business rules are often implemented using:
While these tools work, they present significant challenges.
Consider an insurance company that needs to calculate health insurance premiums. The premium depends on:
Let's explore each component of the Business Rules Engine in detail, understanding their capabilities, use cases, and how they work together.
According to the Trailhead Expression Sets module, Expression Sets are the calculation engine of business rules. They're made up of variables, constants, and logic connected in a meaningful flow that takes JSON inputs, performs calculations, and returns JSON outputs.
Key Elements of Expression Sets:
Decision Matrices are powerful lookup tables with user-defined input and output columns. When called, the engine locates the row matching the input values and returns the corresponding output values. According to the Salesforce Help documentation on Decision Matrices, each matrix can have multiple versions for managing future pricing changes. Matrices come in standard and grouped types, and input columns support Text Ranges and Numeric Ranges in addition to exact matching, so a single row can cover a whole band of values such as ages 36-45 or credit scores 650-749.
Example: SLA-Based Retention Costs
| Input: SLA Level | Output: Retention Cost | Output: Retention Rate |
|---|---|---|
| Bronze | $5,000 | 70% |
| Silver | $8,500 | 85% |
| Gold | $11,000 | 90% |
| Platinum | $12,500 | 95% |
Decision Tables are advanced lookup tables that work directly with Salesforce objects (standard, custom, or custom metadata types). Unlike Decision Matrices, they can return multiple outputs from multiple matching rows and support operators like greater-than, less-than, and LIKE. According to the Salesforce Help documentation on Decision Tables, they now come in two types: standard decision tables process up to 100,000 rows with up to 30 input conditions and 10 output results, while advanced decision tables — designed for very large, CSV-based datasets — scale up to 20,000,000 rows with up to 10 output columns and 31 matched columns.
When to Use Decision Tables vs. Decision Matrices:
| Feature | Decision Matrix | Decision Table |
|---|---|---|
| Data Source | Built-in matrix table or CSV import | Salesforce objects (standard, custom, metadata); CSV uploads for advanced tables |
| Matching | One row per input combination | Multiple rows can match |
| Operators | Exact match, plus Text and Numeric Ranges | Supports >, <, >=, <=, =, LIKE |
| Best For | Static rate tables, simple lookups | Dynamic rules, range-based logic |
| Max Rows | No documented limit | 100,000 (standard) / 20,000,000 (advanced) |
Understanding the underlying data model helps you design better solutions and troubleshoot issues. According to the Salesforce Developer Documentation, BRE uses several standard objects to store configuration and metadata.
| Object | API Name | Purpose |
|---|---|---|
| Expression Set | ExpressionSet | Parent container for rule definitions |
| Expression Set Version | ExpressionSetVersion | Versioned instance with effective dates |
| Expression Set Element | ExpressionSetStep | Individual step (calculation, lookup, branch) |
| Decision Matrix | DecisionMatrix | Lookup table definition |
| Decision Matrix Version | DecisionMatrixVersion | Versioned matrix with effective dates |
| Decision Table | DecisionTable | Object-based rule table definition |
Business Rules Engine is tightly integrated with Salesforce Industry Clouds (Communications, Financial Services, Healthcare, Energy) and works alongside Omnistudio for guided experiences. The diagram below shows the high-level architecture:
One of the most common questions when implementing Business Rules Engine is: "Should I use a Decision Matrix or a Decision Table?" This section provides a clear decision framework to help you choose the right component for your use case.
| Use Case | Recommended | Reason |
|---|---|---|
| Insurance premium rate tables | Matrix | Static rates with exact age band/tier matching |
| Product eligibility by credit score range | Table | Needs range operators (score >= 650 AND < 750) |
| Tax rate lookup by state/category | Matrix | Simple key-value lookup, easy CSV import |
| Find all applicable discounts for customer | Table | Multiple matching rows needed (stacking discounts) |
| Currency conversion rates | Matrix | Built-in versioning for rate changes with dates |
| Product recommendations from catalog | Table | Query existing Product2 records dynamically |
Business Rules Engine shines in industries with complex, frequently-changing business logic. Here are detailed use cases based on the Trailhead Business Rules Engine module.
Rather than reading through lengthy text-based instructions, watch this excellent video tutorial that walks you through implementing Business Rules Engine step-by-step. This hands-on demonstration is one of the best resources available for learning BRE implementation.
According to the Salesforce Help documentation on BRE Integrations, Business Rules Engine components can be invoked from multiple platforms including Salesforce Flow, Omnistudio, Agentforce actions, Connect REST API, and Apex code.
To invoke BRE from Flow Builder: Navigate to Setup → Quick Find → Flows → New Flow, then add an Action element. In the New Action window, select the category that matches the rule type you want to call — for example, Decision Matrices — and then pick the specific decision matrix or expression set by its name. Configure the action by mapping input variables from Flow variables and storing the outputs. The output JSON is automatically parsed into Flow variables that you can display on screens or use in subsequent elements.
Omnistudio provides native integration with BRE through OmniScript and Integration Procedures:
For custom integrations or external systems, use the Connect REST API. The documented endpoint is POST /services/data/vXX.X/connect/business-rules/expressionSet/{expressionSetName}, which accepts the expression set's API name in the URL and a JSON body with inputs and options:
# Evaluate an expression set via Connect REST API
curl -X POST
'https://yourinstance.salesforce.com/services/data/v62.0/connect/business-rules/expressionSet/Premium_Calculation'
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
-H 'Content-Type: application/json'
-d '{
"inputs": [
{
"Age_Band": "36-45",
"Dependents": "2",
"Annual_Income": 45000
}
],
"options": {}
}'
API Response:
{
"outputs": [
{
"Monthly_Premium": 556.87,
"Subsidy_Amount": 185.63,
"Calculated_Premium": 742.50
}
],
"explanations": [
{
"stepName": "Age_Lookup",
"result": "Matched row: 36-45"
}
]
}
Starting with Winter '23, Salesforce introduced the Invocable.Action class which allows Apex code to call invocable actions—including BRE components. This is useful for triggers, batch jobs, and custom controllers.
/**
* Calling an Expression Set from Apex using Invocable.Action
* Available since Winter '23 (API v56.0+)
*/
public class BREApexIntegration {
public static Map<String, Object> evaluateExpressionSet(
String expressionSetName,
Map<String, Object> inputVariables
) {
Invocable.Action action = Invocable.Action.createStandardAction(
'evaluateExpressionSet'
);
action.setInvocationParameter('expressionSetName', expressionSetName);
action.setInvocationParameter('inputVariablesJSON', JSON.serialize(inputVariables));
List<Invocable.Action.Result> results = action.invoke();
if (results != null && !results.isEmpty() && results[0].isSuccess()) {
return (Map<String, Object>) results[0].getOutputParameters();
}
throw new BREException('Expression Set evaluation failed');
}
public class BREException extends Exception {}
}
/**
* Calling an expression set via Connect REST API from Apex
*/
public class BRERestIntegration {
public static String evaluateExpressionSet(
String expressionSetName,
Map<String, Object> inputData
) {
String baseUrl = URL.getOrgDomainUrl().toExternalForm();
String endpoint = baseUrl + '/services/data/v62.0/connect/' +
'business-rules/expressionSet/' + expressionSetName;
HttpRequest req = new HttpRequest();
req.setEndpoint(endpoint);
req.setMethod('POST');
req.setHeader('Content-Type', 'application/json');
req.setHeader('Authorization', 'Bearer ' + UserInfo.getSessionId());
req.setBody(JSON.serialize(new Map<String, Object>{
'inputs' => new List<Object>{ inputData },
'options' => new Map<String, Object>()
}));
HttpResponse res = new Http().send(req);
if (res.getStatusCode() == 200) {
return res.getBody();
}
throw new CalloutException('BRE API Error: ' + res.getStatusCode());
}
}
While powerful, Business Rules Engine has specific limitations you must consider during solution design. According to the official BRE limits documentation, understanding these constraints helps avoid implementation issues.
| Limitation | Value | Workaround |
|---|---|---|
| Nesting Depth | Maximum 2 levels (depth of 3 is not supported) | Chain multiple Expression Sets |
| Aggregate Steps | Recommended practice: place last in the sequence | Use second Expression Set for post-aggregate logic |
| Version Limit | Multiple versions supported | Archive old versions regularly |
Decision tables come in two types with different limits, so pick the type that matches your data volume:
| Limit | Standard Decision Table | Advanced Decision Table |
|---|---|---|
| Row Capacity | Up to 100,000 rows | Up to 20,000,000 rows |
| Input / Matched Columns | Up to 30 input conditions | Up to 31 matched columns |
| Output Columns | Up to 10 output results | Up to 10 output columns |
| Active Tables per Org | Up to 20 | Up to 100 |
| Data Loading | Salesforce object records | CSV-based: up to 1,000,000 rows processed per run, 50,000 rows per CSV upload |
Source object note: The requirement that decision table source objects include CreatedDate and IsDeleted fields has been historically documented; verify against the current documentation for your release, and prefer Custom Metadata Types when a source object isn't compatible.
Based on real-world implementations and the Trailhead Business Rules Engine module, here are key best practices for successful BRE implementations.
Based on discussions in the Salesforce Trailblazer Community and Salesforce Known Issues, here are the most frequently reported problems and questions from developers and administrators implementing Business Rules Engine.
Problem: Expression Set executes without errors but returns null or unexpected empty values.
Common Causes:
Solution: Use the Simulation tool to trace each step. Check that all input variables have values before the Expression Set runs. Add defensive null checks in your calling Flow or OmniScript.
Problem: Decision Matrix returns empty results even when data should match.
Common Causes:
Problem: Users receive "Insufficient Privileges" or cannot access BRE components.
Common Causes:
Solution: Assign the appropriate permission sets from Setup — Rule Engine Runtime for users who execute rules, Rule Engine Designer for rule builders, and Decision Explainer Service Access where explainability is used. According to the BRE Permission Sets documentation, users need specific permissions for runtime execution vs. design-time editing.
Problem: Complex business logic requires more than 2 levels of nesting, which BRE doesn't support.
Workaround:
Problem: Custom object cannot be used as Decision Table source.
Cause: Decision Tables have historically been documented as requiring source objects to have CreatedDate and IsDeleted fields — verify against the current documentation for your release. Some custom objects or certain standard objects may not have these fields.
Solution: Use Custom Metadata Types instead of custom objects for Decision Table rules. Metadata types are fully compatible and offer additional benefits like deployability.
Problem: The expression set or decision matrix action in Flow fails or returns unexpected results.
Common Causes:
Problem: Changes to Expression Sets or Decision Matrices don't take effect, or wrong version executes.
Common Causes:
Solution: Always verify which version is active. Use distinct Start and End dates for versions. After activation, wait 5-10 seconds before testing.
Problem: BRE execution becomes slow as rule complexity increases.
Optimization Tips:
Understanding BRE licensing is crucial for budgeting and capacity planning. According to the Salesforce Add-on Pricing documentation, here's what you need to know.
Business Rules Engine is included with Salesforce Industry Cloud licenses, and the included usage is edition-tiered:
BRE now spans roughly ten industry clouds - including Financial Services Cloud, Health Cloud, Manufacturing Cloud, Automotive Cloud, and Communications Cloud - and is also available with Service Cloud editions per the current add-ons price list.
| Add-On | Capacity | Price (USD) |
|---|---|---|
| Business Rules Engine - Additional Calls | 100,000 BRE calls/month | $10,000/unit/month ($120,000/year) |
The metering behavior below reflects commonly understood behavior; confirm with Salesforce for contractual purposes:
Salesforce Business Rules Engine (BRE) is a no-code/low-code framework within Salesforce Industries that enables business users to create, manage, and execute complex business logic using visual designers. It includes three core tools: Expression Sets for calculations and workflows, Decision Matrices for lookup tables, and Decision Tables for object-based rules with multiple outputs.
Expression Sets are sequential calculation workflows that can include variables, formulas, branching, and aggregation functions. Decision Matrices are lookup tables that match inputs to a single row and return corresponding outputs, supporting exact matches as well as text and numeric ranges. Decision Tables work with Salesforce objects, can return multiple outputs from multiple matching rows, and support operators like greater-than and less-than.
Business Rules Engine is included with Salesforce Industry Cloud licenses such as Financial Services Cloud, Health Cloud, Manufacturing Cloud, Automotive Cloud, and Communications Cloud. Included usage is edition-tiered: Enterprise Edition orgs get 10,000 BRE calls per month, while Unlimited and Agentforce 1 Editions get 50,000 calls per month. Additional capacity can be purchased at $10,000/unit/month for 100,000 additional calls.
Key limitations include: Expression Sets support up to 2 levels of nesting depth; standard Decision Tables process up to 100,000 rows with a maximum of 30 input conditions and 10 output results; advanced Decision Tables scale up to 20 million rows with up to 10 output columns. Performance may also be impacted with complex rules or very high row counts.
BRE can replace Apex for many business logic scenarios including calculations, eligibility checks, pricing rules, and decision-making workflows. However, it's not suitable for complex integrations requiring callouts, real-time high-frequency processing, or scenarios requiring logic nesting deeper than 2 levels. Use BRE for maintainable, business-user-editable rules and Apex for complex system-level logic.
Reference guide for technical terms and abbreviations used throughout this article.
Continue your Salesforce automation and architecture learning journey with these related guides:
any idea, what happens after BRElimit 50,000 exhausted in org? does it get billed? appreciate your response
Business Rules Engine (BRE) operates on a consumption-based pricing model. When the standard monthly limit of 50,000 calls is exceeded in editions like Unlimited or Agentforce 1, users are typically billed for additional usage in the form of overages