Add bulk queue item error Operation returned an invalid status code 'BadRequest'

i want to add 42k row in queue so i used bulk queue item but i am getting issue
Operation returned an invalid status code ‘BadRequest’

@Ananya1 What do you mean by 42k row? Is it a Datatable ?

yes it is datatable which has 42k rows

@Ananya1 You might need to Serialize it and Add the Datatable as an Object to Queue and then Deserialize and Take the Datatable while using Retrieving Queue items. Can you tell us why do you want to add a Datatable as a Queue item. A Short Explanation of your process might confirm the Use of Serialization.

1 Like

What is serialization? and how to do that after reading data from data table

@rajat_dhammi You can Serialize the data to a json format and Convert it to a String, so that you can use transfer the String type data to the Queue instead of transferring a Datatable which is not possible. Then When you want to get the Datatable from the Queue you can Deserialize it back to a Datatable format. In this way transfer of different types of data to a Queue can be done.

strDT = NewtonSoft.Json.JsonConvert.SerializeObject(DT)

DT = NewtonSoft.Json.JsonConvert.DeserializeObject(Of System.Data.DataTable)(strDT)

1 Like

But i am using a Bulk Add queue items, to add excel data to queue.
and in Bulk add queue items, we have to provide data table, string variable will not work.

@rajat_dhammi If you use Bulk Add Queue Items Each row in Datatable will be added as a Queue Item. When you use Get Transaction Item to get the Queue Items You will get each row value and not the Whole Datatable. In case when you want the whole datatable to be retrieved at once from a Single Queue Item you can use Serialization method.

Apart from that it depends on what actually you are doing in the process.

i am just trying to add data on queue.
I used read range to read excel data and then used bulk add queue item to add that data to queue.
But i got the error Bulk Add Queue Items: Operation returned an invalid status code ‘BadRequest’

Can you help in me in this?
I have earlier also used bulk add queue item , but this time its not happening

@rajat_dhammi Not Sure why that is happening, I tried and it worked. What does your Datatable contain? How many rows does it have ?

just this , nothing much


The ‘BadRequest’ means, that the Orchestrator is blocking the activity to add queue item, because it’s not meeting the criteria. This could have multiple reasons. For me it was solved by changing the Unique Reference settings, for the queue in the Orchestrator, from Yes to No, the error was solved.

Other points might be mentioned in this post:

1 Like

The documented maximum queue items Bulk Queue Item can add at a time is 15,000. To overcome this limitation you can create a For Each and create one queue item at a time. The undocumented limitation on this method is ~90k queue items. Alternatively, for a much higher quantity you can loop through Add Bulk Queue Items, creating 15k queue items at a time. I would recommend activating the setting “AllorNothing” if using the last method.

Hello Andrew,

Am facing the same issue with bulk add queue items i have a table that contains +26k rows so i guess that’s the problem.
Your solution was to use for each on bulk add queue items but i didn’t know how to do it can you help pleasd?


  • You cannot have “.” or other special characters within the header names
  • Remove spaces in between header names also
  • If you have the same name column headers, rename them to unique names

Then you will able to upload this file without any issues. and if you want to add the reference to the queue, just add the column name “Reference” and upload.