---
schema_version: "1"
id: 8319f95c5a2f8e59fe74e6c2d0ec7d9f5cb383f460194d4718cd6b9c1714f2dd
title: Branch
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/bre_branch_element.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.bre_branch_element.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 3a64ca2beb4b4c1513e2c7ea1d666808dcfeaeeae32faae3f62411ba0a3f9ac5
description: 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.
products:
  - Industry Solutions
  - Cross Cloud
release: "264"
---
# 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

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

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

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 condition | path 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 name | resource 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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-business_rules_engine-264-0-0-production-enus/b2d6dd5c-c231-428b-abbf-3dd2cd51a11f/business_rules_engine/images/branch_calculation.png)

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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-business_rules_engine-264-0-0-production-enus/b2d6dd5c-c231-428b-abbf-3dd2cd51a11f/business_rules_engine/images/branch_paths.png)

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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-business_rules_engine-264-0-0-production-enus/b2d6dd5c-c231-428b-abbf-3dd2cd51a11f/business_rules_engine/images/branch_simulation_result.png)