How to Assign Records to Queue Using Salesforce Flow

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 a Queue Using the 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.
Assign records to Queue using Salesforce flow

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.’
How to Assign leads to queue using Salesforce flow
  • 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.
Assign new records to Queue using Salesforce flow

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.

See also  Clone Records with their Related records in Salesforce using Flow

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.

Assign new records to Queue using Salesforce trigger flow

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.

Use Record trigger flow to assign records to Queue in Salesforce

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.

How to Assign records to queue using Salesforce flow

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

Assign new records to Queue using trigger flow in Salesforce

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.

Use Salesforce trigger flow to assign records to Queue

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.

See also  How to Create a Related Record from a 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: