Share this blog!

Salesforce ~ How to perform time-based (monthly/quarterly) actions using Flows

Hi all,

In this short article (it's mostly screenshots), I will be talking about using declarative methods to perform actions (create records, call a subflow, call approval process etc.) on a timely basis. A quite common example use case is creating quarterly or monthly reports.

In this example, we will be creating a custom record every quarter, that is, the 23rd of March, June, September and December.

For this we will be using the following structure that incorporates the "Start" element that is triggerred by a schedule. Then a "Decision" is determining if the current date is the 23rd of a month divisible by 3. And then a subflow is called, which can be replaced by any supported action you prefer.


Launching the Flow


First we will initiate a Flow that runs every day.

  1. Select "Scheduled Jobs" to launch the flow
  2. Set start date and time
  3. Set the "Frequency" to "Daily"





Formula to check the date

We will have to use a formula to determine whether the current date is a valid date (i.e. 23rd of March, June, September, December).

The custom formula checks if the current date is the 23rd, and also, if the current month is divisible by 3. 

DAY(TODAY()) == 23 && MOD(MONTH(TODAY()), 3) == 0



Decision Element

Once we configured how the flow is launched and the custom formula, we can add a "Decision" element with the custom formula.




That's it! You may activate the flow and it will be performing the configured actions as scheduled.

Cheers!



Next PostNewer Post Previous PostOlder Post Home

0 comments:

Post a Comment