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
Malisa Gibbons 9Malisa Gibbons 9 

manage past due opportunities with process builder

I need to automate to change the stage of past due opportunties after they are 15 days past the 1st of the current month.  I have tried doing this in process builder but not sure how to write the formula for the "Close Date" field.
What is the best way to manage past due opps so they automatically change status if they have not been updated in the required time my company requires?
Raj VakatiRaj Vakati
You can set the Close Date as 
TODAY() - 15 

https://success.salesforce.com/answers?id=9063000000158clAAA
https://medium.com/@apeattie/salesforce-process-builder-best-practices-24e674b2b2b1
https://venntechnology.com/2015/04/automating-salesforce-com-with-process-builder/
https://automationchampion.com/learning-process-builder/
Naren9Naren9
Hi Malisa,
Based on my analysis, you can't use the process Builder to do this. Process Builder always has the condition as when the record is created or updated. So Opportunity has to be updated to trigger the Process Builder, but in your requirement, no one is going to update Opportunity. System has to search for all the Due Opportunities on 1st of every month.

We have 2 Options:
1. Asynchronous Apex job call.
More details on this 
https://trailhead.salesforce.com/en/content/learn/modules/asynchronous_apex/async_apex_scheduled
2. In Asynchronous Apex job call, just update a Dummy field on Opportunity record and then call the process builder when this dummy field is updated.

Thanks,
Narendar