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
          Branch

          Branch

          A branch step element can have multiple conditional paths that an expression set version can take based on the priority that you assign to each path. A branch can have up to six paths, including the default path. Paths have priorities in a descending order from left to right. The left-most path has the highest priority. In a non-default path, the first step is the entry condition for the path. This condition determines whether to enter the path. If the branch step doesn't meet the entry conditions for the paths, it takes the default path—the path with no entry condition.

          Required Editions

          Available in: Lightning Experience
          Available in: Enterprise, Unlimited, and Developer Editions for clouds that have Business Rules Engine enabled
          Example
          Example A university offers discounted fees to students based on a student's age and gender. An expression set contains the calculations to evaluate a students' age and return the discounted fee amount based on the entry conditions configured in the paths in branch element.
          Conditions for Branching
          paths and entry conditionpath priority
          Path 1: Female students aged 50 and above are eligible for a 40% discount on fees. 1
          Path 2: Female students aged 35 and above, but under 50 are eligible for a 25% discount on fees. 2
          Default Path: Students who don't meet the first two conditions are eligible to a 10% discount on fees. Default

          The expression uses these variables in defining calculations and conditions.

          Variables in the Expression Set
          resource nameresource type
          Age Number
          Birthdate Date
          IsFemale Boolean
          UniversityFees Currency
          DiscountedFees Currency

          The first step in the expression set calculates the age of the student from their birthdate, using the AGE function.

          calculation step

          The second step in the expression set takes the Age value calculated in the first step, evaluates paths from left to right priority-wise, and returns the discounted fee.

          branch step

          The expression set is simulated with the following test input values for the variables:

          • IsFemale: True
          • Birthdate: January 1, 1977
          • UniversityFees: 50,000

          The first step in the expression set returns the student age as 45. This age meets the conditions set in the second path. The expression set enters the second path and returns the discounted fee of 37,500 based on the formula in the second path.

          simulation result
           
          Loading
          Salesforce Help | Article