Friday, June 4, 2021

Pending Approval reminder notifications

 Flow to Send Weekly Reminder Alerts for Pending Approval Requests 

Business use case:

An approval process is assigned to the step approver but but sometimes approvers don't take any action. The administrator wants to send reminder based on the frequency until user doesn't take action(either approve or Reject)

The below image shows the flow to send weekly reminder Alerts. 


Diagram

Description automatically generated 

 

Basic Setup required to get started with flow configuration: 

  • Go to Setup and type Flows in Quick find and Click on Flows. 

  • A list of flows appears. Click on New Flow.  

 

Graphical user interface, application, table

Description automatically generated 

 

  • A new screen appears with a list of available flow types. Select Schedule-Triggered Flow and click on Next. 

 

Graphical user interface, application

Description automatically generated 

 

  • A flow screen with the Start element appears as shown below. 


Graphical user interface, application

Description automatically generated 

 

Let’s go through each component (1 to 9) of the flow. 

  1. Scheduling the flow: 

  • Start Date: Date from which the flow will start sending reminder alerts. 

  • Start Time: Time at which the flow will run depending on the frequency. 

  • Frequency: Flow will run depending on the frequency. It can be Once, Daily or Weekly. 


Graphical user interface, application

Description automatically generated 

 

  1. Collecting the records: 

  • Collecting the records (here Account object is used as an example) for which we want to send the reminders. Drag and drop Get Records element from flow toolbox. Refer to below image. 


Graphical user interface, text, application, email

Description automatically generated 

 

 

 

  1. Loop through each object (Account) record: 

  • Once you collect all the records of the object (Account), Loop through each record by adding the Loop element from the flow toolbox. 


Graphical user interface, text, application, email

Description automatically generated 

 

  1. Get Process Instance for each record in the loop: 

  • Drag and drop Get Records element from flow toolbox.  

  • Object: Select Process Instance as the object 

  • Select filter conditions as shown the below image. 


Graphical user interface, application, email

Description automatically generated 


  1. Loop through each Process Instance record: 

  • Once you collect all the Process Instance records of each object (Account) record, Loop through each record by adding Loop element from flow toolbox. 


Graphical user interface, text, application, email

Description automatically generated 

 

 

 Get Approval Request for each Process Instance record in the loop: 

  • Drag and drop Get Records element from flow toolbox.  

  • Object: Select Approval Request as the object 

  • Select filter conditions as shown in below image. 


Graphical user interface, text, application, email

Description automatically generated 

 

 

  1. Decide/Check if record is older than 7 days: 

  • Drag and drop Decision element from flow toolbox. 

  • Use conditions as show below. 


Graphical user interface, text, application, email

Description automatically generated 

 

  • Formula: 

  • Go to Manager in the left-hand side of flow builder. Click on New Resource. 


Diagram

Description automatically generated 

 

  • New Pop-up screen appears, select Formula as Resource Type. 


 

 

  • Enter the name for formula and enter the below formula in the formula field. 

MOD(VALUE(LEFT(TEXT({!Get_Approval_Requests.ElapsedTimeInDays}),FIND('.',TEXT({!Get_Approval_Requests.ElapsedTimeInDays})))),7) 


Graphical user interface, text, application, email

Description automatically generated 

 

  1. Get Approver’s Email Address: 

  • Drag and drop Get Records element from flow toolbox.  

  • Object: Select User as the object 

  • Select filter conditions as shown in below image. 


Graphical user interface, text, email

Description automatically generated 

 

  1. Send Email to Approver: 

  • Create Body of the Email Template: 

  • Go to Manager in the left-hand side of flow builder. Click on New Resource. 


Diagram

Description automatically generated 

 

  • New Pop-up screen appears, select Text Template as Resource Type 


Graphical user interface, text, application, email

Description automatically generated 

  

  • Enter the name for text template. Provide the verbiage as required. 


Graphical user interface, text, application, email

Description automatically generated 

 

  • Drag and drop Action element from flow toolbox. 

  • Below screen appears, Click on Email from the list available in Left-Hand side. 

  • Search for Send Email action in the search box. Click on Send Email. 


Graphical user interface, application

Description automatically generated 

 

  • Select configs as shown below and provide subject as required. 


Graphical user interface, text, application

Description automatically generated 

 

 

  1. Final Step: 

  • Connect all the flow elements as shown in below image. 

  • Save the flow. Click on Activate button. 


Diagram

Description automatically generated 


written by: Ganesh

No comments:

Post a Comment

 New Visitor Log Entry flow with Community: Visitor Log