Big Idea or Enduring Question:
How to utilize the Flow and set up email-to-lead in salesforce?
Salesforce Flow is a powerful feature provided by Salesforce to minimize the code in your organization. By using it you can create, update, delete records everything just drags and drop. With the recent enhancements (Record-triggered Flow, Schedule-triggered Flow) Salesforce giving more power to admins to create automation with NO code.
Salesforce provides web-to-email features that allow organizations to capture leads from their website. At the same, Salesforce doesn’t offer the email-to-lead feature. There are a few apps available on AppExchange for this purpose. In this article, we will create an automation that allows users to create a lead by sending an email to a specific email address.
Objectives:
After reading this blog post, you will be able to understand:
- When should you use Before-save vs after-save record-triggered flow?
- How to setup Email-to-case in Salesforce
- Use After-save Record-Triggered Flow to create a record
- Use After-save Record-Triggered Flow to delete a record
Business Use case
Corey Eridon is working as a System Administrator at Universal Containers (UC). He has received a new requirement to implement email-to-lead for the organization so that when sales reps send an email to leadstosalesforce@gurukuloncloud.com, it will automatically create a lead in Salesforce. Make sure to assign the lead to the sales rep who sent the email.
Automation Champion Approach (I-do):
Salesforce now allows you to add time-dependent actions in the Flows, similar to the Process Builder. This is a major enhancement that will ultimately bring Flow to the next level.
There are multiple ways to solve the above business requirement. You can either use Apex trigger, Salesforce Flow, Process Builder, and more. To solve this requirement, we will use the After-save Record-Triggered Flow. Check out this article to understand why we are using after-save record-triggered flow for this scenario.
Before going ahead, take a moment here to understand how email-to-case captures the data from email and stores it in the case record.
Field Name | Case Fields |
Email Subject | Subject |
Email Body | Description |
Web Email | |
Name | Web Name |
Before discussing the solution, let me show you a diagram of a Process Flow at a high level. Please spend a few minutes to go through the following Flow diagram and understand it. Let’s begin building this automation process.
Guided Practice (We-do):
There are 5 steps to solve Corey’s business requirement using After-save Record-Triggered Flow. We must: Read the rest of this entry!