Experiments with Dynamic Flow Component
Recently, I've been experimenting with a new project called the Dynamic Flow Component (DFC) by Andrew Fawcett (AndyInTheCloud).
Here are three concepts that I'm experimenting with as use cases for DFC:
- Prompt for required field when viewing record (without editing)
- Intelligent Sales Guide to provide suggestions or recommend flows
- Prompt users to create a Case based on a calculated value
DFC was interesting for these scenarios because it could:
- Run initialization logic to route to the appropriate Flow
- Automatically open a Flow
- Provide a consistent experience across objects (always in the same location)
- Access current/changing record data through the use of Lighting Data Service
Prompt for required field when viewing record (without editing)
Recently, my team and I were asked to make Industry required on the Account object in an org with about 20,000 existing Accounts. A back-fill on 20,000 records is no big deal, but in this case we were collecting the data for the first time and the information was simply unknown to us without research. After making the field required we quickly saw automated processes and unit tests begin to fail. Instead of making it required at the data level, we made the field required only through page layouts. Making the field required on page layout allowed automated processes and unit tests to continue to function without throwing errors, but users would not be required to populate the field unless they edited the record. By implementing DFC we can prompt users to update the required field as soon as they view the record page.
flow controller
I have it helpful to use one flow per object as a controller for routing to other flows as needed. In this case, in my Account Controller Flow I check to see if Industry is Null or equal to "Undetermined" and route to my Account Industry Flow. If not, I route to a default flow for the object that contains a screen letting the user know everything is in good shape on this record.
prompt user for value
Within the Account Industry Flow I pass in the flowtb_record and display a screen prompting the user to select a valid value. When the user selects a value the record is updated and the screen is refreshed. This causes the Flow Controller to rerun and could route to a different flow if needed. This is a simply pattern that can be applied to lots of Data Completion scenarios.
Intelligent Sales Guide
Our team has also been playing with the idea of making recommendations through a Guided Sales tool similar to a Sales Playbook and to provide access to several "helper" flows without creating several buttons or additions to the page layout. This concept is bit more complex and requires considerable planning. Here are some of the ideas we have compiled so far:
- Suggested actions by Stage
- Field completion by Stage
- Follow up reminders
- Close Date extension
- Changing the currency of an Opportunity (and products)
- Adding primary contact
- Adding competitor information
Prompt users to create a Case based on calculated values
We track equipment status in Salesforce and log the last time a "unit" has called home. We can track the duration since it last called and prompt a user to create a case if it has been down too long.
The real advantage here is that DFC can check the current value of the formula field and determine if action is needed or not. Another interesting concept for this use case is to utilize a project by Doug Ayers called Mass Action Scheduler that could run a report of all units that have exceeded a given time threshold and automatically create cases for them.