Loading
Prepare for Email to Become the Default Login ExperienceRead More
Multiple Salesforce Services Impacted - Support Case Creation Also AffectedRead More
Intermittent freezing when using using certain browser versionsRead More
Automate Your Business Processes with Salesforce Flow
Send Reminders After Waiting for One of Several Possible Events Example

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 runs 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
Screenshot of a sample flow that waits for an absolute alarm event

The Wait element defines two time-based resume events.

Tip
Tip Every time-based resume event consists of a base time and an offset. For record-based time, the flow needs three pieces of information to determine the base time: the object, the date/time field, and the specific record. The offset for record-based time works the same as it does for flow-based time. The flow must know the unit (either Days or Hours) and the number of those units. For both of these events, the base time is offset by -7 days, because weeks isn’t an acceptable offset unit.

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).

Screenshot of the first event's parameters

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).

Screenshot of the second event's parameters

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.

 
Loading
Salesforce Help | Article