Search code examples
salesforceworkflowprocessbuildersalesforce-lightning

How to add multiple scheduled actions in a process builder


I want to send reminders 45 days, 30 days, 21 days before the event start date. I have mentioned all those 3 in process builder. Please see the screenshot. enter image description here The problem I am facing is if I create a task with only 21 days left to the event start, it triggers the 45 days and 30 days email alert too because it thinks the date has already passed, so it kind of triggers them. Is there any way system can only send email alerts for the upcoming reminder dates not the ones that have already been passed.

Thanks


Solution

  • Try with 3 rows of criteria (diamonds)

    You can have a flat structure

    1: action for 21 or more + evaluate next
    2: action for 30 or more + evaluate next
    3: action for 45 or more
    

    or a "tree"

    1: action for 21, 30, 45 + stop (it's what you have now but you'll need to change entry criteria)
    2: action for 21, 30 + stop
    3: action for 21
    

    The 1st one should be easier to maintain if you need to inject new stage at some point. But you will have to copy the entry criteria you already have (whatever's hidden behind that "check if task is pending") and if you change that - remember to change it in all 3.

    The moment you have more than 1 diamond element you can change the "stop" in the one above it to "evaluate next criteria"

    enter image description here

    For flat structure the entry criteria could be whatever you have now + this (untested but something along these lines)

    Task.CreatedDate - less or equal - formula > NOW() - 45
    

    enter image description here