The following article explains the process through which you can define a workflow process using Salesforce Flow and send an Email Alert using MassMailer to Opportunity Contact Roles (also Opportunity Team Members and other related lists) upon Opportunity record Create or Update.


You can track the email status values such as open, click, bounce, spam, unsubscribe, etc. You can also log the activity history.

Tips:

  • To use the MassMailer Flow Opportunity Email Alert feature, you need to complete the MassMailer Setup & Configuration.

  • The Flow sends a separate email to each Contact Role/Team Member.


1. Navigate to Salesforce Flow:

  • Click on Salesforce Setup from the top right corner.

  • Search for Flows in the Quick Find box on the left side panel.

  • Click on Flows from the search results and then click on New Flow to open the Flow Builder.




2. Create a New Flow:

  • Choose Record-Triggered Flow.

  • Enter the Flow Label and API Name.

  • Set Trigger: When a record is created or updated (as per your requirements).

  • Click Done.


3. Choose Object and Specify When to Start the Flow:

  • Select Opportunity as the object.

  • Set the Trigger Condition:

    • Only when a record is created, or

    • When a record is created or updated.

  • Click Done.




4. Add Criteria to Trigger the Flow:

  • Add a Decision element.
  • Enter the Criteria Name.
  • Set the conditions logic based on your requirements.
  • Click Done.


5. Define Action to Trigger the Email Alert:

  • Click + Add Element → Action.

  • Choose Email via MassMailer 

  • Set the Apex Variables (* required):

    • Template API Name*: Name of the email template to use.

    • Record Id Field*: Salesforce Record Id of the Opportunity record.

    • From Address: Sender email (defaults to logged-in user if not specified).

    • From Name: Sender name (defaults to logged-in user if not specified).

    • Child Email Field*: Email field for the recipient (e.g., Contact.Email, Contact.Email__c). For Person Accounts, use Contact.Account.PersonEmail.

    • Child Relationship Name*: Parent-to-child relationship name for the child object (e.g., OpportunityContactRoles).

  • Click Done.


6. Activate the Flow:

  • Click Activate to enable the flow.

  • Confirm activation.



Once the flow is activated, it will appear in the list on the My Flows summary page.


7. Track Email Status on Opportunity Object:

Email status values such as delivered, processed, open, click, spam, unsubscribe, bounce, etc., are captured on the Opportunity in a related list called MassMailer Email Status.



8. Track Activity History on Contact Object:

Activity history is captured on the Contact object for all emails sent via MassMailer.