You are here:
Send Reminders After Waiting for One of Several Possible Events Example
Create a flow that sends reminders before an account renews or a contract ends.
Required Editions
| View supported editions. |
You're designing a flow that reminds account owners to follow up with their customers a week before either the account renews or the contract ends. The flow sends a reminder email for whichever date occurs first.
Example
This flow already contains these populated variables. Before the flow executes the Wait element, it looks up and stores the contract's ID, its parent account's ID and OwnerId, and the account owner's Email.
- {!accountId} contains the ID for the account
- {!contractId} contains the ID for the contract
- {!accountOwner} contains the ID for the account's owner
- {!ownerEmail} contains the account owner's email address
The Wait element defines two time-based resume events.
The base time for the first event ("Week before account renews") is the value of Account.Renewal_Date__c (1) on the record whose ID is stored in {!accountId} (2). The offset is -7 days (3).
The base time for the second event ("Week before contract expires") is the value of Contract.EndDate (4) on the record whose ID is stored in {!contractId} (5). The offset is -7 days (6).
You only want to send one follow-up reminder and the flow always waits for both events, so neither of these events need wait conditions. However, just in case something goes wrong, set a fault path. In this example, the fault path sends an email that contains the fault message to the user who created the flow.

