Skip to main content
New tool CRON Expression Builder — preview next run times before you schedule Apex. Open the builder →
Diagram illustrating the flow of records through a Salesforce Queue for efficient assignment.
Admin

What is a Queue in Salesforce?

The short answer

A Salesforce queue is a shared work pool that holds records such as Leads, Cases, or custom objects until a member claims one and works it. The queue owns the record in the meantime, so a team can spread work across its members and route records in automatically with assignment rules or Apex.

Key takeaways Assign a record to a queue in Apex by querying the Group object with Type = 'Queue' and setting the record's OwnerId to the queue's Group Id. Route records into a queue automatically with assignment rules, workflow, Process Builder, or Apex. Add users, public groups, or roles as queue members so they can see the queue and pick records out of the shared backlog. Combine queues with Omni-Channel for real-time routing and capacity-based assignment.

Understanding Salesforce queues

In Salesforce, a queue is a shared work pool that holds records (such as Leads, Cases, or custom objects) until a member of the queue claims one and works it. Queues spread work across a team, keep the distribution even, and make unassigned records visible instead of leaving them to sit with nobody looking at them.

Key characteristics

  • Standard objects like Leads and Cases, plus custom objects, can be assigned to a queue.
  • Users, public groups, and roles can be queue members, and members can accept or pick records out of the queue.
  • Assignment rules, workflow, Process Builder, and Apex can all route records into a queue automatically.
  • Once a record sits in a queue, the queue owns it until a user takes ownership.
  • Members see the records in the queue, but what they can do with them still depends on profile permissions and sharing settings.

When to use queues

Use a queue when several users or teams work the same backlog. Typical cases are support teams triaging incoming Cases, sales teams picking up unassigned Leads, and functional groups working approval or review tasks on custom objects.

How to create and configure a queue

  1. Navigate to Setup > Users > Queues.
  2. Click New, give the queue a name and optionally a queue email.
  3. Select the supported objects (e.g., Case, Lead, or a custom object).
  4. Add users, public groups, or roles as queue members.
  5. Save, then configure assignment rules or automation to route records into the queue.

Best practices

Keep membership tight. Adding only the people who actually process the records cuts the noise for everyone else. Automate the routing with assignment rules so records land in the right queue instead of the nearest one. Watch the size of the queue with reports and dashboards, because large queues cause delays. And when you need real-time routing and capacity-based assignment, combine queues with Omni-Channel.

Sample Apex assignment to a queue

Here's a simple Apex example showing how to assign a record to a Queue by setting OwnerId to the Queue's Group Id:

Group q = [SELECT Id FROM Group WHERE Type = 'Queue' AND Name = 'Support Queue' LIMIT 1]; Case c = new Case(Subject = 'New case', Status='New', OwnerId = q.Id); insert c;

Limitations

  • Queues are not supported for all standard objects (e.g., Accounts in some editions).
  • A record in a queue has no single user owner until someone claims it.
  • Access to records in a queue still respects sharing and object-level permissions.

Conclusion

Queues give a team one place to hold shared work until somebody picks it up, which takes the friction out of assignment and makes the backlog visible. Add automated routing or Omni-Channel on top and support, sales, and cross-functional teams can all pull from the same pool without an admin handing out records by hand.

Frequently asked questions

What is a queue in Salesforce?

A queue is a shared holding pool for records such as Cases, Leads, and custom objects. The queue owns each record until a member accepts or claims it and takes ownership.

How do you assign a record to a queue in Apex?

Query the queue from the Group object where Type equals 'Queue', then set the record's OwnerId to that Group Id before your DML insert or update.

Who can be added to a Salesforce queue?

A queue can have individual users, public groups, and roles as members. Members see the queued records and can take ownership of the ones they work.

Which objects support queues in Salesforce?

Queues work with standard objects such as Cases and Leads and with custom objects, but not with every standard object in Salesforce.

Newsletter

One email every Tuesday

New guides, tool updates, and the release-note changes that break things.

No spam. Unsubscribe in one click.

Comments

Loading comments...

Leave a Comment