Node - Branch
The Branch node routes records through different workflow paths based on specified conditions. After all applicable branches have finished, the workflow rejoins and continues along the main path.
Example
When a new support ticket is submitted:
- If it is related to a pre-sales purchase inquiry, assign Member A to follow up.
- If it is related to a business partnership, assign Member B.
- For all other cases, assign Member C.

Branch Types
HAP provides four branch types for different workflow scenarios.
-
Parallel Branch
A Parallel Branch allows multiple branches to be configured based on record data.
How it works: HAP evaluates and starts eligible branches from left to right. Normally, the branch to the right starts after the branch to its left has finished running.
However, if the current branch reaches a waiting node, such as a delay, approval, fill in, or subprocess node, HAP does not wait for that branch to finish before starting the next eligible branch.
-
Exclusive Branch
An Exclusive Branch allows multiple branches to be configured based on record data.
How it works: HAP evaluates branches from left to right and runs only the first branch whose conditions are met. Branches to the right are skipped even if their conditions are also met.
This branch type is useful for implementing
if - else if - elselogic.Parallel Branch and Exclusive Branch can be switched between each other.
-
Branch Based on Approval Result
After an approval node, this branch type creates two predefined paths based on the approval result:
- Agree
- Reject
-
Branch Based on Data Retrieval Result
After a Get Single Data node, this branch type creates two predefined paths based on the retrieval result:
- Has Data
- No Data
Use Parallel and Exclusive Branches
Scenario: When a new support ticket is submitted:
- Assign Member A if the ticket is related to a pre-sales purchase inquiry.
- Assign Member B if it is related to a business partnership.
- Assign Member C for all other cases.
Add a Branch Node
This scenario requires three branches.
Start by configuring the first two branches: one for purchase inquiries and one for business partnerships.
Because these two conditions are mutually exclusive, at most one of the two branches will run, regardless of whether a Parallel Branch or Exclusive Branch is used.

Configure the Final Branch
The third branch needs to handle every other case, including records where the issue type is empty.
The configuration differs depending on the branch type.
-
Using a Parallel Branch
A Parallel Branch runs whenever its conditions are met. Therefore, the third branch must explicitly include all values other than purchase inquiries and business partnerships, including the empty-value case.
Configure the conditions as shown below:

-
Using an Exclusive Branch
The third branch represents all cases that do not match either of the first two branches.
Because an Exclusive Branch evaluates branches from left to right and runs only the first matching branch, the final branch can be left without any conditions. It effectively acts as the
elsebranch inif - else if - elselogic.To configure it:
- Switch the branch type to Exclusive Branch.
- Add a third branch and leave its conditions empty.

Configure Actions for Each Branch
Add the appropriate action nodes under each branch.

Branch Based on Approval Result
Scenario: When an expense reimbursement request is approved, update its status to Approved. If it is rejected, update the status to Rejected.
Because the two results require different actions, use separate branches to handle them.
Add a Branch node immediately after the approval node and select Branch Based on Approval Result. HAP creates two predefined branches: Agree and Reject.
Add the appropriate action nodes under each branch.

If an approval node is not followed by a Branch Based on Approval Result, the workflow ends when the request is rejected and subsequent nodes do not run.
Adding this branch type allows the workflow to continue through the Rejected branch after a rejection.
Branch Based on Data Retrieval Result
A Branch Based on Data Retrieval Result can be added after a Get Single Data node.
Scenario: When a lead is converted into a customer, first search the customer worksheet to determine whether the customer already exists.
- If a matching customer is found, link the lead to the existing customer record.
- If no matching customer is found, create a new customer record.
After the Get Single Data node, add a Branch node and select Branch Based on Data Retrieval Result.
Then configure the appropriate action nodes under the Has Data and No Data branches.

To determine whether a Get Multiple Data node returned any records, first use a Rollup node to count the returned records. Then check whether the result is greater than
0.
Common Branch Operations
Add a Branch
New branches can be added or copied only for Parallel Branches and Exclusive Branches.
Hover over the branch icon shown below to display the option for adding a new branch.

Copy a Branch
When copying a branch, you can choose to copy only its conditions or copy both the conditions and all nodes within the branch.

Expand or Collapse Branches
Only Parallel Branches and Exclusive Branches can be expanded or collapsed.

Switch Between Parallel and Exclusive Branches
A Parallel Branch uses a circular icon, while an Exclusive Branch uses an X-shaped icon.
Click the icon to switch between the two branch types.

Reorder Branches
Branches in a Parallel or Exclusive Branch can be reordered. A branch can be moved one position to the left or right, or moved directly to the first or last position.

Delete a Branch
-
If there are more than two branches, deleting a branch also deletes its conditions and all nodes within that branch.
-
If only two branches remain:
- Deleting the first branch removes its conditions and all nodes.
- The nodes in the remaining branch are retained and become a single workflow path. Its branch conditions are removed.
In the example below, the resulting workflow path is A > F > G.

Was this document helpful?