# Add Queue Item And Get Reference

> `UiPath.Persistence.Activities.Queue.AddQueueItemAndGetReference`

`UiPath.Persistence.Activities.Queue.AddQueueItemAndGetReference`

## Description

Adds an Orchestrator Queue Item with parameters and retrieves the corresponding Queue Item Object, stored in a `QueueItemData` variable, in order to wait for transaction completion at any time during the execution of the workflow.

## Project compatibility

**Windows - Legacy** | **Windows** | **Cross-platform**

## Windows, Windows - Legacy configuration

### **Designer panel**

* **Queue Name** - The queue where the QueueItem object is to be added. The name is case insensitive, meaning that if in Orchestrator it was defined as "MyFirstQueue", it matches "myfirstqueue". The maximum number of characters is `50`.
* **Priority** - The priority level of the Queue Item that is added. This property is a criterion for the prioritization of queue items, alongside **Due Date** and **Defer Date**.
* **ItemInformation** - A collection of additional information about the specific QueueItem that is to be added. The information is stored in the item and is used during a transaction processing. It is recommended to use only primitive values of the following types: Number, Boolean, String and DateTime. The value of string arguments cannot contain the following characters: `[` and `" "`. Argument names cannot contain the following characters: `:`, `.`, `,`, `@`, `"`.
* **Queue Item (Output)** - The queue object that is returned from Orchestrator as a `QueueItemData` object after the queue is created. This object can be passed to the [Wait for Queue Item and Resume](https://docs.uipath.com/action-center/automation-cloud/latest/user-guide/wait-for-queue-item-and-resume) activity in order to suspend the execution of the workflow until the transaction is completed.

### **Properties panel**

#### Common
* **ContinueOnError** - Specifies if the automation should continue even when the activity throws an error. This field only supports Boolean values (True, False). The default value is False. As a result, if the field is blank and an error is thrown, the execution of the project stops. If the value is set to True, the execution of the project continues regardless of any error.

:::note
If this activity is included in **Try Catch** and the value of the **ContinueOnError** property is True, no error is caught when the project is executed.
:::

* **DisplayName** - The display name of the activity.
* **TimeoutMS** - Specifies the amount of time (in milliseconds) to wait for the activity to run before an error is thrown. The default value is 30000 milliseconds (30 seconds).

#### Input
* **Deadline** - The timestamp before which the queue item should be processed. This property can be filled in with relative timestamps such as `DateTime.Now.AddHours(2)`, `DateTime.Now.AddDays(10)` and `DateTime.Now.Add(New System.TimeSpan(5, 0, 0, 0))`. Additionally, you can use the US notation to add an exact time, such as `12/10/2017 07:40:00`. Automatically correcting this date is available. For example, if you write `8 9 2018 9:0`, it is automatically transformed to `08/09/2018 09:00:00`.
* **Orchestrator Folder Path** - The [path to an Orchestrator Folder](https://docs.uipath.com/orchestrator/docs/managing-folders#section-folder-path) different to the one the current process operates in, where you want to create the queue item. To read more on Orchestrator Folders, go [here](https://docs.uipath.com/orchestrator/docs/about-folders). For **Classic** folders, this property can only be used with **Floating Robots** and only if the current user has the correct task privilege in the target folder. For **Modern** folders, **folder path overriding is not supported**. This field supports only strings and `String` variables.

:::note
The **FolderPath** property must be used **only** if the queue item must be created or queried from a folder different than the current one. If the user performing this action does not have the required permissions for the target folder, queue item creation fails and throws a critical error. You can view more info on Folder Permissions [here](https://docs.uipath.com/orchestrator/docs/about-folders#section-roles-and-permissions-for-folders).
:::

* **ItemInformation** - A collection of additional information about the specific QueueItem that is to be added. The information is stored in the item and is used during a transaction processing. It is recommended to use only primitive values of the following types: Number, Boolean, String and DateTime. The value of string arguments cannot contain the following characters: `[` and `" "`. Argument names cannot contain the following characters: `:`, `.`, `,`, `@`, `"`.
* **ItemInformationCollection** - Enables importing an entire dictionary of information for a queue item. This field accepts `Dictionary<string, object>` variables only.
* **Postpone** - The timestamp after which the queue item may be processed. This property is a criterion for the prioritization of queue items, alongside **Priority** and **Due Date**. This property can be filled in with relative timestamps such as `DateTime.Now.AddHours(2)`, `DateTime.Now.AddDays(10)` and `DateTime.Now.Add(New System.TimeSpan(5, 0, 0, 0))`. Additionally, you can use the US notation to add an exact time, such as 1`2/10/2017 07:40:00`. Automatically correcting this date is available. For example, if you write `8 9 2018 9:0`, it is automatically transformed to `08/09/2018 09:00:00`.
* **Priority** - The priority level of the Queue Item that is added. This property is a criterion for the prioritization of queue items, alongside **Due Date** and **Defer Date**.
* **Queue Name** - The queue where the QueueItem object is to be added. The name is case insensitive, meaning that if in Orchestrator it was defined as "MyFirstQueue", it matches "myfirstqueue". The maximum number of characters is `50`.
* **Reference** - The reference of the Queue Item that is added. The reference can be used to link your transactions to other applications used within an automation project. Additionally, this feature enables you to search for certain transactions, in Orchestrator, according to the provided string.

#### Misc
* **Private** - If selected, the values of variables and arguments are no longer logged at Verbose level.

#### Output
* **Queue Item (Output)** - The queue object that is returned from Orchestrator as a `QueueItemData` object after the queue is created. This object can be passed to the [Wait for Queue Item and Resume](https://docs.uipath.com/action-center/automation-cloud/latest/user-guide/wait-for-queue-item-and-resume) activity in order to suspend the execution of the workflow until the transaction is completed.

## Cross-platform configuration

### Designer panel

* **Orchestrator FolderPath** - The [path to an Orchestrator Folder](https://docs.uipath.com/orchestrator/docs/managing-folders#section-folder-path) different to the one the current process operates in, where you want to create the queue item. To read more on Orchestrator Folders, go [here](https://docs.uipath.com/orchestrator/docs/about-folders). For **Classic** folders, this property can only be used with **Floating Robots** and only if the current user has the correct task privilege in the target folder. For **Modern** folders, **folder path overriding is not supported**. This field supports only strings and `String` variables.
* **Queue Name** - The queue where the QueueItem object is to be added. The name is case insensitive, meaning that if in Orchestrator it was defined as "MyFirstQueue", it matches "myfirstqueue". The maximum number of characters is `50`.
* **ItemInformation** - A collection of additional information about the specific QueueItem that is to be added. The information is stored in the item and is used during a transaction processing. It is recommended to use only primitive values of the following types: Number, Boolean, String and DateTime. The value of string arguments cannot contain the following characters: `[` and `" "`. Argument names cannot contain the following characters: `:`, `.`, `,`, `@`, `"`.
* **Priority** - The priority level of the Queue Item that is added. This property is a criterion for the prioritization of queue items, alongside **Due Date** and **Defer Date**.
* **Queue Item (Output)** - The queue object that is returned from Orchestrator as a `QueueItemData` object after the queue is created. This object can be passed to the [Wait for Queue Item and Resume](https://docs.uipath.com/action-center/automation-cloud/latest/user-guide/wait-for-queue-item-and-resume) activity in order to suspend the execution of the workflow until the transaction is completed.

### Properties panel

#### Input
* **Reference** - The reference of the Queue Item that is added. The reference can be used to link your transactions to other applications used within an automation project. Additionally, this feature enables you to search for certain transactions, in Orchestrator, according to the provided string.
* **ItemInformationCollection**
  - Enables importing an entire dictionary of information for a queue item. This field accepts `Dictionary<string, object>` variables only.
* **Postpone** - The timestamp after which the queue item may be processed. This property is a criterion for the prioritization of queue items, alongside **Priority** and **Due Date**. This property can be filled in with relative timestamps such as `DateTime.Now.AddHours(2)`, `DateTime.Now.AddDays(10)` and `DateTime.Now.Add(New System.TimeSpan(5, 0, 0, 0))`. Additionally, you can use the US notation to add an exact time, such as 1`2/10/2017 07:40:00`. Automatically correcting this date is available. For example, if you write `8 9 2018 9:0`, it is automatically transformed to `08/09/2018 09:00:00`.
* **Deadline** - The timestamp before which the queue item should be processed. This property can be filled in with relative timestamps such as `DateTime.Now.AddHours(2)`, `DateTime.Now.AddDays(10)` and `DateTime.Now.Add(New System.TimeSpan(5, 0, 0, 0))`. Additionally, you can use the US notation to add an exact time, such as `12/10/2017 07:40:00`. Automatically correcting this date is available. For example, if you write `8 9 2018 9:0`, it is automatically transformed to `08/09/2018 09:00:00`.

:::note
The **FolderPath** property must be used **only** if the queue item must be created or queried from a folder different than the current one. If the user performing this action does not have the required permissions for the target folder, queue item creation fails and throws a critical error. You can view more info on Folder Permissions [here](https://docs.uipath.com/orchestrator/docs/about-folders#section-roles-and-permissions-for-folders).
:::

* **Priority** - The priority level of the Queue Item that is added. This property is a criterion for prioritizing queue items, alongside **Due Date** and **Defer Date**.
* **Queue Name** - The queue where the QueueItem object is to be added. The name is case insensitive, meaning that if in Orchestrator it was defined as "MyFirstQueue", it matches "myfirstqueue". The maximum number of characters is `50`.

#### Misc
* **ContinueOnError** - Specifies if the automation should continue even when the activity throws an error. This field only supports Boolean values (True, False). The default value is False. As a result, if the field is blank and an error is thrown, the execution of the project stops. If the value is set to True, the execution of the project continues regardless of any error.
  :::note
  If this activity is included in **Try Catch** and the value of the **ContinueOnError** property is True, no error is caught when the project is executed.
  :::
* **TimeoutMS** - Specifies the amount of time (in milliseconds) to wait for the activity to run before an error is thrown. The default value is 30000 milliseconds (30 seconds).
