How does salesforce lightning flow send email alerts?

How do you feel when you receive plain text emails from businesses, a bit shabby? Here Salesforce comes to the rescue with Lightning Email Templates. Using the Lightning email builder, built on the Salesforce platform.

Before covering the topic “How does salesforce lightning flow send email alerts?” we need to understand, what is salesforce lighting flow.

What is salesforce lighting flow?

There are many different automation options when it comes to Salesforce, but none are quite as powerful as Flows. Unlike relatively straightforward ‘If/then’ logic provided to us via workflow rules and process builder, flows allow us to achieve complexity levels close to custom code through a GUI.

Flows allow you to implement much more complex logic through the power of declarative tools or configuration. Given all the options that Salesforce provides us to automate things, it can be difficult to choose the right option sometimes. Luckily Salesforce has provided us with guidelines and when to use which.

When it comes to updating fields often times a simple if/then the logical flow will get you there. However, sometimes we need multiple if/then statements to achieve the requirement so you may want to leverage process builder. When those two options aren’t enough you may want to leverage flow which can update any record (not necessarily one that started the process), prompt the user with screens, call apex classes, send emails, launch approval processes etc.

Flow is really the future and the now of Salesforce declarative development. Salesforce has put a tremendous amount of resources into the flow and they will continue to do so.

Flow Terms

Lightning Flow: Includes tools for building, managing and running flow and processes.

Flow Builder: Point and click tool for builder flows

Flow: Application that automates business processes by collecting data and doing something in salesforce or external System

Type Of Flow

There are two types of flows: 

  • Screen flow: A screen flow is a way for admins to create a process guided through various screens with clicks not code. The general idea is to prompt a user with a window to input some values. Based on those values you can make a decision in your flow on where to take the user.
  • Auto-launched flow: Whereas a guided screen flow allows you to guide a user through a business process, an auto-launched flow allows you to perform complex processing on the backend without a user knowing. You can think of it like a process builder or workflow rule, but the complexity potential is much greater! An auto-launched flow is sometimes called a headless flow because there is no GUI that a user interacts with.

How does salesforce lightning flow send email alerts?

If you receive plain text emails from businesses, it looks a bit shabby. Salesforce comes to the rescue with Lightning Email Templates. Using the Lightning email builder, built on the Salesforce platform, you are able to insert fields into email templates (mail merge) from a record in Salesforce to use across a range of use cases (e.g. for sales emails, renewals, case updates).

Anyone can use the Lightning Email Template Builder directly. It works with merge fields in email alerts, Workflow, Process Builder, Flow, Approval Processes and more. It’s better, and much more modern than Salesforce Classic Email Templates, and is also the same builder that’s been rolled out across many other Salesforce platform products, such as Pardot.

Set up Lightning Email Templates

With Salesforce Lightning Email Templates, it’s easy to update existing Email Alerts to use a new Lightning email template, you just need to edit the Email Alert and point it to the new Lightning email template.

To set up Lightning Email Templates, we need to:

  • Enable Lightning Email Templates
  • Create Email Templates in Salesforce Lightning

Enable Lightning Email Templates

Enabling Lightning Email Templates is a two-part process.

Part 1: Enabled Template Folder Sharing

Part 2: Enable Content Builder

Part 1: Enabled Template Folder Sharing

However this part is not mandatory, but it’s very helpful to all your users, so they can share and access email templates amongst themselves.

We can try it in a sandbox first: 

  1. In a sandbox,  Go to Setup and search for “Lightning Email Templates”
  2. Switch “Folders and Enhanced Sharing” to on.
unnamed-81.png (512×160)

Part 2: Enable Content Builder

  1. Create a new Permission Set (e.g. “Lightning Email permission set”)
  2. Go to System Permissions
  1. Tick “Access drag-and-drop content builder” (this controls whether the “Edit in Builder” button appears later on)
  2. Save
  3. Apply to users as appropriate
unnamed-84.png (1080×490)

NOTE: If you don’t see “Edit in Builder” when using the Template Builder in the next section, then your system still hasn’t been updated Or log out and back in again, this is to avoid the Lightning delay!

Create Email Templates in Salesforce Lightning

To create Email Templates in Salesforce Lightning, user needs to perform the following steps:

  1. Click on App Launcher and search for Templates in the App menu
unnamed-85.png (1076×549)
  1. Create a new template. Here you put in the “metadata” for the email, such as the subject line, which object it relates to (if you want to merge field data into it) and where it should be saved. The body of the email comes soon, but not quite yet!
unnamed-86.png (1089×839)
  1. Click on “Edit in Builder” button.
unnamed-87.png (1089×709)
  1. In the email screen, if you wish to update the background colour, go to Style (on the right) and click on the colour selection box. And set the colour of your choice
  2. You can add images to email templates in Salesforce Lightning easily by dragging an image component from the left-hand sidebar on to the email canvas.
unnamed-88.png (1096×583)
  1. Once you have done all the setting, click on the Save button 
  2. Welcome to the Lightning Email Builder screen appears
  3. Click on the Save button

Now you’re ready to use the email template. You can use these in an Email Alert or end users can use them directly within Salesforce when creating an email. 

At the bottom of the email screen, there’s the insert, create or update template button, which users can click to select the template that they want.

unnamed-92.png (597×768)

Lightning Email Template Limitations: 

It has a few limitations like:

  1. Merge fields are resolved for most activity-enabled objects – the exception is that merge fields are not yet available for Contact and Lead objects
  2. You cannot edit classic email templates in the Content Builder; you have to create new Lightning email templates. However, updating an Email Alert is simply a matter of editing the Email Alert, pointing and clicking and selecting the new Lightning email template
  3. Cross-object merge fields still aren’t supported
  4. Lightning Email Template Content Builder is not as powerful as Marketing Cloud’s Email Studio
  5. Some Classic Template functionality is missing, such as:
    1. Send Test and Verify Merge Fields
    2. Record Type Name. This field needs to be recreated as a Formula Field; using the RecordType field gives the Record Type ID instead
    3. Details Link (the ability to insert a link directly to the record, which is very useful for internal email alerts). The merge field you need to type is “.link” e.g. {{{Contact.link}}} or {{{CustomObject__c.link}}}

Related Posts

14

Nov
Automation Services

PSAG Technologies, welcomes Biren Chaudhary as Global CEO

Reaping the rewards of digitalisation and digital transformation with PSAG Technologies For businesses of all sizes, joining the digitalisation revolution may be a daunting prospect. Lack of internal skills and aversion to change can impede digital transformation initiatives and threaten an organisation’s relevance. PSAG Technologies — a vibrant professional services and IT consulting company founded in 2016 […]

Automation Services

What is Carbon Credit Allocation?

The Carbon Credit Allocation object represents information about how the carbon credits are allocated by an organization to offset their emissions. It is a platform that makes carbon credit purchases simple and transparent, allowing organizations to accelerate climate positive impact at scale. The global voluntary carbon market is growing as many organizations race to achieve their net[…]