Bulk action not working for more than 50 orders selected.

LukaszWiktor
Shopify Partner
247 13 71

My app adds a bulk action to the Orders list. You can select multiple orders, click on More actions and then Process in Exporteo. Shopify passes the selected orders IDs in a query parameter. It works fine if you select less than 50 orders. However, if you select all orders, then Shopify doesn't pass any IDs. I could assume that if there is no ids[] query param, then the app should process all orders, but... a user can specify a filter on the Orders admin page, and then select all orders matching the filter, still resulting in more than 50 orders selected. In such case, Shopify doesn't pass the selected ids nor the specified filters. Is there any way to capture the filters from the Orders page? Or any other way to determine which orders to process when more than 50 are selected?

 

image.png

chrome dev console - request detailschrome dev console - request details

I'm a software engineer. I make things happen automatically.
Check out my apps Exporteo and Personal Discount.
Replies 8 (8)
LukaszWiktor
Shopify Partner
247 13 71

@_JCC_ can you have a look at it? Is this a bug or an overlooked case?

I'm a software engineer. I make things happen automatically.
Check out my apps Exporteo and Personal Discount.
markigno
New Member
2 0 0

@LukaszWiktor @_JCC_ 

I am currently facing exactly the same problem developing my app.

Did you find any solution or workaround for this issue?

Thank you

LukaszWiktor
Shopify Partner
247 13 71

@markigno unfortunately, I haven't found any solution for this issue.

I'm a software engineer. I make things happen automatically.
Check out my apps Exporteo and Personal Discount.
markigno
New Member
2 0 0

Thank you for your reply!

MarcoRenzi
New Member
1 0 0

Hi @_JCC_!

We're facing the exact same issue and your API documentation is not reporting this behavior (https://shopify.dev/apps/app-extensions/bulk-actions). Can you please confirm that this is not an issue and that there is no workaround to have this working for more than 50 selected orders? This will be much appreciated since we're trying to integrate with Shopify and this was a very unexpected behavior, let me say, badly documented.

Thanks! Looking forward to hearing from you.

MR

_JCC_
Shopify Staff
163 22 29

Hey Everyone,

First, I just wanted to apologize for my late reply especially to @LukaszWiktor who's initial ask went unanswered for some time now.

I'd like to get a better understanding of the use case each app has in their reasoning to want to update all orders. You don't need to share publicly, feel free to DM me if you prefer. As you can imagine for some of our larger merchants updating all orders could mean hundreds of thousands of orders. From an API perspective we don't currently provide a bulk entry point for order update so performance is naturally a concern here.  

Regards,

John

 

 

 

John C | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

LukaszWiktor
Shopify Partner
247 13 71

Hey @_JCC_ ,

Thanks for your response! No problem, I can share the details publicly.

It's not about updating orders. In my case the app needs to get the selected orders to be able to export them further (convert to a configured file format, and send to a given destination). Normally, Exporteo processes orders automatically, either on the fly or at a scheduled time. However, sometimes merchants want to export selected orders manually, on demand. They either select the orders one by one, or specify filters, and then select all orders matching the filters. For example, all orders from last week or last month, which is often more than 50 orders. If it's more then 50 orders, then Shopify doesn't pass any selected orders IDs to the app. I realize that in extreme cases there may be thousands, or even hundreds of thousands of orders. I'm also aware that passing all IDs in the URL query params would be inefficient. It would take too long, and cause trouble with the URL length. However, it would be sufficient if the app could get the specified filters. The app could then process the orders matching the filters in a background job.

Thanks,
Lukasz

I'm a software engineer. I make things happen automatically.
Check out my apps Exporteo and Personal Discount.
cesaredamico
New Member
1 0 0

Hello @_JCC_,

I'm taking the lead from @MarcoRenzi and @markigno to explain our use case. On our end, we need to export new orders to Route Manager to create routes to deliver the orders that our customers received on Shopify. After importing the orders, we'll tag them and export back some data to Shopify as the orders are processed in our systems.

Hope this clarifies our use case, if you need more info please let me know. Thanks!