Call Approval Process From Salesforce Flow

When we create the approval process on the Salesforce object to send the record for approval, we need to submit it manually by clicking the Submit for Approval button.

I need to automate the process of sending a record for approval automatically, without requiring manual action. For that, I have an Approval process for reimbursement, and I will create a flow to automate the approval submission.

In this tutorial, we will learn how to call approval process from Salesforce Flow with real-time scenarios and explanations.

What is the Approval Process in Salesforce?

In Salesforce, the Approval Process is an automated workflow that allows organizations to approve or reject records within Salesforce.

We can add an action when the approver accepts or rejects the approval. It helps streamline the decision-making for tasks that require approval, such as discounts, expenditures, or contract terms.

First, I will briefly explain the reimbursement approval process so that you understand its purpose.

Then I will explain why we need to automate the approval submission using Salesforce Flow. After creating the approval process, whenever we want to send a record for approval, we must manually click the Submit for Approval button.

For that, we will create a Salesforce flow in the next step to call the approval process that we will create.

Create a Reimbursement Approval Process in Salesforce

In the following steps, I will use the above scenario to illustrate how to create an approval process in Salesforce and then demonstrate how the approval process works.

Navigate to the Approval Process from Setup and select the Object. After that, click “Create New Approval Process” and provide the Process Name; the Unique Name will automatically populate.

How to Create an Approval Process in Salesforce

Then, we need to specify when the approval process will start to execute. Add the Entry Criteria as per your requirements and click the Next button to proceed.

Create Approval Process in Salesforce

Here, we need to select who will be the approver or whom we want to assign this approval request. This option can be changed when we add the approval steps.

Then, select who can edit the record. After sending the record to the approval process, we have two options: either the Administrator or the Approver and Admin.

Salesforce Create an Approval Process

Now select the standard or custom email template, which will notify the approvers that the approval request has been assigned to them.

Create an Approval Process in Salesforce

Here, we need to add fields to the page layout that we want to display on the approval form so that the approver can see those fields.

If we check the ‘Approval History Information’ checkbox, we can view the approval logs, whether they were approved or rejected.

After that, in the Security Settings, we can select the setting for approvers, specifying whether they can approve or reject approvals by logging in to the Salesforce org or using an external mobile device.

How to Create an Approval Process in Salesforce

Here, we need to select the Initial Submitters. In the Submitter type, we can choose record creatorrecord ownerpublic groupsroles, and subordinates.

Then, in the Submission Setting, if we check ‘Allow submitters to recall approval requests,’ then they can cancel the approval request. After that, click the Save button.

Salesforce Create Approval Process

In this way, we can create an approval process in Salesforce. However, the process is currently not activated.

what is approval process in salesforce

Before activating the process, we need to add other actions such as initial submission, approval, rejection, and recall.

Essentially, by utilizing these actions, we can set the alert, field update, and email action to notify users about the status of their approval request.

what is approval process in salesforce

Call Approval Process From Salesforce Flow

Above, we have established a reimbursement approval process to streamline the reimbursement approval process. However, when we apply for reimbursement, we must manually submit a record for approval.

We need to automate the process of sending a record for approval automatically, without requiring manual action.

For that, I will create a flow to automate the approval submission. The Flow should:

  • Automatically trigger an approval process (sending to the reporting manager for approval).
  • If approved, update the Reimbursement Status to ”Approved.’
  • If rejected, update it to ‘Rejected.’

According to our scenario, when we create a record for reimbursement based on specific criteria, the record should be automatically submitted for approval.

For this, we need to create a Record Trigger Flow that executes when a record is created or updated.

Click on the Setup -> Home Tab -> In Quick Find Box, Search for Flows. You will see an option under Process Automation -> Click on Flows.

  • Then, click on the New Flow button to create a new flow and select the Record-Trigger flow. Then, click on the Create button.

When the Employee record is created or updated, the reimbursement field value is selected; therefore, I have selected the Employee in the Object field.

In Configure Trigger, I have selected ‘A Record is Created or Updated‘ because when we update the record, the flow should trigger under a specific condition.

Then, we have to Set Entry Conditions. Based on these conditions, the flow will trigger, and we want to call the approval process when the employee submits the record for approval.

I have provided the condition below so that if it matches, the flow will trigger and call the approval process to execute.

  • Reimbursement Expenses should not be Null.
  • Submit For Approval (checkbox) should be checked.

Here, we are going to trigger the Approval Process, which is the kind of action we have to select, Optimize the Flow for Action, and Related Records.

Trigger approval process using Salesforce Flow

Now, we are creating the action using the Action Element. In Search Actions, we need to search for ‘Submit for Approval‘.

Salesforce Flow calling approval process for automation

We have to Set Field Values for the Selected Action. To make it automatic, the following input values are assigned to Submit to Approval.

ActionValues
Record ID$Record>Employees>ID
Approval Process Name or IDApproval Process Unique Name.
Skip Entry CriteriaGlobal Constant > True
Submission CommentsIt will be displayed on the Approval History.
Submitter ID$Record>Employees>OwnerID.
Submit For Approval Action in Salesforce Flow

After that, we need to add the Update Record element to set the field values. Additionally, after submitting the approval, we need to uncheck the Submit for Approval checkbox.

Flow submits record to approval process in Salesforce

Now we are ready to save the flow. For that, click the Save button, provide the flow Label, and the API Name will be automatically populated.

After that, always debug the flow before activating it to ensure that the working flow is correct and that there are no runtime errors. Then activate the flow.

Call approval process from Salesforce Flow

Proof of Concept:

After activating the flow, navigate to the Employee object and open any record.

Here, I have updated the employee record with reimbursement expenses and checked the submit for approval checkbox, which are the triggering conditions of the Approval Process and Flow.

After the record is saved, the Approval Status field automatically updates to In Progress according to the approval process.

This time, we don’t need to click on the Submit For Approval button; the flow will automatically submit the record for approval.

Using Flow to start approval process in Salesforce

As we save the record, you can see that ‘Submit for Approval’ is automatically unchecked, and the Approval status has been changed to ‘In Progress‘.

Automate approvals by calling approval process via Flow

Now, in the approval process, whoever we selected as the approver, we need to log in with that user to approve or reject the approval request.

Here I have logged in with Jimmi Anderson, and he got the approval request. Also, you can see the Submitter Comments that we provided in the flow.

Here, I will approve this request, and let’s see the changes in the employee record details after I approve it.

Submit records for approval using Salesforce Flow

As I approved the approval and navigated to the employee record page, you can see that the Approval Status has automatically been changed to ‘Approved‘.

Approval process triggered by Flow in Salesforce

Additionally, when you navigate to the Employee-related tab, you can view the Approval history for all statuses and other details.

Salesforce Flow Call Approval Process

In this way, we can automate the approval process by clicking the ‘Submit for Approval’ button manually and calling the approval process from the flow in Salesforce.

Conclusion

I hope you have got an idea about how to call the approval process from Salesforce Flow with real-time scenarios and explanations.

In this, I have explained how to create an approval process and, instead of manually clicking ‘Submit for Approval,’ how we can automate this process using Salesforce Flow, with a real-time example and step-by-step explanation.

You may like to read:

Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.