Queue entities

 

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online

Queues are instrumental in organizing, prioritizing, and monitoring the progress of your work while you are using Microsoft Dynamics 365. As a central location for work management, queues assist you in processing cases, responding to service calls, or sending out product information to prospective customers. Programmatically, a queue is a collection of queue items. A queue item serves as a container for an entity record, such as a task, an email, or a case that needs processing.

Note

The capabilities of queues was enhanced in Microsoft Dynamics CRM 2013 Service Pack 1 (SP1) (on-premises) and CRM Online Spring ‘14. For details about what was added from earlier versions, see the Dynamics CRM 2013 version of this topic.

The following information pertains to queues:

  • All customizable entities can be enabled for queues.

  • Queues may be public or private. Private queue items are only visible to the members of the queue.

  • A private queue is automatically created for each new user or team.

  • A queue can contain multiple entity types, such as tasks, emails, or cases.

  • A queue contains information about the user who is working on a particular queue item. This helps you manage your resources more efficiently and helps to prevent duplication of work.

  • Queues can be enabled for workflows and audit. This helps improve productivity and track the entity and attribute data changes for future analysis and reporting.

In This Topic

Members capabilities

Public and private queues

Attributes used to manage queues

Restrictions on deleting queues

Enable entities for queues

Inherit privileges and provide limited access to a queue

Actions on queues and queue items

Members capabilities

Queues are categorized into public or private queues. Private queues have individual users as members to make controlling access to queues easier. If you add a team to a private queue, all the members of that team become members of the private queue.

Public and private queues

The QueueViewType attribute is a picklist that defines whether a queue is public or private.

  • All user queues are private queues for the user: Only the user will be able to see queue items in their private queue.

  • Team queues are marked as private with members: the team owner and all team members will be able to see the queue in the application.

  • All other queues are public. Everyone with read privileges for the queue entity will be able to see these queues.

Attributes used to manage queues

Use the following attributes to manage queues.

SchemaName

DisplayName

Type

Description

NumberOfItems

Queue Items

Integer

Number of Queue items associated with the queue.

NumberOfMembers

No. of Members

Integer

Number of Members associated with the queue.

QueueViewType

Type

Picklist

Select whether the queue is public or private. A public queue can be viewed by all. A private queue can be viewed only by the members added to the queue.

Restrictions on deleting queues

A queue cannot be deleted if the following are true:

  • When the queue has queue items.

  • When any routing rule uses the queue.

Enable entities for queues

To enable a customizable entity, business or custom, for queues, use the UpdateEntityRequest message to set the IsValidForQueue attribute to true. For a list of customizable entities, see Which entities are customizable?. The queue entity and the queue item entity are customizable entities, but they cannot be enabled for queues.

The following list contains default queue-enabled entities in Microsoft Dynamics 365 (online & on-premises):

  • Appointment

  • Campaignactivity

  • CampaignResponse

  • Email

  • Fax

  • Incident

  • Letter

  • PhoneCall

  • RecurringAppointmentMaster

  • ServiceAppointment

  • SocialActivity

  • Task

Inherit privileges and provide limited access to a queue

A queue and a queue item have a parental relationship in which operations on the parent queue record are propagated to the child queue item records. For more information about parental relationships and cascading rules, see Entity relationship behavior.

Note

In this particular parental relationship, only the Delete action is cascaded from the parent queue entity to the child queue item entity. Other actions, such as Assign, Merge or Share are not cascaded.

The privileges on a queue item are inherited from the privileges on a queue.

  • If you have prvReadQueue privilege, you also have read privilege on a queue item entity.

  • If you have prvAppendToQueue privilege, you also have create, update, and delete privileges on a queue item entity.

Often, you must limit access to the queue when permitting access to the queue items. As a queue owner with full access to the queue, you might want to share a queue with a team that will have only limited access to the queue. For example, if the support team is given read and append to privileges on a queue, team members cannot make any changes to the queue, such as changing queue name or queue owner. However, they can create, retrieve, update, and delete queue items.

Actions on queues and queue items

You can perform a variety of actions on queues and queue items, if you have appropriate privileges on the queue entity and the queue item entity.

Actions on queues

Perform the following actions on the queues:

  • Customize queues and queue items by adding custom attributes.

  • Add an entity record to a queue.

    Note

    An entity record cannot be added in multiple queues. An exception is an email entity record with the status “Received”.

  • Add entity records of different entity types in the same queue.

  • Change an ownership of a queue by assigning it to another user or team.

  • Add principals to a private queue using the AddPrincipalToQueueRequest.

  • Clean up the history for a queue by deleting inactive queue items in the queue, such as completed or canceled phone calls.

  • Retrieve all the queues that a user has access to using the RetrieveUserQueuesRequest

  • Make a queue the default queue for a user by setting the SystemUser.QueueId attribute to the ID of the queue. The same queue can be specified as a default queue for different users.

  • Create a workflow that operates on all private queues. For example, whenever a user creates a task, the workflow adds the task to the default queue of the user. You can also create a workflow that operates only on a particular queue.

  • Configure an email for incoming messages, if you want incoming email messages to be delivered to a queue.

Actions on queue items

Perform the following actions on the queue items:

  • Assign a queue item to a user using the PickFromQueueRequest.

  • Move a queue item from a source queue to a destination queue by using the AddToQueueRequest message. A queue item can be moved from one queue to another until it is deactivated by using the SetStateRequest message.

    Note

    A queue item is automatically deactivated if the state of the record in the queue item changed from Active to Inactive. This applies to queue-enabled entities that have Active and Inactive states. To determine if an entity is queue-enabled and if an entity record can be in an Active or Inactive state, see entity metadata information. To view the entity metadata for your organization, install the Metadata Browser solution described in Browse the metadata for your organization. You can also view the metadata for an uncustomized organization in the Excel file called EntityMetadata.xlsx included in the top-level folder of the SDK download.

  • Release a queue item back to the queue using the ReleaseToQueueRequest.

  • Delete a queue item from a queue by using the DeleteRequest message. When you delete a queue item, a referenced entity record is not deleted. However, when you delete an entity record, all queue items that reference this entity record are deleted.

See Also

AddToQueueRequest
Configure email for incoming messages
Queue entity messages and methods
QueueItem entity messages and methods
Sample code for queue entities
Business management entities

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright