Branching allows you to quickly build complicated flows, especially if you have a workflow with multiple applications and data formats. You can create or edit a branching based on your requirements.
Contents
Add branchings
You can add branching to a flow when you want to split the data from a step into different parts for further processing. This feature is available for imports and lookups.
Note
If you add branching to a flow, you cannot reorder flow steps using the drag-and-drop action. However, in a flow without any branching (linear flow), you can reorder flow steps using the drag-and-drop action.
When you add branching, you must name the branching and configure these components.
Components |
Configure… |
---|---|
Branching type |
The way in which records must match conditions in all the branches, that is, sequentially or in parallel. |
Branches |
The conditions that records must match in each branch to flow through. (You must also provide a suitable name and description for each branch.) |
-
Click Tools > Flow Builder to create a new flow. Or, select an existing flow.
-
In Destination & Lookups, click the plus sign (+) next to a flow step. From the list, select Add branching.
-
In the Add branching window, enter a name for your branching. You can provide a name that indicates what the branching represents or does in the flow. For example, Inventory branching or Tiered support branching. (If your branching name is long, it's shown partially on the Flow builder, but you can see the full name if you hover over it.)
-
Branching type: Choose either the First matching branch or All matching branches.
-
Branches: Two branches are automatically included in the Add branching window with default names Branch 1.0 and Branch 1.1
-
Edit the default name and description for the branches.
-
If you want to add another branch, click + Add branch and configure details. (You can also reorder or delete branches.)
-
Configure conditions in each branch using either Rules or JavaScript.
-
Click Preview and check if you have the required results.
-
Input – Preview the input data/record for branching.
-
Output – Preview the branch index and name into which the record will move, that is, the first branch that matches or all branches that match the filter condition based on your configuration.
-
-
Click Save and close.
By default, the Rules format is selected in the right corner to add conditions. You can add rules in a branch based on the conditional and logical operators provided. Only records that match the filter conditions flow through a branch.
Note
Branching does not support array type fields. You must transform your data before using it in branching rules. For more information, see "Branches & array data" in Apply branching to a flow.
You can also add condition groups if required. Groups allow you to segment your filtration logic for complex circumstances if you have a set of rules that use multiple Boolean conditions. For example, you could create one condition group that uses the NOT Boolean operator to exclude records that were created before a certain date, then create another condition group to include records that use the AND or OR operator.
You can collapse and expand conditions by clicking the arrow icon next to the branch name. By default, the conditions are shown in the expanded format.
-
Add conditions using the conditional and logic operators provided in the Filter editor.
-
If required, click Add condition to include another condition.
-
If required, click Add conditions group to combine conditions.
-
Click Preview and check your output, then click Save and Close.
You must first create a script that includes a branching function. Then, you can select it and edit the details in the Branch conditions script section as required.
After you have created a script:
-
In the upper-right corner, select JavaScript.
-
In the Branch conditions scripts section,
-
Under Scripts, select an existing script that includes a branching function. When you select the script, it shows in the Script editor.
-
Under Function, select branching if it is not already selected.
-
-
If required, in the Edit branching window, you can edit the branching name.
-
Click Preview and check your function output, then click Save and Close.
Edit branchings
You can edit a branching that you’ve added to your flow. At a more granular level, you can rename the branching, as well as rename, reorder, merge, unmerge, or delete branches. You can also delete a branching. Note that the Add branching and Edit branching windows have the same fields.
-
In Flow builder, click the branching router icon.
-
If required, in the Edit branching window, you can edit the branching name.
-
If you haven't already changed the default names of the branches, edit the branch names.
-
If required, refine filter conditions using either Rules or JavaScript. The default option is the Rules format. You can click JavaScript in the top-right corner and edit your script.
-
Click Preview and check if you have the required results.
-
Click Save and close.
Every branch has a default name. For example, Branch 1.0, Branch 1.1, and so on. We recommend changing the default branch names based on the type of branching, the conditions you’ve configured, and your flow. You can rename a branch in either Add branching/Edit branching windows.
-
In the Edit branching window, click the branch name to edit it.
-
Click the Actions(...) menu to edit the name and description.
-
In the Edit branch name/description pane, enter the name and description. Click Save & close.
You can now see the new name here and in Flow builder. To see the branch description, you must click the information (i) icon near the Actions (...) menu.
The number that you see in the top-left corner of your branch is the branch index. The branch index starts with 0 and reflects the order or priority of your branches. When you delete or move a branch, the branch index is renumbered accordingly.
Note
If you choose All matching branches, you cannot change the order of your branches.
To reorder (change the order of) branches:
You can merge or unmerge branches in Destinations & Lookups based on the merge target paths and points. However, you cannot merge a flow step that was branched back to the step from which it was branched.
In a linear flow, you will see the merge icon; but, it is disabled because merging is only applicable when you have flow branches.
To merge branches,
-
Click the merge icon (). As you start dragging the merge icon, you will see various merge paths and merge targets (diamond/rhombus shape in light blue).
-
Drop the icon to the required merge target. It changes to dark blue indicating a successful merge. You can now see the merged block, and a new flow step (bubble) is added automatically.
Caution
If you merge a branch that has the branching type as All matching branches, then you will have duplicate records.
To unmerge, you can click () and then the Unmerge branch icon ( ) on any merged branch.
Delete branchings
You can delete a branching. However before you delete a flow branching, it’s good to carefully check whether it’s likely to have an impact on subsequent flows in your process.
To delete a branching:
-
Click the branching router icon. The Edit branching window opens.
-
In the Edit branching window, click the overflow menu (...) in the top-right corner.
-
Select Delete branching. Read the Confirm delete message, then click Delete.
Tip
You could create a snapshot of your integration before you delete a branching, especially if the integration is in the production environment.
Deleting a branch also removes all associated steps; they will not be visible in Flow builder. If the deleted branch was merged earlier with another branch, the merging point will also be deleted (given that only two branches were merged.)
The index number of the deleted branch is automatically reassigned to the next branch, and the rest of the branches are accordingly renumbered. You can’t delete all the branches in a flow branching; at least, one branch is required. When you have only one branch, it will look like a linear flow but will have the branching router icon.
To delete a branch:
Sample branching flows
Branching after a merge
Branching within a branch
Single branch in a branching
Empty branch in a branching
Comments
12 comments
Whenever I change something in the branching input it removes the complete input and then it gives me a red input box (error). Cannot save anymore. Seems like a bug. I can also not report a bug as I cannot select bug in the general feedback. So that's why I posted it here.
Also I cannot move any flow steps anymore. I am using Celigo on EU platform. And using Chrome Version 105.0.5195.102 (Official Build) (arm64)
Hi Nuri,
Thank you so much for taking time to provide this feedback.We have identified this issue internally and will get it fixed soon.
Thanks & Regards,
Vikram
Hi Nuri Ensing,
Just to clarify, Vikram is referring to the bug you discovered. Thank you so much for taking the time to let us know! As far as drag-and-drop, thank you for letting us know that you rely on this functionality. When we added flow branching, we had to temporarily remove that functionality, so it should be re-added in a later release. I've let the PM for this project know, so he may provide more details.
I came here to report the same two bugs that Nuri mentioned:
Being able to reorder flow steps is critical for maintaining our existing flows that do not incorporate branching and also is needed to correct flow configurations during development. How soon could we get this feature added back?
I'm having the above issues, but also having some others.
1- using Delta Export Type leads to the flow cancelling by itself (workaround by using adjusted timestamp instead of Delta).
2- Ignored true/false value is not merged back into the record using the result mapping (I'm using one-to-many).
3- Cannot change a record to ignored = true via Post Submit Script.
Hi Fabio Dias,
Thank you for reporting this.
We tried to replicate this but unable to reproduce.
Could you please log a support case for the same and provide the flow configuration .
Thank you,
Vikram
Hi Vikram Thakre,
I've opened a ticket with the issues as requested.
The other issue I'm facing is that the previews are only working for me if the first record of the source passes through that branch.
ie. Source has 3 ids, each branch matches 1 ID, only the first ID of the source will work for previews.
Thanks!
Hi Quentin McRee and Nuri Ensing,
Cannot edit the input of branching issue has been fixed.
Could you please check and let me know if the issue still persists.
Thanks,
Vikram
Hi Vikram Thakre
Checked and it works.
Thanks for the update!
Hi Fabio Dias,
Under input panel we are showing only first record coming from export side.If you select first matching branch then router preview will only show the output as per the data under input panel.
But in run time it will check the data sequentially through each branch.
For example -Input have 3 records with 3 ids, each branch matches 1ID.
In run time, first record will go to branch with index 0 and check the condition you have given in router .If it matches then the record will go to branch first else it will check for second and third branch.
Same sequence it will follow for 2nd and third record .
Thanks,
Vikram
I love the idea of this feature and I'm going to get some great use out of it. One thing this can solve is having the same filter criteria on multiple Destination/Lookup components, and it makes the flows way easier to understand at a glance by making them more flowchart-like in appearance. I've been using it for a month or two in a couple of flows that will soon be in Production.
But in most of the other flows I've tried it in, I encounter errors with it that I can't google, and I end up abandoning branching. I have a suspicion that it doesn't like it when a branch contains no Destinations/Lookups and then merges back into the main branch later, and this is something I've wanted to do more than once, basically "only run these three steps if X, else skip over them".
Hi Geoff Tipley ,
Thank you Geoff for your valuable feedback.
We are looking into this and will provide the more updates on the CS case raised for the same issue.
Thanks,
Vikram
Please sign in to leave a comment.