# What purpose do Queues serve in managing unassigned workloads across support teams?

**Topic:** Service Cloud · **Difficulty:** Medium · **Tags:** Service Cloud, Queues, Workload Management

Read it on the site: https://www.forcechallenges.com/interview-questions/what-purpose-do-queues-serve-in-managing-unassigned-workloads-across-support-teams

## Answer

**Basics:** Some work should not belong to one person until someone picks it up. A queue (stored as a Group record with Type = 'Queue') holds unassigned records in a list. Members (users, public groups, roles, or roles and subordinates) can open the queue list view and take a record.

**How it works:**
1. Setup > Queues > New. Pick supported objects (Case, Lead, Work Order, Messaging Session, custom objects with queues enabled).
2. Add members and optionally a queue email address or "send email to members".
3. Routing: assignment rules, Flow, or Omni-Channel set OwnerId to the queue.
4. Agents use the Queue list view and "Accept" or "Change Owner", or Omni-Channel pushes the item to an available agent.
5. Owner becomes a user; the queue relationship ends.

**Advanced / deep dive:** Queues interact with sharing: for private sharing models, members and users above them in the role hierarchy (if Grant Access Using Hierarchies is on) get access to queue-owned records. Queues are the routing target for Omni-Channel Routing Configurations, which add priority and capacity. Skills-based routing and Omni-Channel Flow replace simple queues when you need "right agent" logic. Queues cannot own Accounts, Opportunities or Contacts. A queue with huge membership via public groups can slow sharing recalculation. Remember that OwnerId is polymorphic: IDs starting with 005 are users, 00G are queues/groups.

**Code / config example:** Assign new cases to a queue in bulk:
```apex
Map<String, Id> queues = new Map<String, Id>();
for (Group g : [SELECT Id, DeveloperName FROM Group
                WHERE Type = 'Queue' AND DeveloperName = 'Tier1_Support']) {
    queues.put(g.DeveloperName, g.Id);
}
for (Case c : Trigger.new) {   // before insert
    if (c.Priority == 'High') c.OwnerId = queues.get('Tier1_Support');
}
```

**Hidden gotchas & must-remember points:**
- A custom object must be added to the queue's supported objects, and "Allow Queues" must be on for the object.
- Queue members are not notified unless the queue email or member emailing is configured.
- Always query by DeveloperName, never by hard-coded Id.
- Queue ownership does not give edit rights beyond what sharing allows in a Public Read-Only model.
- Deleting a queue that owns records requires transferring those records first.
- Reports on "owner" show the queue name; filter by owner type if mixing queue and user work.

**Best practice:** Use queues as routing destinations and keep them small, role-based and documented; let Omni-Channel push work instead of agents cherry-picking.

---
Source: ForceChallenges · last updated 2026-11-02
