Email Notification as Flow

Damian Green-Moore Updated by Damian Green-Moore

Distribuiton Engine comes with a default workflow for email notifications that can be used to notify team members when records are assigned, have missed the SLA, or reassigned. While Salesforce is phasing out workflows, currently, they do not have the ability for managed package providers to remove existing workflows. As such, they will continue to allow us to include the workflow in the package and for the workflow to work.

As you are transitioning your workflows to flows, you may want to recreate the Distribution Engine Workflow as a flow. This can be done using the same logic the workflow uses.

  • From the flow list page, click New Flow
  • Choose "Record-Triggered Flow"
  • For the Object choose "Distribution Log"
  • Trigger the Flow When - "A record is created or updated"
  • Set Entry Conditions - "Formula Evaluates to True"
    • This will be the same formula found in the Distribution Engine Notification workflow
    ((ISNEW() && n2de__In_error__c != true) || (ISCHANGED(n2de__In_alert__c) &&
    n2de__In_alert__c = true) || (ISCHANGED(n2de__Is_reassigned_to_queue__c) &&
    n2de__Is_reassigned_to_queue__c == true) || (ISCHANGED(n2de__Is_pending__c) &&
    n2de__In_error__c != true) || (ISCHANGED(n2de__In_error__c) && n2de__In_error__c != true))
    && n2de__Email_notifications_disabled__c != true && n2de__Is_pending__c != true
  • Leave the "Optimize the Flow for" section as "Actions and Related Records"
  • Next add a Flow Element of "Distribution Engine - Email Notification v2"
  • Set the input values for the selection action to the record Id of the Record Id of the Distribution Log.
  • Save and activate the flow. Make sure to deactivate the workflow if you were previously using it.

How did we do?

From Email Address