Definition
A Queue in Salesforce is a collection of users who share access to records. Queues allow teams to manage work more efficiently by holding records (such as Leads, Cases, Custom Objects, or other supported objects) until a member of the queue claims or is assigned the record. Queues are frequently used for round-robin distribution, load balancing, and collaborative handling of unassigned work.
When to use a Queue
Use a queue when multiple users can work on the same type of record and you want a shared holding place instead of assigning records to individual users immediately. Common use cases:
- New leads that multiple SDRs can claim
- Support cases triaged by a team
- Work items for a shared operations team
- Custom object records that need team ownership before assignment
Key characteristics
Queues in Salesforce have a few important traits:
- Records owned by a queue show the queue name as the Owner.
- Queues can contain users, public groups, and roles as members.
- Supported objects: standard objects like Lead, Case and many custom objects (object must be enabled for queue assignment).
- Queues can be used with assignment rules, workflow, Process Builder, Flow, and Apex.
Difference: Queue vs Public Group
Both queues and public groups influence sharing and collaboration, but they serve different purposes:
- Queue: Used to own records and act as a holding area for records until a user takes ownership.
- Public Group: Used primarily to simplify sharing rules and list visibility, not as a record owner.
How to create and enable an object for queues
Setup > Queues > New. Choose the supported objects for the queue (checkboxes for objects appear only if the object supports queues). Add queue members (users, roles, or public groups) and optionally set an email when new records are assigned.
Example: Querying a Queue via SOQL
Queues are stored in the Group object (type = ‘Queue’). To find the Queue and its Id:
// Find queue by name
SELECT Id, Name FROM Group WHERE Type = 'Queue' AND Name = 'My Support Queue'
// Get queue members
SELECT GroupId, UserOrGroupId FROM GroupMember WHERE GroupId = '00Gxxxxxxxxxxxx'
Example: Assign record ownership to a Queue in Apex
Assign a record (e.g., Case or CustomObject__c) to a queue by setting OwnerId to the queue Group.Id:
// Apex example: assign a case to a queue
Id queueId = [SELECT Id FROM Group WHERE Type = 'Queue' AND Name = 'Support Queue' LIMIT 1].Id;
Case c = new Case(Subject = 'New issue', Status = 'New', OwnerId = queueId);
insert c;
Best practices
- Keep queue names clear and descriptive (e.g., “EMEA – Support Queue”).
- Limit queue membership to active users or groups to avoid orphaned work.
- Use assignment rules or Flow to automatically route records to queues.
- Monitor queue size and average claim time to optimize team workload.
Limitations
- Not all objects are queue-enabled by default — the object must support queue assignment.
- Queues do not replace robust automation like territory management — they are primarily for shared ownership.
- Sharing and access still follow profiles, roles, and sharing rules — being a queue member does not always grant full record access unless configured.
Summary
In short, a Salesforce Queue is a shared holding area that allows multiple users or groups to own and manage records collaboratively. Queues streamline team workflows, improve visibility for unassigned work, and integrate with automation tools like Flow, assignment rules, and Apex to support scalable operations.






Leave a Reply