v2.0

GoRules Version 2 is here - redesigned, now with managed cloud.GoRules Version 2 is here!

Watch the launch videoWatch

Order Consolidation System

Smart logistics system that optimizes shipping by combining orders based on location proximity, delivery timeframes, and available carrier capacity.

Solution

This logistics optimization system analyzes order pairs to determine when consolidation makes economic and operational sense. It evaluates key shipping factors including geographic proximity between delivery destinations, compatibility of requested delivery windows, and available carrier capacity. When these criteria align favorably, the system categorizes consolidation opportunities into high, medium, or low priority levels.

For qualifying order pairs, the system calculates important metrics including combined shipment weight, expected fuel savings, and total cost reduction estimates. Based on consolidation priority, the system recommends specific actions ranging from immediate consolidation to optional consolidation pending customer approval. High-priority consolidations proceed automatically, while medium-priority ones may require scheduling adjustments. Low-priority opportunities undergo additional review and customer confirmation before processing. The system maintains delivery quality standards while reducing transportation costs and environmental impact.

How it works

The decision system follows a structured evaluation process:

  1. Factor Assessment: Analyzes the distance between delivery locations, difference in requested delivery times, and carrier capacity.
  2. Priority Assignment: Categorizes consolidation potential as high, medium, low, or none based on predefined thresholds.
  3. Metrics Calculation: Computes combined order weight, expected fuel savings, and estimated cost reductions.
  4. Processing Route Selection: Routes orders to appropriate handling pathways based on consolidation priority.
  5. Action Determination: Assigns specific consolidation actions (immediate, scheduled, optional, or none).
  6. Delivery Scheduling: Creates optimized delivery schedules with appropriate customer notification requirements.
  7. Savings Reporting: Generates detailed cost savings reports showing fuel, labor, and total savings estimates.

Where teams use it

  • E-commerce fulfillment centers
  • Third-party logistics providers
  • Retail distribution networks
  • Food and grocery delivery services
  • Industrial supply chains
  • Last-mile delivery optimization
  • Warehouse management systems
  • Regional carrier operations

Inside the decision model

Order Consolidation System ships as a JDM decision graph with 8 nodes, 1 decision table and 5 rules. Download it, load it into GoRules, and run it as-is on Zen Engine.

Decision graph8 nodes · read-only
input requesttable evaluateConsolidationFactorsexpression calculateConsolidationMetricsswitch routeByConsolidationPriorityexpression highPriorityProcessingexpression mediumPriorityProcessingexpression lowPriorityProcessingexpression standardProcessing
01

Request

input

A pair of orders comes in with pre-computed pairing metrics: distanceKm between the two destinations, deliveryWindowDifferenceHours, availableCarrierCapacity, and the individual orderWeight1 and orderWeight2, plus the full orders array and carrierDetails for reference. The priority table works entirely off the three pairing metrics.

Sample requestJSON
{
  "orders": [
    {
      "orderId": "ORD-12345",
      "customerName": "John Smith",
      "deliveryAddress": {
        "street": "123 Main St",
        "city": "Springfield",
        "state": "IL",
        "zipCode": "62704",
        "coordinates": {
          "latitude": 39.7817,
          "longitude": -89.6501
        }
      },
      "requestedDeliveryDate": "2025-03-25T14:00:00Z",
      "orderWeight": 12.5,
      "orderItems": 3
    },
    {
      "orderId": "ORD-12346",
      "customerName": "Jane Doe",
      "deliveryAddress": {
        "street": "456 Oak Ave",
        "city": "Springfield",
        "state": "IL",
        "zipCode": "62702",
        "coordinates": {
          "latitude": 39.8021,
          "longitude": -89.6443
        }
      },
      "requestedDeliveryDate": "2025-03-25T16:00:00Z",
      "orderWeight": 8.2,
      "orderItems": 2
    }
  ],
  "distanceKm": 35,
  "deliveryWindowDifferenceHours": 24,
  "availableCarrierCapacity": 4,
  "orderWeight1": 12.5,
  "orderWeight2": 8.2,
  "carrierDetails": {
    "carrierId": "CAR-789",
    "maxCapacity": 500,
    "currentLoad": 320
  }
}
02

Evaluate Consolidation Factors

table

Consolidation priority falls out of three factors read together under a first hit policy: distanceKm, deliveryWindowDifferenceHours, and availableCarrierCapacity. Destinations under 50km apart with windows within 48 hours and capacity above 3 rate 'high'; two 'medium' rows relax either the time gap (up to 72 hours) or the distance (up to 100km); under 100km with up to 72 hours and capacity above 1 still earns 'low', and the blank catch-all returns 'none' with the explanation that orders cannot be consolidated. Each row also emits a plain-language explanation field.

The graduated relaxation is the realistic part: consolidation only pays when the detour between drops is small relative to the line-haul, so distance gets the tightest bounds, while a 72-hour window difference is workable because one customer can usually be nudged a day. Requiring spare carrier capacity above a floor keeps the combined load from bumping other committed freight; the specific 50/100km and 48/72-hour cutoffs are business tuning rather than any industry standard.

Decision tablefirst hit policy
Distance (km)distanceKmDelivery Window Difference (hours)deliveryWindowDifferenceHoursAvailable Carrier CapacityavailableCarrierCapacityConsolidation PriorityconsolidationPriorityExplanationexplanation
< 50< 48> 3'high''Orders are nearby, delivery window compatible, and carrier has capacity'
< 50< 72> 2'medium''Orders are nearby with slightly different delivery windows but carrier has capacity'
< 100< 48> 2'medium''Orders are reasonably close with compatible delivery windows and carrier has capacity'
< 100< 72> 1'low''Orders are reasonably close with slightly different delivery windows and minimal carrier capacity'
---'none''Orders cannot be consolidated due to distance, delivery timing, or carrier capacity'
03

Calculate Consolidation Metrics

expression

Pair-level metrics get computed before routing: canConsolidate is simply consolidationPriority != 'none', consolidationWeight sums orderWeight1 + orderWeight2, and the savings estimates scale with distance, expectedFuelSavings at distanceKm * 0.15 and costSavingEstimate at distanceKm * 0.25 + 15. Computing these once here lets every priority branch reuse the same baseline and just discount it.

Expressions4 fields
canConsolidateconsolidationPriority != 'none'
consolidationWeightorderWeight1 + orderWeight2
expectedFuelSavingsdistanceKm * 0.15
costSavingEstimatedistanceKm * 0.25 + 15
04

Route By Consolidation Priority

switch

Four branches fan out on consolidationPriority: 'high', 'medium', and 'low' each get their own processing expression, and the default branch handles 'none'. Splitting the flow this way keeps each branch's action, schedule shape, and savings discount independent, so changing how low-priority pairs are handled cannot affect the automatic high-priority path.

Branches4 paths
consolidationPriority == 'high' High Priority Processing
consolidationPriority == 'medium' Medium Priority Processing
consolidationPriority == 'low' Low Priority Processing
otherwise Standard Processing
05

High Priority Processing

expression

High-priority pairs are processed without friction: consolidationAction is 'immediate_consolidation', the deliverySchedule is typed 'consolidated' with notificationRequired false, and the costSavingsReport passes expectedFuelSavings and costSavingEstimate through at full value. No customer touchpoint is needed because both the distance and window checks were already at their tightest.

Expressions4 fields
consolidationAction'immediate_consolidation'
schedulingPriority'high'
deliverySchedule{'type': 'consolidated', 'estimatedDeliveryTime': requestedDeliveryDate1, 'notificationRequired': false}
costSavingsReport{'fuelSavings': expectedFuelSavings, 'laborSavings': costSavingEstimate, 'totalSavings': expectedFuelSavings + costSavingEstimate}
06

Medium Priority Processing

expression

Medium pairs move to 'scheduled_consolidation' with a twist on notification: customerConfirmationRequired flips true only when deliveryWindowDifferenceHours > 24, meaning a customer is asked before their delivery shifts by more than a day. The savings report is haircut to 90% of expectedFuelSavings and 80% of costSavingEstimate to reflect the extra coordination these pairs need.

Expressions4 fields
consolidationAction'scheduled_consolidation'
schedulingPriority'medium'
deliverySchedule{'type': 'consolidated', 'estimatedDeliveryTime': requestedDeliveryDate1, 'customerConfirmationRequired': deliveryWindowDifferenceHours > 24}
costSavingsReport{'fuelSavings': expectedFuelSavings * 0.9, 'laborSavings': costSavingEstimate * 0.8, 'totalSavings': (expectedFuelSavings * 0.9) + (costSavingEstimate * 0.8)}
07

Low Priority Processing

expression

Low-priority pairs become 'optional_consolidation' with additionalReview set to 'required' and customerConfirmationRequired always true; the deliverySchedule is typed 'potential_consolidation' and brackets the range between requestedDeliveryDate1 and requestedDeliveryDate2 rather than committing to a slot. Savings drop to 70% and 60% of the fuel and labor baselines, acknowledging that marginal pairings often lose part of the theoretical gain in execution.

Expressions5 fields
consolidationAction'optional_consolidation'
schedulingPriority'low'
deliverySchedule{'type': 'potential_consolidation', 'earliestDeliveryTime': requestedDeliveryDate1, 'latestDeliveryTime': requestedDeliveryDate2, 'customerConfirmationRequired': true}
additionalReview'required'
costSavingsReport{'fuelSavings': expectedFuelSavings * 0.7, 'laborSavings': costSavingEstimate * 0.6, 'totalSavings': (expectedFuelSavings * 0.7) + (costSavingEstimate * 0.6)}
08

Standard Processing

expression

When no consolidation is possible the fallback keeps both orders independent: consolidationAction is 'no_consolidation', the deliverySchedule is typed 'separate' with each order keeping its own delivery time, and the costSavingsReport zeroes out fuelSavings, laborSavings, and totalSavings. Returning an explicit zero report instead of omitting it keeps the response shape uniform for downstream reporting.

Expressions4 fields
consolidationAction'no_consolidation'
schedulingPriority'standard'
deliverySchedule{'type': 'separate', 'order1DeliveryTime': requestedDeliveryDate1, 'order2DeliveryTime': requestedDeliveryDate2}
costSavingsReport{'fuelSavings': 0, 'laborSavings': 0, 'totalSavings': 0}

Make this template
your own.

Load Order Consolidation System into GoRules, adjust the rules to your policy, and ship it behind your own API.