---
schema_version: "1"
id: 3ffc52d2df5c8b25e4b379cea38bc3ea244f4e26b89f0106958fd93720f1e51d
title: Queue
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_queue.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_queue.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 33ab779f7626b1735b91d6b01825eaf694b4bde4aa3df4576b9073bea7ad076f
description: Represents a holding area for items before they are processed.
---
# Queue

Represents a holding area for items before they are processed.

## Declarative Metadata File Suffix and Directory Location

The file suffix for queue components is .queue and components are stored in the queues directory of the corresponding package directory. This component supports cases, leads, service contracts (if Entitlements are enabled), and custom objects.

## Version

Queue components are available in API version 24.0 and later.

## Special Access Rules

As of Summer ’20 and later, only authenticated internal and external users can access this type.

## Fields

This metadata type represents the valid values that define a queue:

| Field Name | Field Type | Description |
| --- | --- | --- |
| doesIncludeBosses | boolean | Required. Indicates whether records shared with users in this queue are also shared with users higher in the role hierarchy (true) or not (false). This field corresponds to the Grant Access Using Hierarchies checkbox on the queue’s detail page. Available in API version 67.0 and later. |
| doesSendEmailToMembers | boolean | Indicates whether emails are sent to queue members (true) or not (false) when a new record is added to the queue. |
| email | string | The email address of the queue owner. |
| name | string | Required. The name of the queue. Corresponds to **Label** in the user interface. |
| queueMembers | [QueueMembers](#QueueMembers)\[\] | Represents queue members added to the queue. Members can be added directly or selected by roles and public groups they belong to. Available in API version 42.0 and later. |
| queueRoutingConfig | string | Routing configuration name. Applies to orgs that use Omni-Channel with a routing configuration. Available in API version 42.0 and later. |
| queueSobject | [QueueSobject\[\]](#QueueSobject) | Indicates the supported entity types. |

## QueueMembers

Represents queue members added to the queue. Members can be added directly as users or selected by the roles and public groups they belong to. Available in API version 42.0 and later.

| Field Name | Field Type | Description |
| --- | --- | --- |
| publicGroups | [PublicGroups](#PublicGroups)\[\] | Represents public groups in the org. Public groups are optionally used to add queue members. |
| roleAndSubordinates | [RoleAndSubordinates](#RoleAndSubordinate)\[\] | Represents roles and their subordinates in the org’s role hierarchy, including customer and partner roles. Roles and their subordinate hierarchy are optionally used to add queue members. |
| roleAndSubordinatesInternal | [RoleAndSubordinatesInternal](#RoleAndSubordinateInternal)\[\] | Represents internal roles and their subordinates in the org’s role hierarchy, excluding customer and partner roles. Roles and their subordinate hierarchy are optionally used to add queue members. |
| roles | [Roles](#Roles)\[\] | Represents roles in the org. Roles are optionally used to add queue members. |
| users | [Users](#Users)\[\] | Represents users in the org. Users can be added directly as queue members. |

## PublicGroups

Represents public groups in the org. Public groups are optionally used to add queue members. Available in API version 42.0 and later.

| Field Name | Field Type | Description |
| --- | --- | --- |
| publicGroup | string | Represents a public group. |

## RoleAndSubordinates

Represents roles and their subordinates in the org’s role hierarchy, including customer and partner roles. Roles and their subordinate hierarchy can be used to add queue members. Available in API version 42.0 and later.

| Field Name | Field Type | Description |
| --- | --- | --- |
| roleAndSubordinate | string | Represents a role and its subordinates, including customer and partner roles. Only available when digital experiences is enabled for your org and Experience Cloud site users are created with external account roles other than a shared person account role. |

## RoleAndSubordinatesInternal

Represents internal roles and their subordinates in the org’s role hierarchy, excluding customer and partner roles. Roles and their subordinate hierarchy can be used to add queue members. Available in API version 42.0 and later.

| Field Name | Field Type | Description |
| --- | --- | --- |
| roleAndSubordinateInternal | string | Represents a role and its subordinates, excluding customer and partner roles. |

## Roles

Represents roles in the org. Roles can be used to add queue members. Available in API version 42.0 and later.

| Field Name | Field Type | Description |
| --- | --- | --- |
| role | string | Represents a role. |

## Users

Represents users in the org. Users can be added directly as queue members. Available in API version 42.0 and later.

| Field Name | Field Type | Description |
| --- | --- | --- |
| user | string | Represents a user. Specify the user’s username. |

## QueueSobject

QueueSobject represents an entity type that the queue supports.

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d780010e634">Field Name</th>

              <th class="featureTableHeader  " id="d780010e637">Field Type</th>

              <th class="featureTableHeader  " id="d780010e640">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d780010e634" data-title="Field Name"><span class="keyword parmname">sobjectType</span></td>

              <td class="entry" headers="d780010e637" data-title="Field Type">string</td>

              <td class="entry" headers="d780010e640" data-title="Description">Valid values are:<ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">Case</samp></li>

                  <li class="li"><samp class="codeph nolang">ContactRequest</samp></li>

                  <li class="li"><samp class="codeph nolang">Lead</samp></li>

                  <li class="li"><samp class="codeph nolang">ServiceContract</samp></li>

                  <li class="li">
                    <samp class="codeph nolang">Task</samp> (Available in API
                    version 48.0 and later.)
                  </li>

                  <li class="li">Custom objects (such as <samp class="codeph nolang">ObjA_c</samp>)</li>

                </ul>
              </td>

            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

The following is the definition of a queue, which supports Case, Lead, and a custom object named ObjA.

<?xml version="1.0" encoding="UTF-8"?>
<Queue xmlns="http://soap.sforce.com/2006/04/metadata">
    <doesIncludeBosses\>false</doesIncludeBosses\>
    <doesSendEmailToMembers\>true</doesSendEmailToMembers\>
    <email\>member@company.com</email\>
    <fullName\>Your Name</fullName\>
    <name\>memberQueue</name\>
    <queueSobject\>
        <sobjectType\>Case</sobjectType\>
    </queueSobject\>
    <queueSobject\>
        <sobjectType\>Lead</sobjectType\>
    </queueSobject\>
    <queueSobject\>
        <sobjectType\>ObjA\_\_c</sobjectType\>
    </queueSobject\>
</Queue\>

Here’s another definition of a queue containing queue members added directly or via public groups and roles. Queries retrieve values using the DeveloperName field, not the Name field, so that the returned names are unique. The query also appends letters to the end of duplicate names, so these groups and roles can be referred to independently.

<?xml version="1.0" encoding="UTF-8"?>
<Queue xmlns="http://soap.sforce.com/2006/04/metadata">
    <doesIncludeBosses\>false</doesIncludeBosses\>
    <doesSendEmailToMembers\>false</doesSendEmailToMembers\>
    <name\>queue1</name\>
    <queueMembers\>
        <publicGroups\>
            <publicGroup\>All Internal Users</publicGroup\>
        <publicGroups\>
        <queueRoleAndSubordinates\>
            <queueRoleAndSubordinate\>role1</queueRoleAndSubordinate\>
            <queueRoleAndSubordinate\>role2</queueRoleAndSubordinate\>
            <queueRoleAndSubordinate\>role3</queueRoleAndSubordinate\>
        </queueRoleAndSubordinates\>
        <roles\>
            <role\>role1</role\>
        </roles\>
        <users\>
            <user\>s@sm.com</user\>
            <user\>std@sm.com</user\>
        </users\>
    </queueMembers\>
    <queueRoutingConfig\>my\_omni\_routing\_config</queueRoutingConfig\>
    <queueSobject\>
        <sobjectType\>Case</sobjectType\>
    </queueSobject\>
    <queueSobject\>
        <sobjectType\>Lead</sobjectType\>
    </queueSobject\>
</Queue\>

## Wildcard Support in the Manifest File

This metadata type supports the wildcard character \* (asterisk) in the package.xml manifest file. For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).