In Flow builder (Tools > Flowbuilder), you can now add branching to your flows. Branching decreases your effort to build a flow that has complicated steps with multiple applications or endpoints. For example, you might want to export data from a source application, split/branch the exported data into many different parts, and then import each part into a different destination application or lookup for processing. You can do this by adding branching, rather than building multiple flows. With branching, you are no longer restricted to a linear flow; instead, you can plan and create a flow with many branchings to solve your business problems.
In the lower-left corner of Flow builder, different view icons are available. You can click an option/icon based on how you want to view your flow branching or flow at any point in time.
Flow builder supports scrolling, so you can move through your flow horizontally and vertically. This is useful to view large or complicated flows with branching.
You can monitor your flow branching by clicking Dashboard in the left navigation menu.
After you sign in to integrator.io, select Flow Builder (Tools > Flow Builder) and click the plus sign (+) in the Destinations & Lookups in a new flow. Or, you can click the plus sign (+) before or after a flow step in an existing flow.
You can then select Add branching and configure the branching type and branches as required.
After you add a branching, you can see the branching router () icon (1) as shown below. (You can click this icon to edit the branching at any time.) The text below the router icon indicates the type of branching (2). Each dotted line represents a branch (3 & 4).
Note
The branch name (for example, Branch 1.0) is shown above the first step bubble, but it represents the dotted line. A branch could include several step bubbles based on the workflow.
You can add a maximum of 25 branchings (indicated by router icons) in a flow and a maximum of 25 branches (indicated by dotted lines) in a single branching.
Tip
You can easily reorder steps by dragging and dropping them to a different location in your flow. This option can be useful while planning, designing, or testing your flow. All associated tools, such as mappings and filters, move along with the step, preserving your configurations. It's a good practice to check and update your configuration if required after you've reordered any step.
When you add a branching, you must specify:
You must choose the branching type based on how you want data or records to match branch conditions and flow through branches. Choose either of these options:
In this branching type, the order of branches is important because records are matched with the branch conditions sequentially based on the branch index (the order of branches). A record flows through only the first matching branch.
This example shows customer request records flow through the first matching branch based on the customer type which can be subscription tier 1, tier 2, or tier 3.
-
Records that match "tier 1" flow through the "L1 support" branch.
-
Records that match "tier 2" flow through the "L2 support" branch.
-
Records that match "tier 3" flow through the "L3 support" branch.
Records flow through the first matching branch and can be further processed based on the workflow.
In this branching type, the order of branches is not important because records are matched with the branch conditions in parallel. A record flows through all matching branches, that is, a record flows through more than one branch.
This example shows the inventory data for three different products flow through all matching branches based on the name which can be product A, product B, or product C.
-
Records that match "Product A" flow through "Store 1", "Store 2", "Store 3", and "Store 4" branches.
-
Records that match "Product B" flow through "Store 2", "Store 3", and "Store 4" branches
-
Records that match "Product C" flow through "Store 3" and "Store 4" branches
-
All records flow through the "Store 4" branch if no conditions are defined.
Records flow through all matching branches and can be further processed based on the workflow.
You must add branches and configure conditions based on how you want to separate the data into different parts for further processing.
-
Add branches based on the multiple paths that you want records to flow through. When you open the Add branching window, two branches with the names Branch 1.0 and Branch 1.1 are automatically included. We recommend changing these default branch names based on the type of branching, the conditions you’ve configured, and your flow.
-
Configure conditions based on the records that must flow through each branch for further processing.
Note
If you don’t define any conditions for a branch, it’s considered an empty branch and all the records will pass through the branch.
You can configure conditions using either of the below options.
-
Rules (default) (If you want to add rules for array data, see the Branches & array data. section below.)
-
JavaScript
For more information, see Manage flow branching.
You cannot access fields within an array to set branching rules (or input/output filter rules). If your data is passed as an array, you can transform the "data" to be passed as records in either of the following ways:
-
Result mapping
-
Transformation 2.0 rules
Using result mapping: You can use result mapping if you have a lookup before branching. In the Lookup response field, enter the field as data.0
instead of data
.
After this, add branching and define the rules for records to pass through a branch.
Using transformation 2.0 rules: You can add the transformation rules on the export side before branching, for instance, in the following FTP data transfer for an export.
Based on whether the data array has single or multiple objects, use Transformation 2.0 and define the rule to pass the data.
For a single object
For multiple objects
After this, add branching and define the rules for records to pass through a branch.
Comments
Please sign in to leave a comment.