+ Start a Discussion
Rachel Linder 8Rachel Linder 8 

Trying to Write a Process Builder Flow that send an email alert on the initial criteria being met and then an email of that criteria changes

I have written process builder flow for an email alert. The first set of criteria is met to send an email alert the first time the criteria is met. The second set of criteria is met to send an email any time the fields change after the initial criteria being sent. Right now it is skipping the initial criteria alert and only sending the ischanged criteria. Not sure what to do to correct this.

Initial Criteria to be Met to Send Initial Email
User-added image
Initial Crtieria Above defined
Initial Criteria:
 
  1. Stage Name equals Closed Won
  2. Foot Traffic Reports equals DAP
  3. Foot Traffic Reports equals DAP2
  4. Foot Traffic Reports equals DAP3
  5. Cross-Channel Reports Is Null False
  6. MTA Reports Is Null False
  7. TV Reports equals Grace
  8. TV Reports equals Tune
  9. Measurement Reports Offered equals Yes
  10. Record Type Name equals Viant MS
  11. Last Modified Profile ID equals xxxxx1
  12. Last Modified Profile ID equals xxxxx2
Filter Logic
(1 AND 9 AND 10 AND (11 OR 12)) AND (2 OR 3 OR 4 OR 5 OR 6 OR 7 OR 8)

Advanced is checked as yes

IsChanged Criteria after Initial Criteria being met
User-added image
GauravendraGauravendra
Hi Rachel,

You can create a checkbox field (default value as false) and update it as true once the initial criteria satisfises.
During the second criteria check both the isChanged and if the checkbox is true.
If both are satisfied then trigger the second email.

Hope this helps!
Rachel Linder 8Rachel Linder 8
Thank you. So, I have the checkbox created. How do I update the IsChanged formula to include the checkbox being true?

AND(
       OR(
             ISCHANGED([Opportunity].Cross_Channel_Reports__c),
             ISCHANGED([Opportunity].MTA_Reports__c),
             ISCHANGED([Opportunity].Foot_Traffic_Reports__c),
             ISCHANGED([Opportunity].TV_Reports_1__c)
       ),
CASE(
          [Opportunity].StageName, "Closed Won", 1, "Activated/Won",1,0) = 1,
           ISPICKVAL([Opportunity].Measurement_Reports_Offered__c, "Yes"),
            [Opportunity].Record_Type_Name__c = "VIANT Managed Service",
CASE(
          $Profile.Name, "System Administrator", 1,"Platform Analytics",1,0) = 1
)  
 
Rachel Linder 8Rachel Linder 8
The checkbox is created and I can't get the field to update to true if the initial criteria is met. I added another action to the initial criteria as "No Crtieria - just update records". And I tried creating a separate workflow rule for the checkbox update using the initial critieria and "No Crtieria - just update records". 

I am not sure what I am doing wrong for updating the checkbox. It seems simple enough that if all the initial criteria is met just update the checbox. But that doesn't seem to do it.
GauravendraGauravendra

Hi Rachel,

To update the checkbox to true, add another quick action after initial criteria is met.
Select the "Update Records" in action type and select "Select the Opportunity record that started your process".
Update the checkbox to true.
Add this immediate action to the same criteria check i.e. criteria 1. (You do not need to create new criteria check for update here).

Second, to check whether the checkbox is checked or not. Just add one conditon in AND formula.

[Opportunity].CheckboxField__c = TRUE

Hope this helps!

Rachel Linder 8Rachel Linder 8

I have added an immediate action to update the checkbox but it isn't working.

The criteria for the initial email is:

  1. Stage Name equals Closed Won
  2. Foot Traffic Reports equals DAP
  3. Foot Traffic Reports equals DAP2
  4. Foot Traffic Reports equals DAP3
  5. Cross-Channel Reports Is Null False
  6. MTA Reports Is Null False
  7. TV Reports equals Grace
  8. TV Reports equals Tune
  9. Measurement Reports Offered equals Yes
  10. Record Type Name equals Viant MS
  11. Last Modified Profile ID equals xxxxx1
  12. Last Modified Profile ID equals xxxxx2
  13. Filter Logic
(1 AND 9 AND 10 AND (11 OR 12)) AND (2 OR 3 OR 4 OR 5 OR 6 OR 7 OR 8)

The Immediate Action to check the checkbox as true if all the above is met is:
User-added image
The checbox is not checking. So, to add the checkbox to the initial crtieria wouldn't work just yet.

What am I doing wrong?
Rachel Linder 8Rachel Linder 8
So, I have created the checkbox and it is working. Problem is that it is still skipping the first email alert for the initial criteria being met and moving to the second set for when the values are changed.

I want to be able to send one initial email when the criteria is met at Closed Won. And then if it changes after that would be the second set of criteria.

The criteria for the initial email for when it is closed won and meets the criteria for the first time is:
  1. Stage Name equals Closed Won
  2. Foot Traffic Reports equals DAP
  3. Foot Traffic Reports equals DAP2
  4. Foot Traffic Reports equals DAP3
  5. Cross-Channel Reports equals DAPX
  6. MTA Reports equals DAPZ
  7. TV Reports not equal to Grace
  8. TV Reports not equal to Tune
  9. Measurement Reports Offered equals Yes
  10. Record Type Name equals Viant MS
  11. Last Modified Profile ID equals xxxxx1
  12. Last Modified Profile ID equals xxxxx2
  13. MTA Reports equals DAPZZ
  14. MTA Reports equals DAPZZZ
  15. MTA Reports equals DAPZZZZ
  16. MTA Reports equals DAPZZZZZ
  17. MRO-DAP Won Initial Criteria met equals True (this is the checkbox)
  • the filter logic for the above is:
((1 AND 9 AND 10 AND 17 AND (11 OR 12)) AND (2 OR 3 OR 4 OR 5 OR 6 OR 7 OR 8 OR 13 OR 14 OR 15 OR 16))
  • in process builder thiere is an Advanced option which is checked. The Advanced option says "Do you want to execute the actions only when specified changes are made to the record?" and we checked "yes"
IsChanged Criteria after Initial Criteria being met is:
  • The criteria for executing the action that is checked is "Formula evaluates to true"
AND(
       OR(
             ISCHANGED([Opportunity].Cross_Channel_Reports__c),
             ISCHANGED([Opportunity].MTA_Reports__c),
             ISCHANGED([Opportunity].Foot_Traffic_Reports__c),
             ISCHANGED([Opportunity].TV_Reports_1__c)
       ),
CASE(
          [Opportunity].StageName, "Closed Won", 1, "Activated/Won",1,0) = 1,
ISPICKVAL([Opportunity].Measurement_Reports_Offered__c, "Yes"),
[Opportunity].Record_Type_Name__c = "VIANT Managed Service",
[Opportunity].MRO_DAP_Report_Won_Initial_Crtieria_Met__c  = True,
CASE(
          $Profile.Name, "System Administrator", 1,"Platform Analytics",1,0) = 1

What we are trying to accomplish is that one email gets sent when an oppotrunity is closed won and when the other criteria are met it send one initial email stating that a Closed Won opportunity has those reports. When the opportunity is first move to closed won it might not meet that critieria. But at a later date it then gets update dto include the report criteria(opportunity stage is still Closed Won).

Then after that if any of those report fields is changed it send an email. Right now it is only sending the ischanged email. We cannot get the first step to work.

Again this i using process builder. Below is a high level look at the process builder flow:

User-added image

Any help is appreciated as we have been working on this for atleast 3 or 4 weeks now and we have had to delay the roll-out of a project. We did try to get help from salesforce support and they suggested the same thing as we have done. We had no luck.