Loading
Salesforce now sends email only from verified domains. Read More
Business Rules Engine
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Expression Sets

          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

          Available in: Lightning Experience
          Available in: Enterprise, Unlimited, and Developer Editions for clouds that have Business Rules Engine enabled

          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 the definition’s tags as list variables in the expression set version.

          • Expression Set Resources
            Expression set versions can have these resource types: variables and constants. 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
            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
            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
            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
            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
            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
            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
            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
            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
            This example shows how to associate a context definition with an expression set, and how to use the definition’s tags as 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
            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
            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
            Developers in your Salesforce org can employ expression set developer resources to use and extend expression sets.
           
          Loading
          Salesforce Help | Article