Join our slack community to start your learning journey and connect with our gurus for free

An Ultimate Guide on Auto launched Flows in Salesforce

Salesforce Flow is an out-of-the-box application that empowers users to automate complex business processes by collecting data or records in your Salesforce org. As per the latest update from Dreamforce 2K21, Salesforce has announced that workflow and process builder will no longer be available after 2023. Therefore, Salesforce Flows are the future.

Auto launched Flows in Salesforce

So, what’s an Auto launched Flow in Salesforce? Auto launched Flow is leveraged to automate complex business processes without writing code. It can be auto launched from Apex class or Process Builder when a record is changed while inserting, updating, or deleting. This flow type doesn’t require any user interaction to start. They won’t include steps, screens, choices, or dynamic choices in the flow.

Auto launched Flow(No Trigger)

As the name suggests, Auto launched Flows can be launched when invoked by Apex classes, process builders, or REST API. These flows are launched automatically based on specific events or conditions. Auto launched flows provide abstraction, as you can define the complex processes to be carried out in the background without a user knowing the details.

Business Scenario

For Instance, Marvel Industries plans to focus on improving their customer experience and wants to ensure whenever the new Opportunity arises with the type as a New Customer.

  1. Firstly, the Opportunity should be changed to the Qualification stage so that the VP of sales can better understand the sales process.
  2. Secondly, the task should be created for the Sales Rep who owns the Opportunity to call the customer and get more details.
  3. Finally, a Welcome email should be sent to the customer notifying them about a call that has been scheduled with the sales representative.

Solution

To solve the above requirements, we would call an Auto launched Flow using the Process builder whenever the new Opportunity is created with type as New customer. This flow will update the Opportunity stage to Qualification, create a task for the Sales Rep and send a welcome email to the customer.

How should we implement it?
  1. Create an email alert with the Welcome Customers email template.
  2. Create an auto launched flow.
    1. Create a record type variable available for input to get the opportunity record from the Process builder.
    2. Create a data element of type Update records to update the Opportunity stage.
    3. Then create a task of type call and enter the details like Due date, Assigned to, Related to, etc.
    4. Create an action element to send an email alert created in step 1 and assign the Opportunity Id as a record.
    5. Finally, debug(if required), Save, and then Activate the flow.
  3. Create a Process builder on Opportunity.
    1. Select the Opportunity as an object and Start the process only when a record is created.
    2. Define new criteria to check if the Opportunity type is New Customer.
    3. If yes, set an action to call the flow created in step 2.

Action Time


Auto launched Flow(Scheduled Flow)

On the other hand, as the name suggests, these flows only run from the specified time and frequency(once/ daily/ weekly) that the user sets. It provides Salesforce users the ability to run declarative logic on multiple records at a scheduled time. Yes, you heard it right; Schedule triggered flows can also run for a batch of records if the filter conditions are specified.

This type of Auto launch flow executes using a schedule but doesn’t support user interaction, screens, local actions, choices, or choice sets.

Little Insights 

Scheduled flows are bulkified and run for each record in the batch (200 records per batch) and store all of the record’s field values in the $Record global variable. You can refer to the $Record global variable to access the record’s field values.

  • Monitor scheduled flows from the Setup -> Scheduled Jobs page.
  • The organization’s default time zone is used for the scheduled start time.
  • The running user for scheduled flows is the Automated Process user.
  • To debug scheduled flows, set the debug log on the Automated Process entity type.

Business Scenario

For Instance, Marvel Industries plans to improve its customer experience and wants to ensure that its customers receive feedback email notifications every week.

Solution

To solve the above requirements, we would create a scheduled flow on the account to send all the Marvel-related customers a feedback email.

How should we implement it?

Create a Scheduled Flow.

  1. Select the Flow start date and time with today’s time and frequency as Weekly.
  2. Select object as an Account and add a condition to get the only account with the name Marvel.
  3. Create a Get record element to get all the customers related to the Marvel account.
  4. Create a loop element to iterate through the list of customers.
  5. Then create a variable resource, Customer emails of type text to capture all the customer emails.
  6. Create an assignment element to add each contact’s email to the above list.
  7. Create an action element of the type – send an email and select the resource into Email Addresses (collection).
  8. Finally, debug(if required), Save, and then Activate the flow.

Action Time

Tip: Create an error handling strategy for your flow-based automation by building in fault paths

Sum Up

In a nutshell, Auto launched Flow in Salesforce is a robust business automation tool that seamlessly helps in many ways to automate your organization’s repetitive and mundane business processes. Users can choose the flow type based on their needs, but they must acquire the knowledge of Salesforce deployments and functionality to create the flow properly. 

Our seasoned professionals are always ready to help if you require any guidance with Salesforce certifications. Sign up to saasguru and check out our Salesforce Certification Programs. Upgrade your Salesforce career to the next level.

About the Author

Keyuri Pophale is a 4x certified Salesforce Consultant and a team leader with experience of 5+ years. She is involved in client requirement gathering sessions and providing solutions including Sales cloud and communities. She has vast configuration and customization knowledge, including, but not limited to, OOTB functionalities, Apex, and Lightning components.

Leave a Comment

Your email address will not be published. Required fields are marked *