User Story
As a Salesforce Admin,
I want a subflow to automatically set the Close Dates of Opportunities so that each Opportunity is n
days ahead of the previous one,
So that I can ensure orderly and sequential opportunity Close Dates without requiring Apex code.
Acceptance Criteria:
- The subflow must be named
SetSequentialCloseDatesSubflow
.
- The subflow should accept the following input variables:
- Opportunities (a collection of Opportunity records).
- NDays (a number representing the gap in days between the Close Dates of consecutive Opportunities).
- The subflow should process Opportunities in ascending order of their existing Close Dates.
- The first Opportunity in the collection should retain its original Close Date.
- For each subsequent Opportunity, the Close Date should be incremented by
n
days relative to the previous Opportunity.
- Ensure the subflow only updates Opportunities with non-null Close Dates.
- The subflow should return the updated collection of Opportunities for further processing or updates in the parent flow.