---
schema_version: "1"
id: 47409a120d737dd8daa32c5825376a15f793530f534d1487642d8d6887f8bbcd
title: Expression Sets
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/expression_sets.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.expression_sets.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e8febae8eb1363e60da336e5f53ccb2616033d212a751153da92ba3509d085f8
description: Expression sets—the calculation engine of business rules—consist of a series of steps connected in a logical flow built from variables, constants, conditions, calculations, lookups, and aggregations. Expression sets accept JSON input from and return JSON output to the digital processes that call the sets.
products:
  - Industry Solutions
  - Cross Cloud
release: "264"
---
# Expression Sets

Expression sets—the calculation engine of business rules—consist of a series of steps connected in a logical flow built from variables, constants, conditions, calculations, lookups, and aggregations. Expression sets accept JSON input from and return JSON output to the digital processes that call the sets.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions for clouds that have Business Rules Engine enabled</td></tr></tbody></table>

An expression set can have multiple versions with different step elements. Each version is required to have a start date time and a rank, and if necessary, an end date time. Multiple versions of an expression set can be enabled simultaneously. When more than one enabled version matches an expression set call, and the date time periods overlap, the version with the highest rank is chosen. For example, if two enabled versions have rank 1 and rank 2, the version with rank 2 is chosen.

You can associate a context definition with the expression set, and use local list variables to store the definition’s values in the expression set version. You can also use local list variables to store the definition’s context tags’ values in the expression set version.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-business_rules_engine-264-0-0-production-enus/b2d6dd5c-c231-428b-abbf-3dd2cd51a11f/images/icon_note.png)

Note You can't deactivate a context definition while it's referenced by an expression set.

- **[Expression Set Resources](https://help.salesforce.com/s/articleView?id=ind.variables_and_constants_in_expression_sets.htm&release=264.0.0&type=5)**  
    Expression set versions can have these resource types: variables, constants, and local list variables. Local list variables are hierarchical resources (you can create parent and child hierarchies with them), while variables and constants are flat resources. Define and use variables—the placeholders for dynamic values—and constants—the placeholders for fixed values—in expression sets for inputs, outputs, and values passed between steps. Numeric variables and constants follow specific assignment rules.
- **[Object Variables in Expression Sets](https://help.salesforce.com/s/articleView?id=ind.object_variables_in_expression_sets.htm&release=264.0.0&type=5)**  
    Use fields from objects as variables in an expression set. To use object fields as variables in expression sets, the fields must have field aliases defined. You can either use the field aliases available in your org, or have your admins create aliases for the objects fields that you plan to use in an expression set. Aliases are relevant and user-friendly names that are created for underlying source object fields. Field aliases are grouped under an object alias. Object and field aliases are created in Setup and are categorized by a usage type and usage subtype. When you create or modify an expression set, the field aliases related to the expression set’s usage type and usage subtype are available to you as variables in the expression set.
- **[List Variables in Expression Sets and Subexpressions](https://help.salesforce.com/s/articleView?id=ind.list_variables_in_expression_sets.htm&release=264.0.0&type=5)**  
    With the integration of Context Service with Business Rules Engine, you can use attribute tags from context definitions as list variables in expression sets and subexpressions.  An expression set or subexpression is context-aware if it is related to a context definition. When you create an expression set, select a context definition that’s available in your Salesforce org to associate the definition with the expression set. When you open a version of the expression set in Expression Set Builder, you see the context’s tags as list variables in the Resources list in the builder.
- **[Supported Data Types in Expression Sets](https://help.salesforce.com/s/articleView?id=ind.bre_supported_data_types_in_expression_sets.htm&release=264.0.0&type=5)**  
    Expression set versions support resources of specific data types. A resource’s data type determines the operators that can be used with the resource.
- **[Operators and Functions in Expression Sets](https://help.salesforce.com/s/articleView?id=ind.operators_and_functions_in_expression_sets.htm&release=264.0.0&type=5)**  
    Formulas in expression sets support logical, comparison, mathematical, and string operators, and functions for dates and numbers.
- **[How Null Values Are Handled in Expression Sets](https://help.salesforce.com/s/articleView?id=ind.how_null_values_are_handled_in_expression_sets.htm&release=264.0.0&type=5)**  
    You can make sure that null values or preconfigured default values in decision tables are preserved during calculations in expression sets based on your business requirements.
- **[Step Elements to Build Your Expression Sets](https://help.salesforce.com/s/articleView?id=ind.step_elements_in_expression_sets.htm&release=264.0.0&type=5)**  
    Step elements are the building blocks of an expression set. A new expression set version is always blank. Each element forms a step in an expression set. Use the elements in the Expression Set Builder to form logical steps in the expression set. Steps in an expression set run sequentially. Depending on the type of the step element, a step can perform calculations, lookups, or condition evaluations that determine how the next step in the expression set is processed.
- **[Expression Set Templates](https://help.salesforce.com/s/articleView?id=ind.bre_expression_set_templates.htm&release=264.0.0&type=5)**  
    An expression set template is a file-based expression set with prebuild a new expression set or an expression set version.
- **[Create An Expression Set](https://help.salesforce.com/s/articleView?id=ind.build_your_expression_set.htm&release=264.0.0&type=5)**  
    Creating an expression set is a multistep process. When you create an expression set, the set's first version is created by default. Then, you configure the version and create variables and constants for inputs, outputs, and values that are used by and passed between the steps. Next, you add a logical sequence of steps that perform calculations or evaluate conditions using variables, constants, and decision matrices. After you create the flow, you simulate your expression set version with test values to verify that the set is working as expected, and then activate the expression set. To update an expression set version, save it as a version in a new expression set or as a new version within the existing expression set.
- **[How to Create an Expression Set That Uses Context Definition](https://help.salesforce.com/s/articleView?id=ind.bre_example_expression_with_context_definition.htm&release=264.0.0&type=5)**  
    This example shows how to associate a context definition with an expression set, and how to use the local list variables in the expression set version. The example also shows how to verify if the expression set version works as expected.
- **[Manage Expression Sets](https://help.salesforce.com/s/articleView?id=ind.bre_manage_expression_sets.htm&release=264.0.0&type=5)**  
    Learn how to clone an expression set, open an expression set version in the builder, and deactivate an expression set version.
- **[Considerations for Migrating Expression Sets](https://help.salesforce.com/s/articleView?id=ind.considerations_for_migrating_expression_sets.htm&release=264.0.0&type=5)**  
    Generally, expression sets are migrated to production orgs after they’re tested in the development and staging sandbox orgs, and verified to work as expected. Expression sets can contain references to dependent elements such as decision matrices, decision tables, subexpressions, context definitions, field and object aliases, and explainability message templates.
- **[Expression Sets for Developers](https://help.salesforce.com/s/articleView?id=ind.expression_sets_for_developers.htm&release=264.0.0&type=5)**  
    Developers in your Salesforce org can employ expression set developer resources to use and extend expression sets.