Flow Automation: Querying Orders in Batch
You can use the Batch query order executor in Flow Automation to retrieve a targeted list of orders based on filters such as customer email, creation time range, payment or fulfillment status, and more. This lets you drive downstream steps—like cancelling unpaid orders, tagging in-progress orders, or sending notifications—without manually searching in the admin, helping your team automate routine reviews and follow-ups with confidence.
This guide explains when to use the action, how to test it end to end, and provides a practical example for automating communications and updates.
| Note: The action is read-only and returns up to 100 matching orders per run. |
Field Descriptions
| Field | Description |
| Query Conditions |
Filters applied when running a batch search:
|
| Sort By | Sort results by order creation time: Most recently created order (descending) or Earliest order created (ascending). |
| Maximum Result Limit | Returns up to 100 orders per run. |
Supported Triggers
You can add the Batch query orders executor to workflows started by the following triggers. Click on any trigger name to view its setup instructions:
- Scheduled Time
- Bulk Order Operation
Example Use Case
Here is a practical example of using the Batch query order executor to automatically tag unpaid orders for follow-up:
- Trigger: Order creation trigger
- Delay: 5 minutes
-
Action: Batch query order
- Query Condition: Specific Order IDs
- Result Sorting: Most recently created order
- Quantity to keep: 100
- Condition: If payment status is unpaid
- Action: Cancel Order
Available Templates
Here is a ready-to-use template that incorporates this executor. Click the template to view or apply it:
- Tag incomplete orders: On a daily or weekly schedule, run Batch query order to retrieve up to 100 orders with status Processing, then add tags so your team can quickly identify and handle exceptions. You can customize the delay to match your process for managing and tracking these orders.