function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jyothi NimmakayalaJyothi Nimmakayala 

Email alert on Status field selection

I have a requirement to send email alert when seminar attendee(custom object) is selected as contact (look up object) and seminar status as "attended". But when same contact is selected for another seminar attendee and status as "attended", email should not be sent . Only after 30 days if new seminar attendee is selected for this contact , then new email alert should trigger. I was able to set up process builder for this seminar attendee object and send email alert but need logic for 30 day calculation before another new email can trigger.
Can someone please help
NagendraNagendra (Salesforce Developers) 
Hi Jyothi,
  1. Create a custom checkbox field (Email Sent in Last 30 Days) on Contact object.
  2. In Process Builder criteria for your Email Action, check for AND(Attendee__c.Contact__r.Email Sent in Last 30 Days = FALSE, TEXT(Seminar Status) = "Attended").
  3. If criteria are met, send an email and set Attendee__c.Contact__r.Email Sent in Last 30 Days to TRUE. This TRUE value will prevent this Contact from being emailed again (by the same action) via the Email Sent in Last 30 Days check in Step 2.
  4. As a second action of the same criteria node, create a Scheduled Action which sets Attendee__c.Contact__r.Email Sent in Last 30 Days to FALSE 30 days after the trigger date. In 30 days a time-based action will set the Contact's Email Sent in Last 30 Days field to FALSE, re-enabling that Contact to receive another email alert.
Hope this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra