Loading
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
          Subexpression

          Subexpression

          When you add a subexpression step element to an expression set version, you can select another expression set that you want to use within the version. The subexpression then returns the result of the expression set to the version that the subexpression is used in. You can use resources from a subexpression, including any input and output variables from lookup tables in the subexpression in other steps in the expression set version. You can use only expression sets with at least one active version as subexpressions in an expression set version.

          Required Editions

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

          Here are the considerations for using expression sets as subexpressions:

          • Expression sets can have a depth of up to two levels of subexpressions. For example, an expression set A that doesn't reference any subexpressions is considered to have a depth of 0. If A references B, whose depth is 0, A has a depth of 1. If B references another subexpression C, then B has a depth of 1, and A has a depth of 2. However, if C further references D, then the depth of A becomes 3 levels, which isn’t supported.
          • When an expression set that has multiple active versions is used as a subexpression in another expression set, the subexpression version with the highest rank is considered.
          • You can’t modify the versions of a subexpression if the modifications change the input and output variables in the parent expression set.
          • You can modify a subexpression if your changes are additions that don’t modify the existing variables in the parent expression set.
            Tip
            Tip Because you can’t modify an active subexpression version, clone the version that you want to modify. Make the necessary changes. Next, give the version a higher rank than the previous versions, and save and activate the version. When the parent expression set is run the next time, the modified subexpression version with the higher rank is considered.
          • If the expression set version has a context definition, the subexpression must be associated with the same context definition as its parent.
          • Tips to Work with Subexpressions
            You can’t modify a subexpression version when it’s active. You can reuse an active subexpression without creating a subexpression from scratch. You can map the subexpression’s input and output variables to the local resources of the expression set version that the subexpression is used in. You can directly replace or delete subexpressions added in expression set versions, without deleting mapped variables or subsequent steps that reference the subexpression’s variables.
           
          Loading
          Salesforce Help | Article