Sub topic 4
Queues as Lead Owners
This chapter assumes you can navigate Setup, know what a profile and a permission set do, and have read the earlier chapter on the Lead object. It covers what a queue is, how to create one for leads, and the errors people hit most often.
What a queue is
A queue is a holding area for records that don't yet have an individual owner. Members of the queue can see the records in it and take ownership. Until someone does, the queue itself is the record's owner.
Queues solve a common routing problem. A new web lead arrives, and you know it belongs to the "West Region SDR team" but not to a specific person. Assigning it to a queue keeps it visible to the whole team without picking a winner too early.
A queue can hold records from several objects, but each queue only accepts the objects you select when you create it. For this tutorial, we select Lead.
Who can be a queue member
Members can be users, public groups, roles, and roles with subordinates. Using a public group or role keeps the queue current as people join or leave the team, so you don't edit the queue each time.
Queue membership does not grant access by itself in every case. A member can see and take records in the queue only if their profile or permission set gives them the needed object permissions, such as Read and Edit on Lead.
Create a lead queue
- In Setup, enter Queues in Quick Find and select it.
- Click New.
- Enter a Label (for example,
West Region Leads) and a Queue Name, which is the API name. - Optionally enter a Queue Email. If you do, Salesforce notifies this address when a record is assigned to the queue. You can also choose to send email to each member.
- In Supported Objects, move Lead to the Selected Objects list.
- In Queue Members, add the users, groups, or roles that should work these leads.
- Save.
The queue now appears as a possible owner in the Owner field on lead records.
How a queue owns a lead
When a lead's owner is a queue, the OwnerId field holds the queue's Id instead of a user Id. Queue Ids start with the prefix 00G, and user Ids start with 005. This difference lets you tell them apart in code and reports.
The following SOQL query lists leads that are still unclaimed in queues.
SELECT Id, Name, Owner.Name, CreatedDate
FROM Lead
WHERE Owner.Type = 'Queue' AND IsConverted = false
ORDER BY CreatedDate ASCOwner.Type returns Queue or User, so this filter finds leads nobody has claimed yet.
Taking a lead from a queue
Queue members usually claim leads from a list view. Open the Lead list view for the queue, select records, and use Change Owner to assign them to yourself. Members can also open a lead and change the owner directly.
You can also make this easier for the team. Create a list view filtered to "Queue: West Region Leads" and share it with the group, so everyone starts from the same worklist.
Queues and assignment rules
Assignment rule entries can set a queue as the assignee. This is the usual pattern: a rule entry matches criteria, such as Lead.Country = United States and Lead.State = CA, and assigns the lead to the matching queue. The next chapter builds those rules. A queue must exist first, which is why it comes before them here.
Common errors
| Problem | Likely cause | Fix |
|---|---|---|
| Queue is missing from the Owner lookup | Lead is not in the queue's Supported Objects | Edit the queue and add Lead |
| Members can't see queued leads | Profile or permission set lacks Read on Lead, or sharing is restrictive | Grant object access and review the sharing settings |
| Rule can't assign to the queue | Queue was deleted or doesn't support Lead | Recreate the queue or fix its objects |
| Queue can't be deleted | Records or rules still reference it | Reassign the records and update the rule entries first |
Exercise
A new queue named "Inbound SMB Leads" is saved, but it doesn't appear as a choice in the Owner field of a lead. What is the most likely cause, and how do you check it?
Show answer
Lead was probably not added to the queue's Supported Objects. Open the queue in Setup, then Queues, and check that Lead is in the Selected Objects list. Add it and save.