Trigger time dependent actions on Flows within an “if else if” logic

scheduled-actiontime-dependent-workflowvisual-flows

I have had searching the way to build with flows an user requirement that was built with the process builder but I have not been able to migrate it. I notice that the difference between scheduled paths (in flows) and scheduled actions (in processes) is that the scheduled actions can be executed, for example, after a series of conditions created on differents decision logic components but in Flows all scheduled paths born from the root. My requirement is:

if conditionA then
      schedule an action 24 hrs after X date to do action Z
else if condictionB then
      schedule an action 48 hrs after Y date to do action W

Instead in Flows I can do this:

schedule an action 24 hrs after X date then
     if conditionA then
          do action Z
schedule an action 48 hrs after Y date then
     if conditionB then
          do action W    

Apparently Flows do not have the possibility to create the "else if" conditions like processes? Could you please help me with that?

Thanks!

Best Answer

You have your logic backwards. Start with a Decision node, add your Conditions, then for each branch, you can specify Pauses. Note that you need an Autolaunched Flow for Pause elements, but you should be able to call this flow from a standard Process Builder or Record-Triggered Flow.

Here's what that might look like:

Autolaunched Flow

Which you can then call from the main flow:

Record-Triggered Flow

Note that the Decision element evaluates in order from left to right, and will only take the first path that meets the criteria.

Related Topic