# Managing Queues in Orchestrator

> 1. In the **Queues** page, click **Add Queue**. Two options are displayed allowing you to create a new queue or to link queues from other folders.
2. Click **Create a new queue**. The **Create Queue** window is displayed.
3. In the **Name** field, enter a name for the queue.
4. In the **Description** field, add a description for the queue.
5. Select the **Enforce unique references** checkbox if you want transaction references to be unique or not.
6. Select the **Store in encrypted format** checkbox if you want to have queue items data and output encrypted **in the database.**
   :::note
   * The encrypting operation cannot be undone.
   * The data is encrypted using
   Application-Level Encryption. For more information, refer to [Application-Level Encrypton (ALE)](https://docs.uipath.com/automation-cloud/automation-cloud/latest/admin-guide/encryption#application-level-encryption-(ale)).
   * Only the **Specific Data** and **Output** values of a queue item are being encrypted. These values are encrypted only in the database, thus protecting sensitive content
   from database admins. Orchestrator UI continues to display the decrypted content. For end to end encryption, you need to encrypt the queue item before adding it to the queue.
   * Existing queues cannot be encrypted. As an alternative, you can recreate the queue and select the **Store in encrypted format** checkbox.
   * Due to the encrypted format, reporting analytics on **Specific Data** and **Output** database fields is no longer possible, and the corresponding dashboards in Insights are unavailable.
   :::
7. In the **Auto Retry** section, you can find two options, as follows:
   * **Failed items** - if active, retries any queue items that fail after creating the queue.
   * **Abandoned items** - if active, it reveals the **Max # of retries** field, where you can set the maximum number of retries for abandoned queue items. If inactive, transactions are abandoned after 24 hours of inactivity.
     :::note
     The retried queue items are marked accordingly in the user interface.
     :::
8. Upload a [JSON schema](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/about-queues-and-transactions#schema-definitions) for any or each of **Specific Data**,**Output Data**, and **Analytics Data** by using the corresponding **Browse** button.
9. Enable [SLA predictions](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/about-queues-and-transactions#queue-sla-predictions) if you want to better control the processing time of your items, and to assess what resources you need such that they meet their deadline. If SLA predictions are enabled, configure the following fields:
   * From the **Process** drop-down, select the process which handles the queue items, and then fill in the SLA value below. The maximum value is 90 days.
   * Enable [Risk SLA](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/about-queues-and-transactions#risk-sla) if you want to define a buffer zone before the actual SLA, and fill in the value below. The risk SLA must be smaller than the SLA.
10. Click **Add**. The queue is created and displayed on the **Queues** page, yet it is empty.

## Creating a Queue

1. In the **Queues** page, click **Add Queue**. Two options are displayed allowing you to create a new queue or to link queues from other folders.
2. Click **Create a new queue**. The **Create Queue** window is displayed.
3. In the **Name** field, enter a name for the queue.
4. In the **Description** field, add a description for the queue.
5. Select the **Enforce unique references** checkbox if you want transaction references to be unique or not.
6. Select the **Store in encrypted format** checkbox if you want to have queue items data and output encrypted **in the database.**
   :::note
   * The encrypting operation cannot be undone.
   * The data is encrypted using
   Application-Level Encryption. For more information, refer to [Application-Level Encrypton (ALE)](https://docs.uipath.com/automation-cloud/automation-cloud/latest/admin-guide/encryption#application-level-encryption-(ale)).
   * Only the **Specific Data** and **Output** values of a queue item are being encrypted. These values are encrypted only in the database, thus protecting sensitive content
   from database admins. Orchestrator UI continues to display the decrypted content. For end to end encryption, you need to encrypt the queue item before adding it to the queue.
   * Existing queues cannot be encrypted. As an alternative, you can recreate the queue and select the **Store in encrypted format** checkbox.
   * Due to the encrypted format, reporting analytics on **Specific Data** and **Output** database fields is no longer possible, and the corresponding dashboards in Insights are unavailable.
   :::
7. In the **Auto Retry** section, you can find two options, as follows:
   * **Failed items** - if active, retries any queue items that fail after creating the queue.
   * **Abandoned items** - if active, it reveals the **Max # of retries** field, where you can set the maximum number of retries for abandoned queue items. If inactive, transactions are abandoned after 24 hours of inactivity.
     :::note
     The retried queue items are marked accordingly in the user interface.
     :::
8. Upload a [JSON schema](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/about-queues-and-transactions#schema-definitions) for any or each of **Specific Data**,**Output Data**, and **Analytics Data** by using the corresponding **Browse** button.
9. Enable [SLA predictions](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/about-queues-and-transactions#queue-sla-predictions) if you want to better control the processing time of your items, and to assess what resources you need such that they meet their deadline. If SLA predictions are enabled, configure the following fields:
   * From the **Process** drop-down, select the process which handles the queue items, and then fill in the SLA value below. The maximum value is 90 days.
   * Enable [Risk SLA](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/about-queues-and-transactions#risk-sla) if you want to define a buffer zone before the actual SLA, and fill in the value below. The risk SLA must be smaller than the SLA.
10. Click **Add**. The queue is created and displayed on the **Queues** page, yet it is empty.

You can populate queues either using Studio or on the **Upload Items** window. Processing items from a queue is only possible using Studio. For more information, see the [Managing Queues in Studio](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/managing-queues-in-studio#managing-queues-in-studio) page.

## Editing Queues

You are able to **update an existing queue settings**, such as:

* The queue **Name** and **Description**
* The **Auto Retry** section
* The maximum number of retries

### Editing a Queue Name or Description

To edit an existing queue name in Orchestrator:

1. In the **Queues** page, select the **More Options**![More Options icon](https://dev-assets.cms.uipath.com/assets/images/orchestrator/orchestrator-docs-image-More_VT-16d3389a-960a3e20.png) button for the desired queue.
2. Select **Edit**![Edit icon](https://dev-assets.cms.uipath.com/assets/images/orchestrator/orchestrator-edit-icon-Edit-ea5839b7-7725fd58.png) . The **Update Queue** wizard is displayed.
3. In the **Name** field, enter the new name for the selected queue.
   :::note
   * Make sure to enter a unique name. If a queue with the same name already exists in your tenant, you are prompted by the error
   message: `The name &lt;QueueName&gt; is already used. (#1001)`.
   * The name is **not** case sensitive. Therefore, `NEW_QueueName` and `new_queuename` are duplicates.
   :::
4. In the **Description** field, update the description of your queue.
5. Select **Update**.
   :::important
   Make sure to update the queue name in the corresponding workflow(s) in Studio. You must do this manually, as there is no automatic way of updating the queue name in Studio.
   :::

### Changing the Auto Retry options

To change the options in the **Auto Retry** section for an existing queue:

1. In the **Queues** page, select the **More Options**![More Options icon](https://dev-assets.cms.uipath.com/assets/images/orchestrator/orchestrator-docs-image-More_VT-16d3389a-960a3e20.png) button for the desired queue.
2. Select **Edit**![Edit icon](https://dev-assets.cms.uipath.com/assets/images/orchestrator/orchestrator-edit-icon-Edit-ea5839b7-7725fd58.png) . Next, the **Update Queue** wizard is displayed.
3. Under the **Auto Retry** section, select the option you need.
4. Select **Update**.

### Setting a maximum number of retries

#### Abandoned items: checkbox selected

If you selected the **Abandoned items** option, the **Max # of retries** field is displayed.

Enter a value in range 1-50 as the number of retries of the failed transaction.

##### Important
1. Existing failed transactions are not retried. Only the transactions that fail after you set the new value are retried.
2. Manual retries are not counted towards the maximum number of retries you set for queue items. In such cases, in the API, `RetryNumber` is `0`, and `AncestorId` is `null`.

What is more, each queue item points, via the `Key` field, to the original queue item of a retry chain.

The following fields are included:

* `ManualRetryNumber` - the amount of manual retries of a queue item
* `ManualAncestorId` - the ID of the queue item that has been manually retried
* `ManualAncestorUniqueKey` - the global unique GUID of the queue item that has been manually retried
* `UniqueKey` - the global unique GUID of any queue item (different for every retry, manual or automatic)
* `AncestorUniqueKey` - the global unique GUID of the queue item that has been automatically retried
* `RetryNumber` - the amount of automatic retries of a queue item
* `AncestorId` - the ID of the queue item that has been automatically retried
* `Key` - the GUID of the initial queue item of a retry chain

The objective is to have complete traceability of queue item retries.

3. Retried and deleted queue items do not participate in unique reference checks. As such, we recommend that you do not delete an initial queue item from a retry chain, since this prevents the validation of unique references. However, if the initial queue item has been picked up by data retention, this validation is still performed.

Let's say you have a list of failed transactions that are retried once. The current value of **Max # of retries** is `2`. Update the value to `3` and the failed transactions are retried two more times instead of one.

#### Abandoned items: checkbox not selected

If you did not select the **Abandoned items** option, the **Max # of retries** field is hidden.

No transaction is being retried.

## Managing queue links

Sharing queues between folders enables launching jobs in multiple folders without redesigning your workflows in Studio when the underlying processes are targeting the same queue. Linking a queue to a folder makes the queue and all queue-associated objects, such as queue items, available in that folder.

:::note
A queue linked to multiple folders is marked using the ![Link icon](https://dev-assets.cms.uipath.com/assets/images/orchestrator/orchestrator-image-linked_icon-f53242d2-6d93c5d8.png) icon. If the icon is not present, then the current folder is the only folder the queue resides in. Deleting it here completely removes the queue from Orchestrator. You need the **Queues - Create** permission in the folders where you want to add the queue (target folders) and **Queues - View** in the folder where the queue currently resides (original folder). If you have **Queues - Edit** in the target folder, you also require **Queues - Edit** in the original folder.
:::

### Linking multiple queues to the current folder

1. In the folder you want to link a queue to, on the **Queues** page, click **Add**. Three buttons are displayed allowing you to add a queue, link queues from other folders, or hide the options.
2. Click **Link from other folders**. The **Link Queues** window is displayed showing a list of all queues in the folders in which you have View permissions on Queues.
3. On the **Select Queues** section, select one or multiple queues from the list.

Figure 1. Select Queue

![Screenshot from the Link Queueus from other folders page](https://dev-assets.cms.uipath.com/assets/images/orchestrator/orchestrator-screenshot-from-the-link-queueus-from-other-folders-page-225714-3905bf40-67a3d68f.webp)

4. Select **Continue**. You are directed to the **Folder Validation** section. Here you can see the folders the queues are already linked to. If there are multiple folders, their names are displayed.

Figure 2. Validating folder

![Screenshot from the Link Queueus from other folders page](https://dev-assets.cms.uipath.com/assets/images/orchestrator/orchestrator-screenshot-from-the-link-queueus-from-other-folders-page-229753-88405b70-edf35afe.webp)

5. Select **Remove** for the corresponding queue to revert the change or click **Exit** to cancel the operation.
6. Select **Link** if you want to make the link between the queues you selected and the current folder. The queues are displayed on the **Queues** page.

Figure 3. Queues page

![Screenshot of the Queues page](https://dev-assets.cms.uipath.com/assets/images/orchestrator/orchestrator-screenshot-of-the-queues-page-226118-0be6c5d0-74a29229.webp)

### Linking a queue to multiple folders

1. Navigate to a folder the queue to be linked resides in.
2. Select **More Actions** &gt; **Manage Links** for the desired queue to open the **Manage Links** window. The **Manage Queue Links** window is displayed.

Figure 4. Manage Queue Links page

   ![1 - Left-hand pane displaying all the folders you have been granted View permissions on Queues. 2 - The current state of the queue displaying the number of folders it currently resides in as well as their names. 3 - The folders the queue is to be added in according to your selection in the left-hand pane. 4 - The folders the queue will be removed from.](https://dev-assets.cms.uipath.com/assets/images/orchestrator/orchestrator-1-left-hand-pane-displaying-all-the-folders-you-have-been-granted-view-permissions-on-queues-2-the-current-state-of-the-queue-displaying-the-number-of-folders-i-4602645e-cf1302d1.webp)

3. Select **Update**. A confirmation window is displayed.
4. Select **Cancel** if you want to abort the changes or **Continue** for the changes to take effect. The operations are now reflected in Orchestrator according to your changes.

### Unlinking queues from folders

Unlinking queues from folders can be performed in a manner similar to the linking operation. Navigate to the link-management areas presented in the procedures above and remove the connections between a certain queue and a certain folder.

Alternatively, you can remove a queue using the **Remove** functionality.

:::important
Removing a queue that exists in multiple folders only removes it from the folder where the removal operation takes place, it does not remove it from the other folders as well. In order to completely delete a queue, you must remove all its existing links. You cannot unlink a queue from a folder in the following situations:
* queue SLA has been enabled in that folder;
* a queue trigger is attached to the queue.
:::

## Displaying transactions

In the **Queues** page, click **More Actions** &gt; **View Transactions**. The **Transactions** page is displayed, containing only the items from the indicated queue.

## Displaying review requests

In the **Queues** page, click on **Review Requests** to display all the queue items assigned for revision to the currently logged-in user. The page allows for status changes and managing item information.

## Displaying the Queue Chart

To view the chart for a specific queue, click **More Actions** button, and then **View Chart**.

A line chart displays the transaction status evolution over a specific amount of time. The time period (last hour, day, week, 30 days) can be changed, and you can view the average execution time and the maximum number of retries.

Figure 5. Queue chart

  ![Screenshot of a queue chart](https://dev-assets.cms.uipath.com/assets/images/orchestrator/orchestrator-screenshot-of-a-queue-chart-226975-7e539a7c-c67e42a2.webp)

## Uploading items to a queue using a CSV file

See here details about [uploading queue items using a CSV file](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/bulk-uploading-queue-items-using-a-csv-file#bulk-uploading-queue-items-using-a-csv-file).

## Monitoring a Queue

To monitor a queue, click the corresponding **More Actions** button and then **Monitor Queue**. Alternatively, select it from the **Queues Overview** widget (**Monitoring** &gt; **Queues**).

Note that monitoring a queue requires your user to have **View** permissions on Queues and on Monitoring. Additionally, **Edit** on Monitoring is required in order to disable errors from the **Error Feed** widget on the **Monitoring** &gt; **Queues** page.

## Adding tags to Queues

:::note
You need **Edit** on Queues and **View** on Tags to add existing tags to queues. You need **Edit** on Queues and **Create** on Tags to add new tags to queues.
:::
:::note
* Each queue can have a maximum of one million key/value pairs.
* Labels and key/value properties are limited to 256 characters.
* Tag names can't contain these characters: `&lt;`, `&gt;`, `%`, `&`, `\)\)`, `?`, `/`, `:`
:::

You can apply tags to a queue either when creating one or editing an existing one. To add tags to a queue when editing it, follow these steps:

1. From the **Queues** page, click **More Actions** &gt; **Edit** next to the desired queue. The queue is opened for editing.
2. On the **Labels** field, start typing the name of the label. You can choose an existing label or create a new one.
3. On the **Properties (key-value pairs)** field, click **Add new**.
4. Add new keys and values. You can choose existing keys and/or values or you can create new ones.
5. When done, click **Update**. Your queue is updated and the newly created tags, if any, become available for other objects.

## Removing tags from Queues

To remove tags from a queue, follow these steps:

1. From the **Queues** page, click **More Actions** &gt; **Edit** next to the desired queue. The queue is opened for editing.
2. On the **Labels** field, click the **X** adjacent to the name of the label to remove it. The label is removed.
3. On the Properties (key-value pairs) field, click the **X** adjacent to the keys and/or values to remove them. The keys and/or values are removed.
4. To delete a key/value pair click the **Remove** icon corresponding to that entry. The key/value pair is removed.
5. When done, click **Update**. Your queues is updated and tags are removed.

## Removing a Queue

To remove a queue, click the corresponding **More Actions** button and then **Remove**.

Alternatively, select it from the **Queues** page and click **Remove**. The queue is no longer displayed on the **Queues** page.

:::important
Removing a queue that exists in multiple folders only removes it from the folder where the removal operation takes place, it does not remove it from the other folders as well. In order to completely delete a queue, you must remove all its existing links.
:::
:::note
After a queue is deleted, assigned transaction items belonging to the queue are no longer visible in the **Review Requests** page.
:::

## Recording failed queue transactions

You can record failed queue transactions associated to a process which has the recording option enabled. This helps identify and troubleshoot issues that lead to failure, and aids in monitoring and auditing.

This option is enabled at the process level, from the **[Job recording](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/about-recording#video)** section of the **Additional settings** tab.

Figure 6. Additional settings for Job recording

   ![Screenshot of the Job recording page](https://dev-assets.cms.uipath.com/assets/images/orchestrator/orchestrator-screenshot-of-the-job-recording-page-299467-471ceb48-d3e1437f.webp)

If a process containing a queue fails, its execution is recorded and made available in Orchestrator in the following places:

* At the queue level, by clicking **Open recording** in the contextual menu of the affected queue. This option is not active if:
  + the queue is associated to a process whose execution has not failed.
  + the **Record and store failed queue transactions** option has not been enabled for the process to which that queue is associated.
* At the transaction level, by clicking **Open recording** in the **View details** window of the affected transaction.

### Recording duration

The maximum recording length is 3 minutes, and it applies to the last moments of the execution.

The minimum recording length is 10 seconds. If processing a transaction takes less than 10 seconds, the recording might include other transactions as well.
