
4/13/2023
What this post added
This post details the implementation of a flexible order routing system using "routing rules" and Shopify Functions. It explains how routing rules are defined as functions that rank inventory locations based on criteria like proximity and destination market. The system uses a pipeline pattern for processing and a reducer to break ties between equally ranked locations. Three default routing rules (ship from closest, stay within destination market, ranked locations) were built using Rust and deployed as Shopify Functions, demonstrating dogfooding of the Functions feature.