The gap Flow leaves
Lesson 1 ended at a wall. Flow reacts to events that have already happened, so it cannot answer questions like these:
- "Wholesale customers buying 50 or more units get 15 percent off, calculated live in the cart."
- "Hide express shipping for orders containing a hazardous item."
- "Do not show cash on delivery to customers with a failed payment history."
- "Block checkout if the cart mixes frozen goods with a pickup location that has no freezer."
Every one of these must happen while the customer is checking out, before the order exists. There is no event to react to yet, because the thing you want to influence is the thing in progress. Tagging the order afterward is useless; the customer already saw the wrong price.
This is the difference between reacting and participating. Flow watches the store and responds. Shopify Functions run inside the platform's own decision-making, at defined points in the commerce lifecycle, and change the answer the platform produces.
That is a genuinely different capability, and it raises an obvious engineering problem. You want merchant code executing in the middle of checkout, on Shopify's infrastructure, during the highest-stakes seconds of the whole business, on a platform serving enormous traffic. That code must be fast, safe, and unable to take anything down.
How you solve that problem determines the architecture, and it is why Functions look the way they do.

