Site icon The Data are Alright

how to rebuild Salesforce approval processes in Flow

I was looking everywhere for a fresh perspective on Salesforce approval processes… and it was nowhere to be found.

Approval Processes are a feature set in Salesforce that may be outgrowing their usefulness. On my project, we had been dealing with some of their downsides for years, but it wasn’t until we changed internal processes that we decided to kick Approval Processes to the curb… and replace them with custom automation built in Flow.

Approval Processes pain points

Let’s discuss some Approval Process downsides:

The issues above were small enough that we were ok with “living with them.” Though now that I type them out, it’s clear to me that we were making too many big compromises and we probably should have made the switch sooner. However, when the new issue arose (below), I knew it was time to cut our losses and start over.

what I built

These are all of the “components” of the Approval Process Replacement. Ha, now that I look at it, the table below is reminiscent of a change set. If you build something similar, you can use a list like this as a guide.

TypeNamePurpose
1Custom Field (picklist)Review StatusWhere is the record in the approval process? Default is “Draft.”
2Screen FlowSubmit for ReviewDisplays text with instructions, and Screen Flow allows staff input (comments) which the Reviewer will be able to see later.
3ButtonSubmit for ReviewWhen the Submitter pushes the button, a screen pops up and shows the “Submit for Review” flow. When Submitted, Review Status field is updated to “Pending Reviewer 1” or “Pending Reviewer 2” depending on logic.

Added button to Lighting Record Page. Button is conditional based on the Review Status, so you cannot see it if a record is already “pending review” or “approved.”
4Screen FlowApprove or ReviseDisplays text with instructions. Screen Flow allows Reviewer input (comments). Screen Flow also updates Field and cues automation.

Embedded this Screen Flow in Lightning Record Page. It is conditionally viewable if a record is “pending review.”
5Record Triggered Flow (after save)Notify staffSends Chatter notifications based on the Current and Prior value of “Review Status.”
6DashboardReview DashboardShows the status of all records pending Review.
7Field History TrackingTurned on Field History Tracking for Review Status, and various custom fields where comments are stored.

Added Single Related List to Lighting Record Page to display field history for selected fields. This is also useful as an audit trail, which is one of the (few) benefits of formal Approval Processes.
8DocumentationHow to Submit a Record for Review and Review Pending ApprovalsAdded article to manual.
9Staff trainingHow to Submit a Record for Review and Review Pending Approvals

Held hands-on training with senior staff after pilot phase of roll out.

deeper dive on flows

As you saw above, this solution required 2-3 different “Flows” to reproduce similar functionality to the old Approval Process. I’m going to break down the Flow design below, including HOW and WHY to use Flows to meet these objectives.

flow 1: submit for review

We wanted to mimic the “Submit for Approval” button that comes from Salesforce, but we also wanted to change the name of the button, the design of the pop-up screen, and the automation that happens when a colleague pushes the “Submit for Review” button. So basically… change everything.

If you used “entry criteria,” and/or multiple APs for different “types” of records, this is also where you would keep that logic.

The blue “Screen” elements are where the magic happens. In these two screens, the Submitter is prompted to write brief comments. The screens are different depending on the type of Submitter, which is handled with logic that is a bit too much minutiae to type here. Most importantly, they have buttons on the screen that lead to different automations. You’ll learn more about this in the next section.

Next, you “distribute” the Flow by using a Custom Button. Here is what mine looks like. Don’t forget to add the button to the page layout or the Lighting Record Page!

flow 2: Approve or Revise

Here is a screenshot of the component Reviewers see on the Lighting Record Page. It’s pretty simple for them. All they need to do is write comments and then click a handy button. We made the buttons friendlier than the standard version. Instead of “rejecting,” the reviewer has the option to request revisions.

Fig 1: View of Screen Flow on Lightning Record Page (this is what the Reviewer sees)

To create a screenflow like this, you need to pull in the appropriate record. Then, you can design a Screen element with any info that you want to show. This can include instructions, data fields, images, etc. The most important part is to add the Flow Button Bar component to the Screen element. (This must be installed separately, but it is free!). You can give the buttons any name you want, just make sure that you keep track of the names, because you will use them later to configure automation that happens when each button is pushed.

Fig 1: Layout of entire Flow.
Fig 2: View in Flow Builder, Screen element. Flow Button Bar is a free component from Unofficial SF.
Fig 3: Decision element (orange element) “looks for” which button was pressed, and then updates certain fields automatically (pink elements). A more elegant design would update a variable and then pass that variable into ONE Record Update element, but this gets the job done.

flow 3: notifications

The last major step of the rebuild was to create a notification engine. I moved these to a Record Triggered Flow based on the automation conventions in my org, but you could also put notifications in your “approve or revise” flow. We did our notifications in Chatter, but you could do them with email alerts, scheduled reports, Slack messages, or any other method that works in your org’s culture.

Since this type of automation is not unique to the buildout for modified approval processes, I’m not going to into detail here. Leave me a comment if you would like to learn more about the notification methods that I built! TL;DR: I used the updated field value in Review Status to launch a series of Chatter notifications which tag appropriate colleagues at each Review step.

additional steps: page layout considerations

Implementing this approach to approvals will require a little bit of surgery on the Lighting Record Page. Make sure you don’t forget to:

My organization is delighted with this new build because it’s prettier and more custom. As an Admin, I’m delighted too! I got to brush off some dusty Flow skills, tear out some technical debt, and make a cumbersome process streamlined and easy to maintain over time. I enjoyed the challenge of building this from beginning to end, not doing it piecemeal or haphazardly. It’s always a good idea to release documentation at the same time as the feature and I’ve fallen out of that habit. This was a good reminder to see how rewarding and fulfilling it is to “wrap everything up with a bow.”

There is a lot of conversation in philanthropy orgs about the best ways to build custom processes in Salesforce. I don’t think there is “one right answer” here, but I hope that posts like this can contribute to the dialogue. I’d love to hear from you if this sparks any ideas for you, or if you’ve come up with different workarounds! Don’t be a stranger, I read every comment. And yes, WordPress makes me “approve” them!

Exit mobile version