WeDid: Salesforce Mass Email Based On Opportunity Criteria


Salesforce provides the feature of sending emails pertaining to records when the triggering criteria is met. However, the complexity lies mostly in defining the triggering criteria to ensure that duplicate mails are prevented and that the criterias do not overlap one another.


Email alert flow:

  1. Send email template A – when the opportunity is first created
  2. Send email template B – when the opportunity is modified
  3. Send email template C – when the opportunity reaches closed won stage


Most common error due to overlap of criteria:

  1. User updates the opportunity to closed won + update some fields at the same time

Error: Email template B and C are sent out
Expected result: Send email template C only



A combination of workflow rule and workflow actions are use to:

  1. Identify the stages of the criteria and what constitutes a new, updated, final opportunity and implement as the workflow rule criteria
  2. Prevent continuous loop by selecting the correct evaluation criteria.
  3. The above common error can be resolved by using a rule criteria based on the definition gathered from #1. Hence, send email template B – when opportunity is modified but not in closed won stage.

Related Objects Opportunity
Components Workflow Rule, Workflow Action, Email Templates
Complexity Medium