PingOne DaVinci

Branching

Use these best practices when creating branches within a flow.

Build the main path along the top

The most common success path should continue in a straight line to the right from the starting node. Alternate paths and error messages should branch downward from the main flow.

For example, consider the following flows. They are identical aside from layout and annotations:

Success path along the top (recommended):

A screen capture of a sample flow with the success path along the top.

Success path moving up and down (not recommended):

A screen capture of a flow with the success path moving up and down, making it harder to follow.

Branch flows using one logical operator per node or exit path

A logical operator is the circular branching point that is automatically created when you join one node to another. When you create a branch in a flow, make sure that there is exactly one logical operator per node or exit path.

If you branch after a simple node, the branches should all emerge from a single logical operator:

Branch originating from logical operator (recommended):

A screen capture of a flow in which the initial node has one decision point and multiple branches.

Branches originating from connector (not recommended):

A screen capture of a flow in which the initial node has multiple decision points and multiple branches.

If you are branching from a node, such as a Functions connector node, that has multiple exit paths, use one logical operator for each exit path:

Branches using one logical operator per exit path (recommended):

A screen capture of a flow in which the node with multiple exit paths uses a separate logical operator for each exit path.

Branches using one logical operator for multiple exit paths (not recommended):

A screen capture of a flow in which the node with multiple exit paths uses a single logical operator for more than one exit path.

Branch using All true and Any false

If creating a true/false branch, you should select the All Triggers True option for the true branch and Any Trigger False for the false branch.

A screen capture showing a flow in which the first node’s top branch is set to All Triggers True.
A screen capture showing a flow in which the first node’s bottom branch is set to Any Trigger False.

When you duplicate multiple nodes, the connecting option might default to All Triggers True in the duplicated nodes. Verify that the option is correct after you duplicate nodes.

Merge branches with common data using flow instance variables

When branches that perform similar tasks converge, you can make sure you reference the data from the correct branch by setting a flow instance variable to contain the data. Nodes that come after the flow converges can reference the flow instance variable.

This solution applies where the flow branches on a choice and can follow one path or the other, then converges back together. If your flow has similar data in parallel branches that run simultaneously, you don’t need a flow instance variable.

A screen capture in which two branches update a flow instance variable before merging.

Don’t build flows with simultaneous UI paths

When branching a flow, make sure that the user can only encounter one user-facing node at a time. If the flow moves down multiple paths with UI nodes, some of these nodes will not display correctly.

Merge parallel branches using All triggers complete

When merging branches that are executing in parallel and you want to be sure that both have completed their work, merge both branches into a connector with the All Triggers Complete option.

A screen capture showing two branches in a flow, with an All Triggers Complete option connecting them both to the final node.

Branch before Teleport nodes

When using the Teleport connector’s Go to Start Node or Return to Calling Node capabilities, branch before the node, not after. Branching after a Teleport connector that is configured to send the flow progression to a start node or calling node can skew your Flow Analytics data.

Branching before teleporting (supported):

A screen capture of a flow that branches before a Teleport node

Branching after teleporting (not supported):

A screen capture of a flow that branches after a Teleport node

Use Teleport nodes for looping flows

When flows loop, the canvas can become cluttered with looping lines that make the flow hard to understand. To avoid this, use the Teleport connector. Define a start node at the point where the loop returns, and then use the Teleport connector to go to that start node to execute the loop.

Teleport nodes (recommended):

A screen capture of a flow in which the looping is done using Teleport nodes.

Looping (not recommended):

A screen capture of a flow in which the looping is done using long direct paths.

If your flow loops, you might want a field in one node to include a value from a node further to the right. When you are configuring the value for a field, you can enable the Show all nodes option to show values from all nodes, not just nodes to the left of the current node.

Keep Teleport destination nodes simple

Configure the logical operator that immediately follows a destination Teleport node to All Triggers True.

Make sure there is a one-to-one relationship between the teleport destination node and the node that follows it. You don’t want to branch the flow immediately after the teleport destination node, and you should reuse teleport destination nodes rather that creating multiple destinations that lead to the same following node.

Handle all potential false branches

If a node returns a false result but does not have a false branch as an output, the flow will fail, presenting a confusing experience for the end user and a challenge for troubleshooting.

To prevent this issue, you should make sure any node that can return a false result has a false output that presents an error message.