9-Process Automation - Modified
9-Process Automation - Modified
In Salesforce, there are several tools which automate the org’s business processes.
Automating the business process is crucial so as identifying the tool from which it should be
implemented.
There are several tools for automating the processes in Salesforce:
Approval Process
Approval Process is an automated process that an org uses to approve records in Salesforce.
Records submitted for approval are approved by the users in the organization. These users are
called Approvers.
Approval processes are bound to a single object because when a rule is defined this object
influences the fields that will be available to set the criteria.
There are 2 options to set the criteria:
● As a condition (Criteria are met).
● As a formula which evaluates to true.
They can be left blank if all the records that are submitted for approval should enter the
approval process.
Automated Approval routing routes the approval request automatically to the user specified in
Manager Field or any hierarchical relationship field in the submitter's user record.
Note: If we do not select Manager Field or any hierarchical field of user record at the time of
approval process definition then the automated approval routing for any approval step in this
process will not be enabled.
If the “Use Approver field of [Object] owner” is checked then in Approval steps the Manager
Field or any hierarchical field whichever may be selected will be of record owner instead of the
submitter.
Records when submitted for approval automatically get locked which means they cannot be
edited. However administrators can edit the records during an approval process and also when
defining the approval process administrators can select whether the approver is allowed to edit
the record or not.
We can also assign a notification email template which will send an email notification to
approvers whenever a record is submitted for approval.
Similar to Action Layouts in Actions, approval processes also have Approval Page Layouts in
which fields which will be visible to approver are specified.
Note: Standard Name field and Owner field cannot be removed from Approval Page layouts.
Approval History information can be displayed as a related list on a record.
Users who can submit the records for approvals are called as submitters.
We can specify the submitters in the approval process definition.
Also there is an option which gives additional functionality using which the submitters can
recall the approval requests.
Actions in Approval Processes:
There are basically 4 actions present except the approval steps which completes an approval
process, following are:
1. Initial Submission Actions:
Initial submission actions are the actions that occur when a user first submits a record for
approval. By default, an action to lock the record runs automatically on initial
submission. Initial submission actions can include any approval actions such as email
alerts, field updates, tasks, or outbound messages.
2. Final Approval Actions:
Final Approval actions are the actions that occur when a record is approved from all the
approval steps. It also locks or unlocks the record, as specified. It can include any
approval actions such as email alerts, field updates, tasks, or outbound messages.
3. Final Rejection Actions:
Final Rejection actions are the actions that occur when a record is rejected from any of
the approval steps. It also locks or unlocks the record, as specified. It can include any
approval actions such as email alerts, field updates, tasks, or outbound messages.
4. Recall Actions:
Recall actions are the actions which occur when a record is recalled after submission for
an approval. It can include any approval actions such as email alerts, field updates, tasks,
or outbound messages.
Note: Initial submission default actions cannot be edited but final approval & rejection
default actions can be edited.
Approval Steps:
Approval process consists of one or more than one approval step.
Every approval step contains its own criteria and Approvers.
Approval Steps are given step numbers to identify the hierarchy in which the approval steps
should execute.
Every step consists of a criteria which qualifies that the record needs to get into this step for
approval or not.
If the record does not fulfills the criteria for any step except the first step then the record gets
approved and executes Final Approval actions after it.
In approval steps, we can choose whether the record should get approved or rejected if it does
not fulfills the criteria.
Approvers of approval step can be:
● Manager Field of user record or any other hierarchical field.
● Submitters can also choose manually the approver of that step.
● Records can automatically be assigned to a queue for approval.
● Or we can set a particular user or a queue for a particular approval step.
o In this option, there are 2 options that decide how the approver(s) will decide
whether the record is approved or not.
1. Approve or reject based on the FIRST response.
Any of the approvers if approves the record it is considered to be approved.
2. Require UNANIMOUS approval from all selected approvers.
If any of the approver rejects the record it is considered to be rejected.
Delegated approvers can also approve the record if they are allowed to approve explicitly in
approval step definition.
Approvers can also reassign the approval request to another user.
Every approval step contains its own approval and rejection actions. These actions can be any
amongst Email Alert, Task, Field Update and outbound message.
In order to activate an approval process, there should be at least one approval step.
Note: Once an approval process is activated, no more steps can be added into it.
Salesforce Flow
What is Salesforce Flow?
Salesforce flow is a declarative automation tool which allows you to build complex business
automation using point & click.
Through flow we can create, update and delete records for multiple objects.
❖ Screen Flows: Screen flows are the flows where we have the user interaction like a user
can enter values using components such as text, picklist, or display values using
components such as display text.
➢ Screen flow can include one or more screens.
➢ Each screen is made up of one or more screen components. A screen component
is a configurable, reusable element added to a screen.
➢ Screen components are available in three categories.
■ Input includes standard components that request information from the
user.
■ Display includes standard components that display information to the user.
■ Custom includes components that you or someone else have created.
Install them from AppExchange or a third-party library, or work with a
developer to build your own.
❖ Autolaunched Flow: Autolaunched flows are the flows which don't require user
interaction and run in the background.
Autolaunched Flows are distributed into Four sub flow based on how they trigger:
➢ Record Triggered Flow : A record triggered flow will be invoked whenever we create,
update or delete a record of a particular object. Flow can be triggered when:
■ A record is created
■ A record is updated
● Fast Field Updates (Before Save): Update fields on the record that triggers the
flow to run. This high-performance flow runs before the record is saved to the
database.
● Actions and Related Records (After Save): Update any record and perform
actions, like send an email. This more flexible flow runs after the record is saved
to the database.
➢ Schedule Triggered Flow: A schedule-triggered flow starts at the specified time and frequency
for a batch of records. We will not be able to launch a schedule-triggered flow by any other
means.
We will be able to schedule flow from Start Date and Time for following frequencies:
■ Once
■ Daily
■ Weekly
➢ Autolaunched Flow (Invokable Flow): Autolaunched flow does not require any user
interaction and it can be automatically launched through apex, process builder, APIs and any
other flow.
➢ Platform Event Triggered Flow: A platform event triggered flow will be executed
whenever there will be an event occurring in Salesforce. This flow runs in the
background without any interaction with the user.
● Select Elements: After clicking ‘Select Elements’ button, click on each element that you want to
select.
● Copy Elements: Clicking the ‘Copy Element’ button, to copy a selected element. Also, click to
copy multiple selected elements to the clipboard.
● Paste Elements: Clicking the ‘Paste Element’ button, to paste a selected element. Also, click to
paste multiple selected elements to the canvas.
● Undo / Redo Element: To undo a change to your flow, click . To redo a change, click .
● View Properties : To access the flow version’s properties, such as context and API version.
● Layout: Choose between Auto-Layout or Free-Form. Auto-Layout is the default for all new flows.
● Warning /Error : These icons are displayed, if the flow has warnings or errors.
● Run Button: To run the most recent save of the flow version that’s open.
Note: If the flow version contains Subflow elements, the active version of its referenced flow is
executed. If the referenced flow has no active version, then the Subflow element runs the latest
version of its referenced flow.
● Next to the Run button, you can see the version’s active or inactive status and when it was last saved.
● Debug button: To debug the most recent save of the flow version that’s open. Define values for input
variables, roll back changes so debugging doesn’t impact data, view debug details about how the flow
runs, and use those details to troubleshoot errors.
● Activate Button: To make the current flow version available to your users.
Note: Only one version of each flow can be active at a time.
● Save button: To save your flow
● Save As button: To save it as a new version or a new flow.
(2) Toolbox
● Manager tab: To create resources, or to view a list of all elements and resources and their
details.
● View resource and element details : To view resource and element details such as type,
outputs, usage, and incoming go to connections.
● Elements tab: To add elements in free-form.
(3) Canvas
Build a flow on the canvas. As you add elements to the canvas, you can see a diagram of your flow.
(5) Elements
● Connector : Click on it, to add elements in auto-layout, and then we can select an element,
such as Create Records and Update Records.
● To add elements in free-form, in the Elements tab in the Toolbox, click and drag an element
onto the canvas and connect it to the rest of the flow.
● Element: Click on the Element, To edit or see options for it.
(6) Zoom Button Bar
Use this button bar to zoom in and out of the flow.
❖ Elements: They are the individual building blocks of the Flow. These perform logical
actions such as assignments, decisions, or loops. There are also data elements that will
query the database or commit record changes. Some commonly used elements are:
➢ Interaction:
■ Screen Element: This element is only available in a screen flow and it allows you to
show any kind of information to the user or if you want to collect any information from
the user.
■ Action Element: This element is used to perform any action in the flow which can be
either Standard Actions (i.e Email Alerts, Approval) or Custom Actions (i.e Apex Action).
■ Subflow: This element allows us to call another flow from the current flow. It helps in
creating the same flow again and again.
➢ Logic Elements
■ Decisions: It allows you to put conditions in the flow through which you can perform
different actions on the basis of its outcome.
■ Assignments: It is used to assign value to a variable.
■ Loops: It is used to iterate collections of values in the flow.
➢ Data Elements
■ Create Records: It is an element that is used to create records from the flow. Through
this element we can create one or multiple records.
■ Update Records: By using IDs and field value we can update the records through flow.
■ Get Records: It is an element that is used to fetch records in the flow from the
database.
■ Delete Records: It is an element that is used to delete records in the flow from the
database.
❖ Connectors: They determine which element leads to which.
❖ Resources: Each resource represents a value that you can reference throughout the
flow.
Workflows
Workflow is a Salesforce platform business logic engine that allows to define rules to automate
certain actions when a particular criteria is met.
Note: Starting in Winter ’23, Salesforce is blocking the creation of workflow rules. You can
still activate, deactivate, and edit any existing workflow rules. To test and create workflow rules
for use in managed packages, developer orgs still allow you to create workflow rules. For new
automations, use flows.
Workflow rules are considered as a container that consists of two components:
a. Criteria:
It consists of the condition which if found true then the actions should take place.
b. Actions:
It consists of the actions that should be performed when the criteria for workflow rule
is met.
Every Workflow rule must be based on a single object because when a rule is defined this
object influences the fields that will be available to set the criteria.
There are 3 types of evaluation criteria for workflows:
3. Created and Every time it's edited to Runs the rule if the criteria is met:
subsequently meet the criteria ● Always when a record is created and
meets the criteria.
● Only when a record not meeting the
criteria is updated and now it meets the
criteria.
By default, this criteria is selected.
c. Custom HTML: Administrators and users with “Edit HTML Templates” permission
can create HTML email templates without using a letterhead.
d. Visualforce: Administrators & Developers can create templates using Visualforce.
Visualforce email templates allow for advanced merging with a recipient's data where
the content of a template can contain information from multiple records.
Email templates are stored in folders. There are 2 folders already present in every
Salesforce org:
● Unified public Email Templates- Email Templates in this folder are available to
every user in the organization.
● My Personal Email Templates- This folder stores the email templates which are
used personally by a particular user.
Note: If another object’s field is added in an email template then it will be left blank as
workflow only has access to the object for which it is applied.
2. Field Update:
Field updates allow the user to automatically change a field value on the record that
initially triggered the workflow rule.
If “Re-evaluate Workflow Rules after Field Change” is enabled for a field update action
then Salesforce re-evaluates all workflow rules on the object if the field update results in
a change to the value of the field.
Only workflow rules that didn’t fire before will be retriggered.
Cross Object field updates are also available for changing the values of fields on a related
master record. But it is not available when re-evaluation is checked.
3. Tasks:
It simply assigns a task to a single user, owner or a role.
We can also make sure that a notification email is sent to the assignee when a task is
automatically assigned.
Tasks should be assigned to roles if they have only one user assigned to that role. If there
are more than one users assigned to that role then the task automatically gets assigned to
the owner of the workflow rule. (Users who triggered the workflow rule)
4. Outbound Message:
Process Builder
What is a Process Builder?
Process Builder can help you automate your business processes and give you a graphical
representation as you build it.
Process Builder supports three types of processes for your automation needs. The type
determines what triggers the process.
● A record change process starts when a record is created or updated.
● An event process starts when a platform event message is received.
● An invocable process starts when something else, like another process, invokes it.
Each process consists of:
● Criteria that determine when to execute an action group.
● Action groups, which consist of immediate or scheduled actions. Only record change
processes support scheduled actions.
Process Criteria
the criteria that must be true before the process can execute the associated actions.
Actions in a Process
An action group can consist of a combination of immediate and scheduled actions. Immediate
actions are executed when evaluation criteria are met. Scheduled actions are executed at a
specified time. For example, Salesforce can automatically send an email reminder to the
account team if a high-value opportunity is still open 10 days before the specified close date.
● Create a Record from a Process: Create a record by manually entering values or by using the
values of related records.
● Invoke a Process from Another Process: Invoke a process from another process. With invocable
processes, you have the option of reuse so that you don’t spend your time on repetitive work.
● Create a Chatter Post from a Process: Post to the feed of a user, a Chatter group, or the record
that started the process.
● Use a Quick Action from a Process: Create a record, update a record, or log a call by using a
quick action that you or another admin created for your organization.
● Work with Quip from a Process: Create documents, chat rooms, and folders when important
events occur. Attach a document to a record so your users have information in context. Update
your spreadsheets with the latest Salesforce data. Send a message to a chat room or document.
Add new slides to a deck, copy documents, add members to a document or chat, and more.
● Launch a Flow from a Process: Start an autolaunched flow from your process to automate
complex business processes. Create flows to perform logic and have events trigger the flows via
processes without writing code.
● Send an Email from a Process: Easily send an email from a process by using an email alert.
Email alerts are configured outside of the Process Builder and contain the standard text, list of
recipients, and template for an email.
● Send a Custom Notification from a Process: Send customized notifications when important
events occur. Alert an account owner if a new support case is logged while trying to close a
deal, or send a notification for a workflow built entirely with custom objects. Add recipients and
content to your custom notification, then add it to your process.
● Send a Survey Invitation from a Process: Send an email invitation containing the link to a
particular survey question or to launch a survey.
● Submit a Record for Approval from a Process: Submit the record that started the process for
approval.
● Update Records from a Process: Update one or more records that are related to the record
that started the process by manually entering values or by using the values from related
records.
● Call Apex Code from a Process: Add customized functionality to your process by calling Apex
from the process.