Using Screen Flows to Automate Functions

Greg Bell

Greg Bell has more than 5 years of Salesforce consulting experience with numerous clients in different industries. He has Salesforce certifications in addition to his bachelor's degree in engineering. Greg is continually expanding his Salesforce knowledge and always happy to share success stories and solutions within the community.


Salesforce Flow has improved both the capability and functionality that a non-developer can now deliver on the Salesforce platform. Tasks that previously required experienced and expensive developers can now be done by Salesforce admins with clicks-not-code. 

Older automation tools like Workflows and Process Builder can only perform background tasks but Flow can get user input too. This allows an admin to build some impressive tools that can extend or replace standard functionality. Salesforce consultants at KeyNode Solutions picked couple great cases to share.

If we take the standard Salesforce product selection process as an example, it requires a number of steps to select a product and add it to an opportunity. If you have a large number of products, you are forced to manually search, filter or scroll through the list to find the right products.

Standard Product Selection

The out of the box, standard way Salesforce does it:

1. Select a Price Book

Screen Flows - Select a Price Book

2. Search through a long list of products to select the products we want

Screen Flows - Search Trough List of Products

3. Enter the quantity and sales price

Screen Flows - Enter the quantity and sales price

Flow-Based Product Selection 

As an alternative, a screen Flow can provide a guided product selection based on the Product Family (or other criteria) and can be configured with images to make the product grouping more visual:

1. Select a Product Family

Using the Flow Magic Picklists from The Salesforce AppExchange, we can add images to the field for Product Family.

Ref: https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FeFBAUA3

Screen Flows - Select a Product Family

Using the Datatable flow component from UnofficialSF.com we can display the product records in a table format and allow the user to enter the quantity and sale price.

Ref: https://unofficialsf.com/datatable-lightning-web-component-for-flow-screens-2/

2. A filtered list of products is displayed

Screen Flows - Filtered List of Products Displayed

3. Once the quantity and price are entered, the products are automatically added to the opportunity

Screen Flows - Products Automatically Added to Opportunity

Note: The price book was added to the Opportunity page, allowing the flow to read it from there, saving it from being selecting every time. It could even be stored on the account page if desired.

Adding new products to Price Books 

Adding new products to price books can be a real chore.

First, they have to be added to the Standard price book, multiple times if you use more than one currency.

Screen Flows - Adding New Products to Price Books 1
Screen Flows - New Price Book Entry

Next, they have to be added to your custom price books so your users can select them. Again, if using multiple currencies this has to be done multiple times and it is a two-screen process for each one.

Screen Flows - New Products Added to Custom Price Books

Select the Price Book and currency:

Screen Flows - Select Price Book and Currency

Add the list price:

Screen Flows - Add the List Price

Flow-Based Pricing Wizard 

Adding new products to price books can be a real chore.

The standard process with three (3) currencies took nine (9) screens to add a single product. Using a screen flow, the number of screens can be reduced to only two.

1. Select the Pricing Wizard button to run the flow

The button passes the recordId of the product into the flow.

Screen Flows - Select Pricing Wizard

Next, we get the record for the Product (using the recordId) and then get the Id’s of the Standard Price Book plus the three custom price books (one for each currency).

The next step is to display the screen below to allow the user input. 

2. Enter the three prices and click next – it’s all done!

Screen Flows - Enter Prices and Click Next

Once the user has entered the prices, we need to check which fields have been created and only add the price book entries for those that have a value (non blank).

e.g. If the AUD Price has a value then we need to store that price for the standard price book and then the AUD price book. We do the same for the other two currencies.

The final step is to save the new price book records.

The result is shown below:

Screen Flows - Only Add Price Book Entries for those with Value

Mass Transfer Opportunities 

Here is a simple flow that makes it easy to transfer all open opportunities from one user to another. Perfect for when a salesperson leaves your company, and you need to transfer all their opportunities to the new person. 100+ open opportunities were transferred in just 3 seconds!

Screen Flows - Transfer All Open Opportunities from User 1 to User 2

Achieved with this simple flow:

Screen Flows - Simple Flow

The first step in this flow is to provide the two fields to select the old and the new owners of the opportunities (user records). We filter this list to make sure we only display active Salesforce users.

The second step simply changes the opportunity owner from the old user to the new one.

There are many more examples where flow can be used to automate repetitive tasks that take many steps to perform. The advantages are not just speed but increased accuracy.

If you have a need to automate a process and think that a flow may help you solve the problem, contact the experts from a Salesforce Consulting Partner such as KeyNode Solutions and they can help.

What Certification are you studying for now?

Focus on Force currently provides practice exams and study guides for ten certifications