From Teo Popa: Powerful Enhancements to the Decision Tree Sample App

from Alex: In internal conversations and conversations with customers, one of the posts I find myself sharing the most is the ‘Thousands of Screens’ post on how flow can drive record-based decision trees that are easy to edit and manage. Teo has extended the design with some clever enhancements and shares them here.

A Practical Application of the “Thousands of Screens” Flow Pattern with Enhancements for Supporting Multiple Troubleshooter Tools-in-One, Pathway Continuation without Selection, and Exit and Return-to-Start Functionality

The “Thousands of Screens” flow pattern (aka: the “Troubleshooter” pattern) is useful for providing a way for end-users to do more than just search a knowledge base for solutions based on keyword matches. It enables end-user guidance and can be applied to a multitude of contexts (i.e. service, sales, etc.).

Think of the “guessing game”, wherein one person thinks of a person, place, or thing in their mind, and another person asks them a series of elimination questions until they can deduce exactly what the first person is thinking. With every response, the person asking the questions is able to collect more information from the person with the solution and apply that information to adjust the questions they ask.Throughout the process, they inevitably work their way closer to the solution.The provision of a pathway to enable “guessing” in this game is the critical component to obtaining the solution. Without it, arriving at a solution is infinitely more difficult, if not–impossible. This pathway provision is what the “thousands of screens” flow pattern brings to Salesforce.

By providing the “thousands of screens” pattern through flow you’re able to utilize the native functionality of the Salesforce platform to provide a “skeleton” for building out “troubleshooting” pathways, while empowering your end-users to manage the actual building, configuration, and content management of these pathways themselves.

The example below provides a sample application of the “thousand of screens” flow pattern as applied to an organization that currently uses multiple service agent “troubleshooting” tools scattered throughout several powerpoint files housed on a common server. Pain points in this use case include:

  1. The troubleshooter files are cumbersome for service agents to locate and access daily from the server.
  2. When all opened and kept ready for immediate service agent use, the troubleshooter files take up valuable screen real estate from other applications.
  3. When all opened and minimized, the troubleshooter files cause confusion and waste service agent time when they are trying to locate the applicable file to maximize and use.
  4. The troubleshooter file contents have grown to hundreds of slides and are difficult for service managers to modify contents/pathways/configuration as information changes are needed over time.
  5. The troubleshooter file sizes continue to grow and impact each file performance.
  6. The troubleshooter file search functionality and pathway visualization is limited.

Supporting Multi-Troubleshooter-Tools-in-One

To begin utilizing the “thousands of screens” flow pattern to replace multiple existing powerpoint-based troubleshooter tools with a single Salesforce-based troubleshooter tool, we can combine the contents of the multiple powerpoint tools into a single troubleshooter tool in which the first question of the tool is, essentially, ”Which tool do you need?” (see Image 1). From this single flow screen, we can now support launching into multiple tool pathways. Additionally, we can use native Salesforce functionality to embed the single troubleshooter flow into the utility bar of the service console for easy, recurring access by service agents and pop-out ability.

These two actions combined 1) eliminate the need for multiple powerpoint files, 2) reduce the amount of screen real-estate dedicated to tools so that the agent can focus on case documentation, and 3) reduce the amount of minimized windows to comb through when searching for a tool.

Image 1: Multi-Pathway Utility Bar Troubleshooter Tool Using “Thousands of Screens” Flow Pattern

Using DiagnosticNode (the front-end accessible record representation of a flow screen’s contents and configuration) and DiagnosticOutcome records (the front-end accessible record representation of a flow screen’s picklist selection values) within Salesforce, we can create a series of pathways for each tool, which in turn, can contain a series of branching pathways based on outcomes themselves, and so on–all stemming from a single starting screen. Additionally, we can establish record naming conventions and ordering mechanisms that help us leverage native Salesforce search functionality and listviews to find, manage, modify, and visualize our troubleshooter tool pathways and content (see Image 2).

Image 2: Naming Convention and Ordering Examples for a Multi-Pathway Troubleshooter Tool

Pathway Continuation without Selection

The original “thousands-of-screens” flow pattern provided through, assumed the end user would select a response from the picklist values provided on every screen the agent passed through. However, in practice, instances do arise where end users need to be provided with information (i.e. an instructive statement) without necessarily being asked a question that warrants making a selection in order to move forward (see Image 3).

Image 3: Example of Necessary Pathway Continuation without Selection

To achieve this configuration for a particular DiagnosticNode screen, we can utilize the:

  • “Continuation Node” checkbox, and;
  • “ContinuationDiagnosticNode” lookup field.

Together, these identify 1) a DiagnosticNode record as a screen in a pathway that does not require a selection from the end user in order to move forward, and 2) which screen should be displayed next upon clicking the “Next” button (see Image 4).

Image 4: Marking a Diagnostic Node (Flow Screen) for Selection Exemption and Continuation

Exit and Return-to-Start-Screen Functionality

We can add more robust functionality to our multi-tool “troubleshooter” tool by recognizing when a tool pathway ends and handling these “endings” in an end-user-friendly manner. Essentially, once a pathway ending is reached 1) the end-user should be notified that no more action is required of them regarding the issue they are troubleshooting, and 2) the multi-tool “troubleshooter” tool should reset so that it is ready for our end users to troubleshoot the wide variety of issues that could occur with the next case (see Image 5).

Image 5: Example of a Pathway Ending

To solve for both of these desired outcomes when a pathway ending is reached, we can use the “End Node” checkbox to identify a DiagnosticNode that marks the end of a pathway (see Image 6). When the end-user encounters the flow screen represented by this End Node DiagnosticNode record, upon clicking “Next” on this screen, they will be routed to the flow “Finish” screen, instead of another DiagnosticNode record. From this standard flow “Finish” screen, they can click “Finish” to reset the tool back to the initial start screen.

Image 6: Marking a Diagnostic Node (Flow Screen) for Pathway Ending


There isn’t a straightforward installation package, but sample code is available in the repo here.