This flow, coupled with a Process Builder on the opportunity object, sends an email alert (using an Email Alert action):
- 7 days after the Close Date for opportunities with an amount greater than $1M
- 14 days after the Close Date for opportunities with an amount greater than $100k and less than $1M
- No notification if the opportunity is less than $100k
- Updates the opportunity’s Notification Date (a date/time custom field) when the flow has completed
The flow is configured like so:
- The opportunity resource, which is of the variable and record type (of the Opportunity type), is available as an input resource (it can be passed in from the calling Process Builder).
- A Pause element, which specifies three configurations:
- One for an amount greater than $1M with a 7-day resume event (Big Deal).
- One for an amount greater than $100k with a 14-day resume event (Mild Deal).
- A default one with no resume event
This is the configuration of Mild Deal pause conditions:
Pause Configuration for mild deal path
This is the configuration of the Resume event for the Mild Deal path:
Resume configuration for mild deal path
- Three Action elements for opportunity notification and one for Pause element failure (even the Pause element can fail). To do this, select the Action element, filter the actions by Type, select Email Alert, look for an already defined Email Alert action (we saw these when we talked about Workflows, Approvals, Entitlements, and Process Builder), and then set up the record ID, which should be the base for the email alert:
Email Alert action element configuration
- One assignment element to assign the current flow date/time to the Notification Date custom field:
Assignment element configuration
- One Update Records element to update the opportunity with the new assignment.
If the opportunity has an amount greater than $100k, an email alert is sent 7 or 14 days after the close date (depending on the actual amount); if the amount is lower, no email is sent. Regardless of whether or not the email is sent, the opportunity’s Notification Date custom field is set up with the current flow’s execution date/time, which will be set:
- to the current date/time of flow execution for low deals
- to the opportunity’s Close Date field, plus 14 days (as for the resume event), for mild deals
- to the opportunity’s Close Date field, plus 7 days, for big deals (again, as for the resume event)
This means that the final Update Records element is executed in different contexts, depending on the path that the flow has passed through.
When the flow is paused, it is listed in the Paused and Waiting Interviews section of the Setup | Process Automation | Flows page:
Paused flows list
Now, you should have all the key elements so that you can start building your flows.
Unfortunately, it wasn’t possible to cover all the properties and configurations that are available for flows. To deepen your knowledge of these additional elements, resources, and operators, please refer to Salesforce Help at https://help.salesforce.com/articleView?id=flow_ref.htm&type=5.