Hello #Trailblazers,
Welcome back and in this blog post, we will discuss three different scenarios related to flow. So let’s start.
You can get access to all the flow Here
Before we actually start talking about the salesforce let’s talk about when to use which flow.

Create a Screen Flow to Display the Input screens for Creating Student Record. Also, Display the Success Screen and Url to New Record.
In this screen flow, you also need to display the rich text area as an input. As Salesforce Flow does not have a Rich text Area Component so we will use the LWC Component. Here is what we will do.
Show How to use Lightning Web Component inside Salesforce Screen Flows.
1 – Navigate to Setup -> Search For Flows -> Click on New Flow

2 – Then Select Screen flow
Below are the steps that we will have to follow in order to develop the complete flow.
Student Information Input Screen

Create Record Element Screen

Success Flow

Complete Flow

Auto Convert a Lead When


Invocable Apex
Invocable Method Considerations
Inputs and Output Considerations
Here is the Apex Code for the Invocable Action
/**
* @description : This class is used to convert the Lead using Flow
* @author : Amit Singh
* @group : Flow
* @last modified on : 12-13-2021
* @last modified by : Amit Singh
**/
public with sharing class ConvertLeadUsingFlows {
@InvocableMethod(label='Lead Convert Using Apex' description='Convert the Lead Record Using Apex' category='Lead')
public static List<ConvertLeadUsingFlows.OutputWrapper> LeadConvert(List<Id> LeadIds){
/* Get the MasterLabel from LeadStatus Object using SOQL where isConverted is True and Store the MasterLabel */
LeadStatus convertStatus = [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted = true LIMIT 1];
/* Create the list of Database.LeadConvert */
List<Database.LeadConvert> leadConvertList = new List<Database.LeadConvert>();
for(Id LeadId : LeadIds){
Database.LeadConvert lc = new database.LeadConvert();
lc.setLeadId(LeadId);
lc.setConvertedStatus(convertStatus.MasterLabel);
//lc.setDoNotCreateOpportunity(true);
leadConvertList.add(lc);
}
List<Database.LeadConvertResult> leadConvertResult = Database.convertLead(leadConvertList);
return new List<ConvertLeadUsingFlows.OutputWrapper>();
}
/*
Input Parameters
Apex Input Flow Input
List<T> ~= Id
List<List<Id>> ~= List<Id>
*/
public class OutputWrapper{
@InvocableVariable(label='Status of the Lead Convert' description='Status of the Lead Convert')
public String status;
@InvocableVariable(label='Error Message if any' description='Error Message if any')
public String message;
}
}
Follow the steps to Create the Flow and Select Record Triggered Flow. For Object select lead and see below image for other conditions

Step2 – Check if the Lead Status is Changed to Qualified

Step3 – Call the invocable action

Complete Flow

Thanks for reading 🙂
I will share more scenarios soon.