Enforce Unique References behaves incorrectly

Hi Team,

I have created a new queue with the Unique Reference option enabled and set the retention period for completed items to 30 days.
However, when I try to add a new queue item, I receive the error:
“Duplicate reference found.”
I have verified that the reference value does not currently exist in the queue. Could anyone please help me understand why this error is occurring and how it can be resolved?

Hi @harshada.kauthale

When Unique Reference is enabled, UiPath checks existing queue items, including completed items within the retention period.

Please check if the same reference exists in any status. If yes, use a different reference or remove the old item if applicable.

@harshada.kauthale welcome to community!

This issue you are facing due to The item might be deleted or that item is available any other folder.

Go through below thread, similar problem that what you are facing now, this might help you understand clearly,

Let me know if this works

Hi @harshada.kauthale Weclome to community!

Please check the below thread,

Happy Automation

Hi @harshada.kauthale,

When Unique Reference is enabled, Orchestrator checks the reference value against all items that haven’t been purged yet and not just items currently visible as New/In Progress. That includes, all Successful, Failed, Retried, Abandoned and Deleted items that are still within the 30-day retention period.

To confirm, go to the queue’s Transactions view and clear all status filters then, search for the exact reference value. Also, check for trailing spaces or case differences, the reference uniqueness check is case-insensitive.

Cheers!

Hi @harshada.kauthale ,
Try these below steps:

  1. Search the queue for the reference across all item statuses (New, Successful, Failed, Deleted).
  2. Check whether the same reference was used in the last 30 days (your retention period).
  3. If the reference already exists, use a different unique reference value.
  4. If business allows reuse of references, consider disabling Unique Reference or waiting until the retained item is permanently removed after the retention period.

Thanks

Thank you all for your quick responses,
I searched the queue by removing all filters and checking all statuses, but I still cannot find some of the references. However, I continue to receive the “Duplicate reference found” error, even though the retention period is configured.

Adding a timestamp to create a new reference is not a suitable workaround, as my requirement is to prevent reprocessing records that have already been processed within the last month.

Creating a new queue with Unique Reference disabled is also not a feasible option, as it could lead to duplicate processing, increase the daily volume, and require additional effort to manage.

Hi @harshada.kauthale

I think when the reference already exists in the queue and is still considered unique by Orchestrator. Even if the item is not visible in the current queue view, it may exist in historical data and remain within the configured Unique Reference retention period. The same reference cannot be added again until the retention period expires

Happy Automation

Hi @harshada.kauthale,

This is actually expected behaviour, not a bug.

When ‘Unique Reference’ is enabled in Orchestrator Queue, UiPath doesn’t just check “New” items. It checks the reference against all items in the queue, including ones that are already processed (Successful or Failed).

You have set retention to 30 days, which means completed items stay in the queue for 30 days before they are deleted. So if that reference was used even once before, Orchestrator finds that an item with same reference is already present and throws ‘Duplicate error’.

You can do perform steps to check on the issue:

  • Open the queue, remove any status filter, and search for that exact reference. Look in all statuses, not just New.
  • If you find it there, either wait for it to auto-delete after 30 days, or delete that item manually if you need to reuse the reference now.
  • Also check for extra spaces in the reference, sometimes it looks unique but isn’t.

Deleted items don’t count towards unique references fyi. Its actually good that you can do this in order to clear a reference so you can use it again if you want.

That’s the exact feature we intended to use. Once the retention period expires, we should be able to reuse the same account for processing. However, my main concern is that if the account no longer exists in the queue, why am I still getting a ‘Duplicate Reference Found’ error? The account is not present in the queue under any status.

Yeah, but I dont think that queue item is actually deleted. Its just not visible in the current orchestrator stuff, but perhaps the reference is stashed somewhere, which could make sense.

I realize the retention policy wording makes that confusing, but I think some data o the queue item persists, similar to how the data can be available for UiPath Insights.

A real delete, when you manually delete the item and can see the deleted item in the queue, doesn’t block another queue item with a unique reference.

In most cases, I imagine the reference integrity being enforced despite the rentention period passing would be desirable, so it makes sense to be done that way.

Your use case is obviously different where you effectively only want to enforce the unique reference for 30 days I guess?

Yes, Only want to check last 30 days data, and after that reprocess it, if it comes.

Hi @harshada.kauthale, retention doesn’t free the reference the way a manual delete does. The queue retention policy keeps unique references so the duplicate check still works after items are deleted or archived, which is why you get Duplicate Reference with nothing showing in any status filter. Deleting the item manually drops it from the check, but retention alone won’t. For “block 30 days, then allow again,” Unique Reference isn’t the right control, so you’d check recent items yourself before adding. Queue item retention policy