salesforce tutorials 5
salesforce tutorials 5
Uses
1. Streamlines workflows and saves Time: Salesforce Flow automates repetitive tasks and
business processes, freeing up employees to focus on more critical and strategic work.
This business automation can significantly reduce the time spent on manual tasks, such as
and data management, Salesforce Flow helps ensure consistent and timely interactions with
customers. This leads to improved customer satisfaction as their needs are addressed more
accessible for users without coding skills. Admins and business users can create and
manage flows easily, reducing the dependency on technical staff and lowering the barrier
requires specialized skills and more resources, making it more costly. Salesforce Flow
offers a more economical alternative by enabling powerful automation without the need for
extensive programming.
5. Flexible and scalable: Salesforce Flow is versatile and can be adapted to a wide range of
business needs, from simple tasks to complex workflows. It’s also scalable, meaning it can
grow and evolve with the business, accommodating changing requirements and increasing
volumes of work.
___________________________________________________________________________
___________________________________________________________________________
Queries your Salesforce org for a record that matches what the user enters.
1. From Setup, enter Flows in the Quick Find box, then select Flows.
Because you plan to capture contact information from the user, let’s create a record variable to store
that contact record data in the flow.
7. Click Done. In the toolbox, the Manager tab now contains a contact record variable resource.
8. Click Save.
You need to create form fields for the user to enter contact information on the screen. Let’s start with an
input component that collects the contact’s name.
1. On the canvas, double-click the Contact Info screen. The Edit Screen window opens.
5. Scroll down and click Advanced. Make sure Manually assign variables is selected.
6. Complete these steps to take what the user enters in the First Name and Last Name fields and
store those values in the contact record variable.
7. Click Done.
8. Click Save.
Add a Picklist Input Component to the Screen
Now let’s add the picklist for the user to select the contact’s parent account.
3. Drag Picklist onto the screen canvas just below the Name component.
Label: Account
5. In the Configure Choices section, for Choice, select New Choice Resource. Enter these values.
Object: Account
Choice Value: Id
In the Store More Account Field Values section, enter these values to store the ID of the
user-selected account in the contact record variable.
7. Click Save.
Now let’s add the toggle for the user to specify whether (or not) to update an existing contact if one is
found.
4. Click Done.
5. Click Save.
2. To reopen the flow in Flow Builder, find New Contact on the All Flows list, and click it.
Run the Flow to View the Screen
At this point, your flow can collect contact information from the user and store that information in flow
variables. Let’s see what the screen looks like to users who run the flow.
2. Enter any values, select any account from the list, and click Finish.
Add a Get Records element to your flow to query your org for any existing contact whose name matches
what the flow user enters.
Object: Contact
4. In the Filter Contact Records section, for Condition Requirements, select All Conditions Are Met
(AND).
Field: FirstName
Operator: Equals
Field: LastName
Operator: Equals
Now that your flow checks for a matching contact record in your org, let’s branch the flow. The path the
flow takes depends on whether a matching contact is found, and whether the user chooses to update
the matching contact or create a new contact.
Add a Decision element to create two branches in the flow: one that creates a contact record, and one
that updates any existing record that’s found.
2. Click Decision.
4. In the Outcomes section, notice the two listed outcomes: New Outcome and Default Outcome.
5. Make sure that New Outcome is selected, and enter these values into the Outcome Details
section.
6. For Condition Requirements to Execute Outcome, select All Conditions Are Met (AND).
First condition:
Resource: select the Contact Info screen, then select the If this contact already
exists, update the existing record component, then select Value
Operator: Equals
Second condition:
Resource: select Contact from Find a Match, then click in the blank space below
Operator: Is Null
9. In the Outcome Details section, for Label, enter Create New, then click in the blank space below.
Notice that the list of outcomes now displays the outcome labels that you entered.
10. Click Save.
STEP 4: Create or Update a Contact
Use a Create Records Element to Create a New Contact
Now that your flow has the logic to decide between two paths, let’s build those two paths. First, build
the path for the default Create New outcome, which contains only one element.
4. Click Save.
Now the flow can create a contact record when the Decision element executes and takes the Create New
outcome’s path.
Let’s build the path for the Update Existing outcome. First, you need to get the record ID of the existing
contact into the contact record variable.
2. Click Assignment.
Operator: Equals
Value: Contact from Find a Match > Contact ID
4. Click Save.
Now that the contact record variable contains the record ID of the matching contact, you can reference
that contact record variable in an Update Records element.
How to Find Records to Update and Set Their Values: Use the IDs and all field values
from a record or record collection
Record or Record Collection: select the contact record variable
4. Click Save.