In Salesforce, Records are used to distribute and assign records used by teams that share workloads. Queues in Salesforce are used for managing cases, leads, tasks, contact requests, orders, service contracts, knowledge articles, and custom objects.
Salesforce flows help automate the process of assigning records to queues. In this Salesforce tutorial, we will learn to Assign Records to Queue Using Salesforce flow.
In this example, we will assign the lead record to a Queue according to the trigger condition where, if the Rating of the lead is Cold, then the lead will be assigned to the selected queue.
To assign records to a queue, you must have an existing queue to which you will assign records.
Assign Records to Queue Using Salesforce Flow
For Assigning Records to Queue Using Salesforce Flow, we will create a Record Trigger flow in the below steps.
1. Create a Record-triggered flow
- Navigate to the Setup page. In the Quick Find box, search and select Flows under Process Automation.
- In the flows setup window, click on New Flow.
- Select the option Record Triggered Flow and click the Create button.

2. Configure the Trigger
- In trigger conditions, select the Object as Lead, and in the section Configure trigger, select the option ‘a record is created.’

- In the Condition Requirements, I have selected the Field as Rating, Operator as Equals, and Value as Cold. It will filter the new leads created with cold ratings.
- In the section, Optimize the flow, select the option Fast Field Updates.

3. Add a Get record element
Enter the Label and the API Name fo the get record element. Then, in the Object field, select Group because the queue is a group.
In the Condition Requirements, select the Field as DeveloperName, and in Value enter the API Name of Queue to which you want to assign records when trigger conditions are true.
In this case, the queue API Name is Cold_leads.

4. Add an Assignment element
Add an Assignment element that will assign the fetched leads from the get record element to the queue.
Enter the Label and API Name for the Assignment element.
In the section, Set Variable Values, select the Variable as Record > Owner ID and Value as Group from Get records > Id.

5. Save and Activate the Flow
- Now that the flow is completed save it with the relevant Flow Label. The flow API Name will be auto-filled; after this, click the Save button.
- Click on the Activate button to activate the record-triggered flow.
Test and debug the flow
Now the flow is activated, and in the further steps we will test the created trigger flow.
1. Navigate to the Leads tab, and there create a new Lead record.

2. After entering the required fields, I will set the Rating as Cold according to the trigger condition and then click on Save.

3. Now, in the Details section of the Leads accounts, we can see that Ownership of the lead record is assigned to the queue Cold Leads.

As we can see we have successfully assigned the Leads to the queue using the Saleaforce flow.
In this way, by following the above steps, we can assign Records to Queue Using Salesforce flow.
Conclusion
In Salesforce, by automating the process of assigning records to queues using Salesforce Flow improves workflow management within the organization.
By following the above steps, you might have understood the process of assigning records to the queue using flow, where we created the record trigger flow to assign leads records to the queue, and later, we also tested the flow in the Salesforce developer console.
You may like to read:
- Assign Tasks in Salesforce Using Apex
- Salesforce Queues
- How to Filter Records Owned by Queue in Salesforce Report
- Create Record Triggered Orchestration Flow in Salesforce
- How to Call Approval Process From Flow in Salesforce
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.