In Salesforce Flow approval processes, use a background step and an autolaunched flow to dynamically get an approver's username. Note: Support cannot assist with custom steps.
Use the Get Records element to retrieve the desired approver's username. This example retrieves the submitter's manager.
From Setup, enter "Flows" in the Quick Find box, and select Flows.
Click New Flow.
Select Autolaunched Automations and click Autolaunched Flow (No Trigger).
Click + under the Start element, select Get Records, and configure the following:
Label: Get Username
API Name: Get_Username
Object: User
Filter User Records:
Field: Id
Operator: Equals
Click the Value field, select + New Resource, configure the following, and click Done:
Resource Type: Variable
API Name: submitter
Data Type: Text
Available for input: Check the box
In the same Get Records element, configure the following:
How Many Records to Store: Only the first record
How to Store Record Data: Choose fields and assign variables (advanced)
Where to Store Field Values: In separate variables
Field: Username
Click the Variable field, select + New Resource, configure the following, and click Done:
Resource Type: Variable
API Name: Manager_Username
Data Type: Text
Available for output: Check the box
Click Save, enter the following, and click Save:
Flow Label: Get Username
Flow API Name: Get_Username
Click Activate.
From Setup, enter "Flows" in the Quick Find box, and select Flows.
Click New Flow.
Select Autolaunched Automation and click Autolaunched Flow Approval Process (No Trigger).
Click + and select Stage.
Configure the following values:
Label: Stage 1
API Name: Stage1
Condition: When all steps are marked as completed, the stage is marked as completed.
Click + Add Step.
Select Background Step and configure the following:
Label: Get Submitter Manager Username
API Name: Get_Submitter_Manager_Username
When to Start Step: When the stage starts, the step starts.
Action: Select the flow created earlier (Get Username).
Set Input Values: submitter: {!submitter}
User Type: Automated Process User
Click + Add Step.
Select Approval Step and configure the following:
Label: (Any value)
API Name: (Any value)
When to Start Step: When another step is marked as completed, the step starts.
Step Name: Select the background step (Get Submitter Manager Username).
Action: Select the approval process action.
Approver Type: Resource
Resource: Click Stage > Background Step > Output > Manager_Username.
Record to Approve: {!recordId}
When to Complete Step: When the assigned user completes the action, the step is marked as completed.
Click Save, enter a Flow Label and Flow API Name, then click Save.
Click Activate.
Step Flow Approval Processes Resource
005227582

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.