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?
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.
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.
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.
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!