Learning Salesforce Flow - Flow Types

 


        • There are five different types of Flows.
        • Which one is used where?





    About Screen Flows

  • Screen Flows are the only types of Flow where you can get input from the user.
  • If you need to get any input from the user, you must use a Screen Flow.

    A Screen Flow can be launched via many methods including:

    • Custom buttons and links
    • Lightning pages
    • Flow actions
    • Utility bar
    • Community pages
    • Custom Lightning components
    • Visualforce pages
    • Web tabs

    You can get input for a Screen Flow using a large number of field types including: text, numbers, percentages, picklists, checkboxes, radio buttons, toggles, file uploads, URL, date, and date-time values. 

    You can also display values on the screen including all the field types listed above as well as displaying images. 

    A screen flow can contain all the other elements to like Get Records, Decisions, Assignments etc but is the only type of flow that has the Screen element.


  • Exercise: Screen Flow Distribution (Trailhead)



Schedule-Triggered Flows


A schedule-triggered flow starts at a specified time and frequency for a batch of records.

The schedule is configured in the Start element of your flow.

The schedule can be run Once, Daily or Weekly and you can set the start Date and Start Time to run it.

The Scheduled flows will run under the user called “Automated Process User”.

Because the flow could be running at any time day or night and there may not be anyone logged in to Salesforce at the time, it makes sense that you cannot have a Screen element in a Schedule-Triggered Flow.

These type of Flows are ideal for running a process that needs to be run only once, every day or every week.



Create this flow in your own developer org that you have created for this course.

Aim

Create a flow that will run once and update all contacts that a) are not deleted records and b) do not have a value for Lead Source. Update the lead source value to "Web".

Method


Select Schedule-Triggered Flow:



Select the Auto-Layout:


Case Status change into Closed Status whenever Case status is verified





Choose the Case object



















OUTPUT 













Autolaunched Flows (No Trigger)


Unlike a Screen Flow, this type of Flow does not support any user interaction.

It can be automatically launched through:

  • Process Builder
  • Custom Apex classes
  • REST API
  • Web tabs
  • Custom buttons or custom links
  • Visualforce pages

but does not support screens, local actions, choices, or choice sets.

You can call this type of Flow from Process Builder and you can also configure a button or link to launch it too.


Exercise: Create an Autolaunched Flow (No Trigger)




Record-Triggered Flows


The Record-Triggered Flow is launched when a record is Created or Updated.

It makes before-save updates to the new or changed record that launches the flow. Only these elements are supported: Assignment, Decision, Get Records, and Loop.

You do not need to have an Update Elements (it is not available) because the record is automatically updated as part of the record creation or update that triggered it. The performance of Record-Triggered Flows is almost as fast as Apex Triggers.


Exercise: Create a Record Triggered Flow


Aim

Create a Record-Triggered Flow that will check if a new Contact record has an email address and if not posts a message to Chatter for the record owner.

Method

A Record Triggered Flow can be triggered by any of the following:



For our example flow, you will use those default values.


Select a Record-Triggered Flow:


Use the Auto-Layout:


The flow will be triggered on the creation of new records and will run after they are saved:














 


Platform Event-Triggered Flows


Platform Event-Triggered Flows run when a Platform Event occurs.

Platform events are part of Salesforce’s enterprise messaging platform. The platform provides an event-driven messaging architecture to enable apps to communicate inside and outside of Salesforce. 

You can learn more about Platform Events in this Trailhead module:





Page



No comments: