Start with one workflow that costs the most manual time. Prove value there before expanding.
In a small store, these decisions are made manually by a team member reviewing each order. At higher volumes, manual review creates a bottleneck that delays fulfillment, introduces inconsistency, and occupies staff time that could go elsewhere.
AI order classification reads the order data, shipping address, order contents, customer history, note from customer, payment method, and makes these routing decisions automatically based on rules you define. The difference between rule-based automation (Shopify Flow) and AI classification is that AI handles edge cases that rule-based logic misses. A customer note saying “please use the fragile sticker on this one” does not match a standard fulfillment rule, but an AI classifier can recognize it and apply the fragile-handling tag.
Setting up the classification logic
The first step is to document the decisions you currently make manually. For each decision, write down: what inputs you look at, what categories the outcome falls into, and what the edge cases are. This documentation becomes the AI system prompt.
A classification prompt for order routing takes the form: here is an order. Based on the following criteria, assign one or more of these tags: [list of possible tags with definitions]. If the order does not clearly fit any category, assign “needs-review.” Return only the tags as a JSON array.
The “needs-review” fallback is important. An AI classifier that assigns a tag to every order with 100% confidence is not reliable, some orders genuinely require human judgment. The system should route uncertain cases to a review queue rather than making a potentially wrong automated decision.
Based on the following criteria, assign one or more of these tags: [list of possible tags with definitions].
Working on something similar?
Let's talk →The integration with Shopify
Working on something similar?
Let's talk →Order classification runs via a Shopify webhook. When a new order is created, Shopify sends the order data to a webhook endpoint, which calls the AI classification function and returns the results. The function then applies tags to the order via the API integration, the Shopify Admin API’s order update endpoint.
For a Shopify store that uses Shopify Flow for downstream automation, the AI-applied tags trigger the appropriate Flow workflows automatically. The AI handles the classification; Flow handles the routing action.
Measuring the time saved
Before building this, estimate the current manual review time. Count how many orders per day require tagging decisions, multiply by the average time per decision, and multiply by the number of working days per month. This gives a baseline.
After the system is running, measure the rate at which orders are routed to “needs-review”, this is the residual manual workload. The difference between the baseline and the residual is the time the system saves. If the residual is higher than expected, the classification prompt needs adjustment.

