I need to Create flow or trigger that will automatically close opportunities as "Closed/Lost" with reason "Loss of Interest". Criteria to close the opportunity: Opportunities that are passed their close date by 30 days with either no activity or activity documented 30 days ago or more. Trigger an email to users with list of opportunities that were closed along with Opportunity Owner, Account Name, Opportunity Name, Stage, Sales Value, Age, Close Date, Last Activity
Is this possible?
Hi @Chris Welch I think better to use batch apex to send bulk email as entry criteria is bit confusing. Because when you wan to check closedate and last activity date on change of some field?
As I understand you need to take opportunity that satisfy 2 condition one is Today()-ClosedDate>=30 and Today()-LastActivityDate/Lastmodifieddate
And update that opportunities stage to closed lost with reason Loos of interest and take your fields to send an email
In flow ls you can update record triggered flow with above 2 conditions
Then update record element to update that opportunity and then Send email action (It will need Email alert that have some email template with opportunity merge field)
Please mark it as Best Answer, If your problem is resolved