Tag: Record Changes

  • What is a Flow in Salesforce? | All You Need to Know

    What is a Flow in Salesforce? | All You Need to Know

    A flow is a tool that automates complications of business processes in Salesforce. In a few words, it fetches data and then Proceeds with that data.

    Flow Builder is the declarative interface used to make separate flows. Flow Builder can be used to make logic like coding logic without using a programming language.

    This feature of Salesforce state that hiring a Salesforce admin is a good decision for an organization.

    Categories of Flows

    1. Screen Flows:

    A flow that contains a user interface element that requires users for input is called a screen flow. These types of flows are either embedded as an element on a Lightning page or launched as an action.

    1. Schedule-Triggered Flows:

    These Auto -launched flows run in the background and launch at a designated time and frequency for each record in a batch.

    1. Auto-launched Flows:

    This type of Flows is used to run the automated task. Auto-launched flows can be put forward from other flows (sub-flow), process builders, record changes, from within an Apex class, from a set schedule,  and platform events.

    1. Record-Triggered Flows:

    A Flow that runs in the background either before a record is saved or after the record is saved and when a record is created, updated, or deleted is known as Record-Triggered Flows.

    1. Platform Event-Triggered Flows:

    Whenever a platform event message is received, these auto-launched flows run in the background.

    dont miss out iconDon’t forget to check out: An Introduction to Screen Flow in Salesforce in 2023

    How do You create a flow in Salesforce?

    1. From the Gear icon click on Setup,
    2. In the Quick Find box, Enter Flows and select Flows from the list, and then click the New Flow button. Choose the type of Flow you want to build, then click on Create button.

    The Flows will influence your experience Based on the type of flow you create.  An auto-created global variable called $Record is accessible by record-triggered and scheduled flows. This gives you access to all the fields on the record that triggered the flow (and its parent records!!!). You’ll have to create any required input variables yourself for Auto-launched flows.

    What Is a Screen Flow in Salesforce? 

    Screen flows provide avenues to escort users through a business process; they deliver instructions or call scripts, and prompt users to fill certain fields after that execute actions back of the scenes such as Create or Update Record. Your users will come across a sequence of screens that are created by you– all without having a single line of code.
    The Screen Flows functionality seem very interesting when I first heard about it. This tool boosts the hiring of a salesforce administrator. However, I not at all expected it to be so user-friendly, notably when creating from scratch without being an experienced developer. Salesforce proved me wrong!

    Layout and Features of Screen Flows

    The Chief element that separates this flow from all other types of flow is the Screen Element. This is what we will lay out and what users will see.

    As earlier mentioned, a single Salesforce Screen Flow can have multiple screens. These displayed screens will sit on your Flow canvas with your other elements. You can learn more about each flow element here.

    On the screen flow window, the components panel shown on the left side depicts the items available to be displayed within the screen element itself. This is where you will detect standard components such as picklist and text, as well as custom components that have either been developed internally or come from managed packages.

    Here are a few illustrations of useful components:

    • Email: This component is very user-friendly when an email address is needed from the user running the screen flow.
    • File Upload: As the name says, this will allow users to import files quickly through the screen flow. This is very user-friendly as users won’t have to navigate to other pages to add files.
    • Toggle: This element is fun for the user experience within a screen flow as it can be substituted for a checkbox or a yes/no picklist.

    The Fields section will not be used in this post. However, you should for sure explore this further, as it let us add the fields directly from an object inside the screen flow with some of the attributes already set up. This saves a lot of time, especially if you are adding many fields. In addition, as you will see in the image below, it Prompts you about the required fields that should be completed for the record. You can discover more information about this feature here.

    Where Can a Screen Flow Be Used?

    I’d state everywhere! If the process can be separated into steps that need user input (or acknowledgment) and it should be displayed for users based on record criteria or previous choices of the flow, then a screen flow is suitable.

    A Salesforce Screen Flow can be useful to different types of users and teams. There are enough use cases for screen flows that can be accessed in many ways in Salesforce, including Lightning Record Pages, custom actions, buttons, or even a utility bar.

    One of the most popular illustrations is using a screen flow to collect data to create a record.

    How to Create a Screen Flow?

    Now that we have revealed the basics of a screen flow, it’s time to get hands-on! We’ll go through step-by-step guidance on how to create a screen flow, how to expose it to your users, and of course, how to make sure your flow works as expected.

    Create the Flow

    For this illustration, I have chosen to create a flow that will allow users to create Contact.

    Keep in mind that while I have only used some fields, multiple fields and screens can be added to support your use case. Don’t forget to consider any existing validation rules!

    dont miss out iconCheck out another amazing blog by Salesforce here: Hire Salesforce Developer: In house vs. Outsource?

    Make the Flow Available in the Interface 

    As above mentioned, the flow can be accessed in certain ways – we will explore one of them, but feel free to try any other option that suits your use case well.

    From the Lighting Home Page inside the Sales Lighting App, we will add the Flow we just created. For the sales team, it is essential to make this process as seamless and accessible as possible (with the least number of clicks).

    Test Your Screen Flow

    When the flow is ready, it should be carefully tested before reaching your user base in production. To use flow in the interface in a sandbox and see if it works as expected is the easiest way to test the Screen Flow.

    Taking into consideration the flow complexity, testing in a developer sandbox might be sufficient for simple automation. But if a flow has a broader impact, either on the existing implementation or on the user experience, testing should be completed A-Z including the UAT – as well as any integration testing, if needed.

    You should surely use the Debug button which appears when the flow is opened inside Flow Builder. The screen behavior will be the same as the interface (including the required fields), but it will give accurate information as far as the values for each component are concerned, and any errors if they occurred.

    Note:

    If any errors show while the flow is live in production (and even in the sandbox when used from the interface), you will get the details of troubleshooting through email.

    Remember that Trailhead is also a great resource to learn. This trail not only consists of information about Salesforce Flow but also truly fun hands-on challenges and even a module on testing.

    Note: Testing should be done for any flow, not just for screen flows!

  • All You Need to Know About Platform Event-Triggered Flows

    All You Need to Know About Platform Event-Triggered Flows

    Event-Triggered Flows at Salesforce is a potent tool for streamlining data consistency and automating business operations. Platform Events let you transmit and receive personalized alerts, whereas Flows give you a visual interface for building and running intricate business logic. You can build real-time, event-driven automation that reacts to changes in your Salesforce organization with the aid of the Event-Triggered Flows platform. 

    Now platform occurrences: 

    A custom message that can be shared and subscribed to within Salesforce is referred to as a platform event. They are comparable to common Salesforce events like record changes and deletions, but they are made for specific use cases. Platform events can be used to start automation, transfer data between systems, or give people up-to-the-minute information.

    You must define an Event object that represents the message you want to deliver in order to use Platform Events. This object may have a relationship with other objects in your Salesforce org and may contain custom attributes. Once your Event object has been defined, you can broadcast events using REST API or Apex code. 

    dont miss out iconDon’t forget to check out: What is the Flow Builder In Salesforce in 2023?

    Let’s now discuss Triggered Flows

    Triggered Flows are a particular kind of flow that is intended to be started by a particular trigger event, like the creation or updating of a record. They are comparable to Salesforce Process Builder, but they offer more sophisticated features and a visual user interface that supports more intricate business reasoning. Processes, associated record updates, email sending, and other tasks can all be automated using triggered flows. 

    1. Platform Events and Triggered Flows work together to enable event-driven programming that reacts instantly to changes in your Salesforce org
    2. Create an Event object for your platform that represents the message you want to deliver. This object may have a relationship with other objects in your Salesforce org and may contain custom attributes. 
    3. An event can be published using REST API or Apex code. Your Platform Event-Triggered Flow will begin as a result. 
    4. Create a Triggered Flow that watches for your Platform Event to define your triggered flow. This flow may involve operations like record updates, email transmissions, and Apex code execution. 
    5. Execute your triggered flow: Your triggered flow will be carried out when a platform event is released. After receiving the event message, the flow may carry out any activities specified therein.

    dont miss out iconCheck out another amazing blog by Mayank here: What are Record-triggered Flows in Salesforce? | The Ultimate Guide

    We can develop real-time, event-driven software that reacts to changes in your Salesforce org using Platform Event-Triggered Flows. This can assist you in streamlining data consistency, automating intricate business processes, and giving customers real-time updates. The power of Platform Events and Triggered Flows can be combined to build a Salesforce org that is more organized and effective. 

  • Learn All About Flows in Salesforce and Its Powers

    Learn All About Flows in Salesforce and Its Powers

    What is a Flow in Salesforce? 

    In Salesforce, a flow is an application that computes complex business measures. Basically, it gathers information and afterwards accomplishes something with that information. 

    Flow Builder is the decisive interface used to construct individual Flows. Flow Builder can be utilized to construct code-like rationale without utilizing a programming language

    Flow fall into five classes: 

    1- Screen Flows: 

    These are flows that have a UI component and require input from clients. These sorts of flows are either dispatched as an activity or inserted as a component on a Lightning page

    2- Timetable Triggered Flows: 

    These autolaunched Flows dispatch at a predefined time and recurrence for each record in a bunch, and they run behind the scenes. 

    3- Autolaunched Flows: 

    Run mechanized errands with this Flows type. Autolaunched Flows can be conjured from measure manufacturer, from inside an Apex class, from a set timetable, from record changes, or from stage occasions. 

    dont miss out iconDon’t forget to check out: Common Salesforce Flow Errors and How to Solve Them

    4- Record-Triggered Flows: 

    These autolaunched Flows run behind the scenes when a record is made, refreshed, or erased. 

    5- Stage Event-Triggered Flows: 

    At the point when a stage occasion message is gotten, these autolaunched Flows run behind the scenes.

    When/for What Reason Would it be Advisable for Me to Utilize Flows? 

    To respond to this inquiry, we truly need to investigate what robotization is required. As a rule, the sort of mechanization to use for a particular cycle is controlled by assessing where the information for the cycles starts from and where it needs to go. Consider whether what you need to achieve is best-taken care of by a Flows, work process field update, or an interaction. 

    Flows can make, alter, and erase any record passed into the Flows. Records don’t need to be connected to pass information in a Flow. Flows can likewise be planned to run on a set stretch with an assortment of records. 

    The work process field update can set up information to the very account that summoned the work process rule, or to the expert record of an expert detail relationship on the record that conjured the standard. Work process rules can’t make, alter, or erase records. 

    Cycles, made in the Process Builder, can set up information to the very account that conjured the interaction, or to records related by one or the other query or expert detail connections. Cycles can likewise make records, however, they can’t erase them. 

    dont miss out iconCheck out another amazing blog by Rajesh here: Auditing Salesforce Org – Salesforce Security Guide

    When Would it be Advisable for Me to Not Utilize Flows? 

    By and large, you ought not to utilize a Flows in the accompanying circumstances: 

    You’re managing basic fields, email cautions, or record refreshes that can be better dealt with utilizing an interaction or a work process rule. By and large, Flows are utilized for more convoluted rationale, like what you may discover in Apex code, that can be refined in a definitive way. For instance, assuming you need a chance stage to be set to New whenever the chance is made, and you likewise need an email alarm to be shipped off to a project supervisor, you should utilize a work process rule or a cycle. 

    There is a convoluted rationale included that is better made do with Apex code. An illustration of this is the Flows displayed in the Overview area. The rationale in this Flows is convoluted to the point that it makes investigating an aggravation, in addition to it makes archiving and dealing with the Flows troublesome. 

    You need basic record creation. For instance, on the off chance that you might want to make a request whenever a chance is moved to Closed Won, it is smarter to utilize the Process Builder to finish this activity, as cycles are simpler to set up and oversee. 

    Your Salesforce release restricts the number of Flows you can make. Basics and Professional versions have a constraint of five cycles (per measure type) and Flows (per Flows type) in every association. For most rationale in these releases, it is simpler to utilize a cycle.

  • Schedule Your Path in Salesforce Flow | Developer Guide

    Schedule Your Path in Salesforce Flow | Developer Guide

    Advantages of Flow Builder over Process Builder

    • Process builder does work on delete the records
    • Flow work on a different object while Process Builder only work on related Object
    • Flows allow you to add screens where users can enter data
    • Process Builders do not have this capability.

    Types of Flow

    Types of Flow

    • Auto launched Flows

    These flows are used to run automated tasks. Auto launched Flows can be invoked from process builder, from within an apex class, from a set schedule, from record changes, or from platform events.

    • Record-Triggered Flow

    Launches when a record is created, updated or deleted. This auto launched flow runs in the background.

    • Platform Event-Triggered Flow

    Launches when a platform event message is received. This auto launched flow runs in the background.

    Logics in Flow

    • Assignment
    • Decisions
    • Loops

    Data in Flow

    • Create Records
    • Update Records
    • Get Records
    • Delete Records

    FSA 962 Salesforce Flow POC

    Objective:  Is it possible to use flow in such a way where an Opportunity team member is an auto removed from the Opp Team after 2 hours.

    To execute this function, we have to create a Record-Triggered Flow where the trigger event is when the record is created. There is a Flow: FSA 962 Remove Verifier From OTM which fulfill our requirement to remove Verifier from Opportunity Team that given below:

    Salesforce Flow

    STEP 1 – Salesforce Flow – Define Flow Properties

    1. Click Setup.
    2. In the Quick Find box, type Flows.
    3. Select Flows then click on the New Flow.
    4. Select the Record-Triggered Flow option and click on Next and configure the flow as follows: 
      • How do you want to start building: Freeform
      • Trigger the Flow When: A record is created
      • Run Flow: After the record is saved
      • Object: Opportunity Team Member
    5. Select All Conditions Are Met (AND)
      • Field: Opportunity Team Member | Provided_Temporary_Access__c
      • Operator: Equals
      • Value: {!$GlobalConstant.True}

    Opportunity Team Member

    dont miss out iconDon’t forget to check out: Salesforce Flows | How to Loop on Multi Select Picklist Values in a Flow?

    STEP 2 – Schedule time to Delete the Opportunity Team Member

    In this STEP, we will set a time to remove Verifier from the Opportunity Team after 2 hours of creating records

    1. Under Start, select Add Scheduled Paths (Optional)
    2. Under SCHEDULED PATHS, click on the New Scheduled Path.
    3. Under Scheduled Path Details, enter the Label the API Name will auto-populate.
    4. Time Source: Opportunity Team Member: Created Date
    5. Offset Number: 2
    6. Offset Options: Hours After
    7. Click Done.

    Records to Delete

    STEP 3 – Get the Records to Delete from opportunity Team Member

    1. Under Toolbox, select Element
    2. Drag-and-drop Get Records element onto the Flow designer
    3. Enter a name in the Label field; the API Name will auto-populate.
    4. Select the Opportunity Team Member object from the dropdown list.
    5. Select All Conditions Are Met (AND)
      • Field: Id
      • Operator: Equals
      • Value: {!$Record.Opportunity Team Member Id}
    6. How Many Records to Store:
      • Select All records
    7. How to Store Record Data:
      • Choose the option to Automatically store all fields
    8. Click Done.

    Record Collection

    STEP 4 – Decision to check collection Record Collection variable

    In this step, we will check the Record Variable from STEP 2 to find if it returns the Opportunity Team Member Id or not.  

    1. Under Toolbox, select Element
    2. Drag-and-drop Decision element onto the Flow designer. 
    3. Enter a name in the Label field; the API Name will auto-populate.
    4. Under Outcome Details, enter the Label the API Name will auto-populate.
    5. Condition Requirements to Execute Outcome: All Conditions Are Met (AND)
      • Resource: {!Get_OTM_with_CheckBox}
      • Operator: Is Null
      • Value: {!$GlobalConstant.False}
    6. Click Done.

    Delete Records

    dont miss out iconCheck out another amazing blog by Aditya here: How To Resolve When Salesforce Error Apex Heap Size Too Large

    STEP 5 – Delete/Remove Verifier from Opportunity Team Member

    1. Drag-and-drop Delete Records element onto the Flow designer
    2. Enter a name in the Label field; the API Name will auto-populate.
    3. For How to Find Records to Delete select Use the IDs stored in a record variable or record collection variable.
    4. Set Record(s) to Delete
      • Record or Record Collection: {!Get_OTM_with_CheckBox}
    5. Click Done.

    edit delete records