---
schema_version: "1"
id: 36f1b907876c0936305c309730d788f292c2b1b78721e6890ec90c113a3156e1
title: List Branch
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/bre_list_branch_element.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.bre_list_branch_element.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 3d3c160f06385a1b4274339bcdf42706592637825b1c6fab452b7e8d9776a953
description: In an expression set version that's associated with a context definition, a list branch step element lets you build if-then-else rule conditions directly on list data from the context.
products:
  - Industry Solutions
  - Cross Cloud
release: "264"
---
# List Branch

In an expression set version that's associated with a context definition, a list branch step element lets you build if-then-else rule conditions directly on list data from the context.

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

## List Branch Structure

A list branch element starts with two If branch and one Else branch. You can add up to three more If branches, for a total of five If branches, plus the default Else branch. The conditions in all If branches must evaluate list data at the same hierarchy level so that every branch operates on the same list. The Else branch doesn't have a condition and can't be deleted; it processes any record that doesn't satisfy any of the If branch conditions.

## Supported Elements Within a Branch

Within an If branch or the Else branch, you can add these step elements: calculation, lookup table, and subexpression. These steps operate only on the subset of list records that satisfied that branch's condition. For example, a lookup table added to a branch receives only the records that matched the branch's condition as its input.

## Considerations for Using the List Branch Element

- The List Branch container counts as one element toward the maximum number of steps that an expression set version can have. Each step element that you add within a branch is counted separately. For example, a branch that contains a calculation and a lookup table counts as two elements, in addition to the List Branch container.
- Branches run in order from left to right. Path 1 is evaluated first, followed by Path 2, and so on, with the Else branch evaluated last.
- Each list record is processed by only one branch: the first branch whose condition it satisfies.

![Example: Tiered Pricing Discounts](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: Tiered Pricing Discounts

A rule designer wants to apply tiered pricing discounts to a list of order line items based on each item's customer tier. The expression set is associated with a context definition that has attribute tags for the order line items, including Tier and Price. Here's how the designer configures the list branch element:

 
| Branch and Condition | Action |
| --- | --- |
| Path 1: Tier is Gold | Apply a 15% discount |
| Path 2: Tier is Silver | Apply a 10% discount |
| Else: All other line items | No discount is applied |

Each branch contains a calculation element that computes the discounted price for the records that enter that branch.

The designer simulates the expression set version with 10 order line items: 4 items have a Gold tier, 5 items have a Silver tier, and 1 item has a Bronze tier.

The simulation results show that the 4 Gold-tier line items follow Path 1 and receive a 15% discount, the 5 Silver-tier line items follow Path 2 and receive a 10% discount, and the remaining Bronze-tier line item follows the Else branch and receives no discount.

#### See Also

- [_Salesforce Help_: 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.")