Optimize E-Commerce Fulfillment Cost With Machine Learning-Based Order Routing

1 December 2025 - ID G00838260 - 13 min read
By Chap Achen
The rising costs of last-mile fulfillment, combined with increasing consumer expectations for fast and free shipping, are creating significant challenges to retailers’ bottom lines. Customer fulfillment leaders can utilize advanced order routing decision engines to enhance cost-to-serve, speed, inventory utilization, and product margin.

Insights at a Glance


Retailers face challenges from rising last-mile fulfillment costs and operational complexity as the share of e-commerce revenue continues to increase. Machine learning (ML)-based e-commerce order routing engines, built to address these challenges, have been on the market for over five years. However, due to data challenges and a lack of model transparency, their success has been limited.
ML-based sales order routing is now proving retailers can successfully balance cost reduction, inventory optimization, and superior customer experience, but only when customer fulfillment leaders bring high-quality data paired with a model capable of building user trust through robust transparency.
Retailers should start with simple, quantifiable objectives (like fulfillment cost reduction) before expanding to more complex targets (such as markdown avoidance). Running ML models in an offline mode or in a pilot prior to full deployment helps validate results against production-level data and builds trust. Key metrics include fulfillment cost per order, capacity utilization, full price sales, and inventory turnover.
Recommendations for greater success:
  • Invest in developing an end-to-end process for model maintenance.
  • Monitor data continuously for quality assurance.
  • Vet technology vendors through a business case simulation using your own data.

Impact Brief


Unified Commerce Retailers are under significant pressure to meet consumers’ fulfillment expectations amid increasing network complexity and rising last-mile fulfillment costs.
  • Consumers cited fast, free shipping as the top two reasons they shop on a particular website platform,1 yet 51% of organizations stated that last-mile shipping costs have worsened/significantly worsened in the last two years.2 This dynamic is creating a material impact on retailer profitability, as e-commerce now makes up 20% of overall sales volume in many retail sectors.3
  • Fulfillment networks now involve stores and fulfillment centers to improve speed and inventory utilization, which creates routing complexity to address these multiechelon objectives.
Despite these significant shifts in the retail landscape and the availability of ML-based models to address them, customer fulfillment leaders continue to use static rules to drive routing decisions that optimize across a limited number of objectives. This has largely been a result of not having access to accurate data and a “black box” approach to model deployment, where users are unclear about how the model is making decisions. By addressing these gaps, customer fulfillment leaders can maximize fulfillment efficiency across a broader set of KPIs and respond to the profit pressures created by increasing online consumer spending.

Actions and Cautions


The following actions and cautions will strengthen the chances of model success and help navigate the change management challenges you will face.

Actions

  • Conduct a fulfillment network analysis of past shipments to create the baseline for the business case.
  • Validate vendor benefit claims using your own data in the sales cycle to ensure that they can optimize against your KPI goals.
  • Train the model using current orders and run multiple scenarios to identify the ideal weightages against the KPIs targeted for improvement.
  • Develop an end-to-end business process that outlines how this model will be maintained, including all stakeholders impacted.

Cautions

  • Watch out for unwanted shipment upgrades: Many retailers make specific date-based promises to consumers. For ML-based routing engines to work, a decision must be based on the same or a subset of these rules. This prevents shipment upgrades from meeting a promise made based on a different set of rules.
  • Ensure quality data inputs: Inaccurate promotional pricing and incorrect available inventory details are typically the biggest data issues retailers uncover during this process.
  • Beware the “edge case” naysayer: ML routing optimization will attract those who will look to find fault with the model. Ensure model transparency is available so these users can see what data was used to execute the routing decision through named super users who can confidently interpret the results and justify the model’s choices.

How to Execute


Leading retailers and distributed order management (DOM) vendors are now demonstrating that ML-based routing models are fully capable of addressing the complexities of unified commerce fulfillment. Customer fulfillment leaders should be aggressively evaluating their potential when there is high network complexity across stores and fulfillment centers.

Ulta Beauty leveraged IBM Sterling Intelligent Promising (SIP) to drive fulfillment efficiency

Ulta Beauty, the largest beauty retailer in the United States, has a complex network of fulfillment capacity to support e-commerce shipments that includes market fulfillment centers (FC), distribution centers (DC), and Stores, but the rules used to route orders across these nodes were only optimizing on split reduction (ship the order complete where possible) and physical distance to the consumer. This prevented unlocking the full value of the store and the FC/DC network to optimize cost-to-serve and offer competitive speed to meet guest promises.
Ulta Beauty implemented IBM’s Sterling Intelligent Promising (SIP), an ML-based order routing optimization engine. The model includes five outcomes, each of which can be weighted between 0 and 100%.
  • Shipping cost (carrier cost)
  • Processing cost (labor cost to prepare an order for shipping)
  • Load balancing across fulfillment locations
  • Stockout avoidance (prevent a store node from going out of stock)
  • Markdown avoidance (known markdown event in the upcoming weeks)
Ulta Beauty took the following steps to implement the ML model:
  • They analyzed past performance and determined improvement levels in each outcome they hoped to achieve.
  • Each of the five outcomes above was introduced iteratively and in the order they appear above. This was done in “passive mode,” where the model made decisions on order fulfillment in a test environment.
  • Ulta Beauty fine-tuned the goals over a five-month period during the holiday season to gain confidence in the model’s results.
IBM reports that customers typically achieve savings of between 2% and 6% by reducing out-of-stock inventory and markdown costs. Combined with fulfillment optimization, customers report reductions in shipping costs of between 4% and 8%.
Rachel Belano, VP Supply Chain Operations, Ulta Beauty
“ML-based routing has strengthened our supply chain capabilities by allowing us to meet multiple objectives across fulfillment efficiency, inventory utilization, and guest experience. Leveraging passive mode during a full holiday season prior to launch built trust and was a key component of our success.”

Conduct a Root Cause Analysis to Identify KPI Improvements

A root cause analysis of past shipments that identifies poor routing decisions (at least six months) accomplishes two goals:
  • Identifies the baseline for the business case for ML-based routing.
  • Aligns the organization with the collaboration needed to accomplish it.
With these ML models, retailers can evaluate margin, inventory turnover, and lost sales as part of the analysis. As a result, this will likely be the first time the fulfillment team will be collaborating with the merchant team to avoid markdowns. A comprehensive optimization must leverage data beyond the traditional scope of order fulfillment, and this cross-functional engagement in business case development sets the stage for achieving this broader collective outcome. See Figure 1 for typical outcomes that can be optimized for in an ML-based routing model.
Figure 1: ML-Based Order Routing Optimization Inputs
Describes the 5 elements that a typical ML engine can optimize on.
The following is a list of common strategies that an ML model can execute to help drive improvements in fulfillment efficiency:
  • Control the distribution of orders across the store and DC network to balance speed and cost through labor schedule-informed capacity settings.
  • Make decisions on comprehensive processing costs, including accurate carrier rate data and labor costs at each node.
  • Evaluate replenishment schedules to stores and sales velocity to minimize the risk of missing an offline sale at a store and avoid split shipments (stockout avoidance).
  • Consider the future markdown schedules at the SKU/node level as a lever to prioritize fulfillment decisions and avoid margin loss (markdown avoidance).
  • Use delivery speed as a constraint to model recommendations.
While the network analysis is not technically required to implement a model, it will provide valuable context to justify “why are we doing this” and help navigate change management issues that will arise throughout the project.

Evaluate Vendor Solutions for ML-Based Routing

Once you have identified the possible opportunities for routing improvements, this will be used as input to survey vendor applications. There are a number of options in the market:
  • Distributed order management (DOM) vendors. If your current DOM vendor doesn’t offer a solution, it is likely that one is in their roadmap. As of December 2024, 17 DOM vendors reported investments in ML-based routing. See our Market Guide for Distributed Order Management Systems for a list of representative vendors.
    • Composable modules from DOM vendors. Specific routing modules from DOM vendors can integrate with your current order fulfillment process.
  • System integrator (SI) partners who specialize in DOM implementations could deliver a custom model to work with your existing DOM.
  • Current AI/ML vendor that is supporting other AI/ML activities in your enterprise.
As you evaluate solutions, where appropriate, you should be asking these providers to demonstrate actual improvements through a simulation of the data you gathered in the fulfillment network analysis. This may be through a proof of concept on production-level data or an offline analysis. If securing the necessary data is too challenging, a recent case study with similar data from another retailer can be used as a proxy.

Identify Data Required Based on Expected KPI Improvements

Traditional order routing rule sets typically do not evaluate the amount of data that ML models can handle; therefore, it is likely that some of your data will be new, or, in most cases, it will require more granularity. In the case of new datasets, engage with your merchant and planning teams to identify existing data that could be leveraged. The following datasets, as shown in Table 1, are typically required to fully optimize fulfillment efficiency, inventory, and margin outcomes:

Common Datasets Required by ML-Based Routing Models

Data
Description
Replenishment schedules
Schedule of replenishment into store locations
Labor schedules
Labor hours scheduled per day to handle the fulfillment of e-commerce demand
Fulfillment units per hour
The quantity of units per hour a fulfillment node has the capacity (store/fulfillment center) to process
SKU price
Full price and sales (markdown) price
Product sales from transactional systems
SKU sales velocity by day/node
Returned inventory indicator
An identifier to indicate returns stranded at stores to help prioritize node selection
Carrier costs
ZIP Code/postal code rates based on the item’s weight or dimensional weight that include fuel and accessorial surcharges
Labor costs
Hourly labor rates for FCs and stores
Average processing time
The hours it takes for a node to process a shipment from receipt to label generation
Promise delivery date
A constraint on the order that the ML model will need to consider
Source: Gartner (December 2025)
This data does not have to reside in the routing engine, but it must be made available to it at some frequency based on its variability. For example, many retailers are using carrier rates that are only updated annually, but the frequency of rate changes is now increasing, which will compromise the quality of the routing decision if unaddressed with more frequent updates.

Train the Model Across Multiple Order Profiles and Outcome Weightings

It is recommended by Gartner to start with a simple model focused on one outcome that has hard, quantifiable savings, such as shipping costs or node processing costs. This builds confidence in the early rounds of model training with verifiable savings. Some models will work “offline” to be trained with order data, whereas others can run in production in “passive” mode, evaluating orders against live data. This passive mode approach is recommended because it runs against production data and makes a decision at exactly the same moment your current rules are evaluating the order. Coupled with the ability to inspect these decisions before production deployment (model transparency), this builds user confidence.
This process is paired with order profiles across peak and nonpeak periods, ideally a three- to six-month time frame. While a model can be trained and start providing routing decisions in as little as two weeks with order data, it will improve with larger datasets that reflect nuances created by peak loads, delivery time variations, promotional events, and a full selling season. Gartner strongly recommends using a holiday period as part of this analysis, given that increased volumes typically create network constraints not present in normal volumes that the model should be trained on.

Build an End-to-End Process for ML Model Maintenance

Given the new data sources and the ability for businesses to easily tweak the model outcomes, ensure that your implementation includes developing a business process for ongoing oversight of performance and quality of data inputs. The following are the best practices Gartner sees:
  • Regular data audits for both accuracy and integrity across the applications in scope.
  • Communication of any changes to the data or data structures that the model uses by data owners.
  • Named resources that will own model monitoring and continuous improvement.
  • A documented business process established across all impacted stakeholders, with ongoing stakeholder engagement to report progress and resolve any issues.

Success Measures


ML-based order routing decisions are a highly effective tool in improving the following metrics:
Fulfillment cost per order = Labor cost + shipping cost / total no. of shipped orders
Fulfillment capacity utilization (%) = (Actual fulfillment volume / maximum capacity) × 100
Product gross margin (%) = [(Product revenue − product COGS) / product revenue] × 100
Inventory turns = Cost of goods sold (COGS) / average inventory
  • Cost of goods sold (COGS): The total cost of goods that were sold during a specific period.
  • Average inventory: The average value of inventory held during the same period, typically calculated as (beginning inventory + ending inventory) / 2.

Evidence


1 2025 Gartner Consumer Omnibus Survey. The purpose of this survey was to understand consumer behaviors and sentiment across a wide range of topics and industries that included shopping behaviors, brand communications, loyalty, pharmacy, and banking. The research was conducted online from 11 through 31 March 2025 among 2,000 respondents in the United States. Respondents were required to be at least 18 years old. Quotas were set for geographic areas, age, gender, ethnicity and employment status to approximate the U.S. adult population as a whole.
2 2023 Gartner Last-Mile Operations and Customer Expectations Survey. Gartner sought to understand last-mile delivery expectations and how last-mile operations are carried out within the organization. We sent invitations to complete an online survey to Gartner clients, community members, and a wider group of practitioners in logistics and other functions globally and received 51 complete responses from 28 October 2022 through 16 January 2023. Respondents were spread across multiple industries, including manufacturing (n = 15), retail and wholesale (n = 11), technology and telecom (n = 7), life sciences (n = 5), healthcare (n = 3), banking and finance (n = 1), communications and media (n = 1), services (n = 1), transportation (n = 1), and others (n = 6). There were 28 organizations with a B2B business model, nine with a B2C business model, and 14 with a roughly equal mix of both B2B and B2C business models. There were 25 organizations with at least $5 billion in annual revenue and 26 with less than $5 billion.
These insights are based on client inquiries and interviews with Ulta Beauty business and technical stakeholders and the IBM Sterling Product Management team.
Disclaimer: The organization (or organizations) profiled in this research is (or are) provided for illustrative purposes only, and does (or do) not constitute an exhaustive list of examples in this field nor an endorsement by Gartner of the organization or its offerings.