v2.0

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

Watch the launch videoWatch

Warehouse Cross-Docking

Automated system that determines optimal handling of incoming shipments based on outbound orders, time constraints, and current warehouse capacity.

Solution

This logistics optimization system intelligently routes incoming shipments to either cross-docking or storage based on real-time warehouse conditions. It evaluates whether matching outbound orders exist and their scheduled departure times, calculating precise time windows between inbound and outbound movements. The engine assesses current warehouse capacity utilization to determine if storage space is constrained.

When matching orders are identified within a short timeframe (24-48 hours) and warehouse capacity allows, the system routes shipments directly to cross-docking zones, bypassing storage entirely. For shipments with matching orders but extended time gaps, or when warehouse space is abundant, the system directs items to appropriate storage locations. Each decision includes detailed reasoning, enabling warehouse staff to quickly understand routing choices while maximizing operational efficiency.

How it works

The decision engine follows a structured evaluation process:

  1. Input Processing: Captures inbound shipment details, associated outbound orders, timing information, and current warehouse metrics.
  2. Metrics Calculation: Determines if matching outbound orders exist, calculates the time difference between inbound and outbound movements, and assesses current warehouse capacity percentage.
  3. Decision Rules: Applies business rules based on order matching, time windows, and capacity utilization thresholds.
  4. Cross-Dock Evaluation: For qualifying shipments, assigns appropriate docking bays and processing priorities.
  5. Response Generation: Produces a final decision with supporting rationale and handling instructions.

Where teams use it

  • Distribution centers handling high-volume shipments
  • Retail logistics operations with rapid inventory turnover
  • E-commerce fulfillment centers managing same-day shipping
  • Food and perishable goods distribution
  • Manufacturing facilities with just-in-time components
  • Third-party logistics (3PL) providers optimizing warehouse space

Inside the decision model

Warehouse Cross-Docking ships as a JDM decision graph with 6 nodes, 1 decision table and 5 rules. Download it, load it into GoRules, and run it as-is on Zen Engine.

Decision graph6 nodes · read-only
input shipmentRequestexpression calculateMetricstable crossDockingDecisionswitch handleCrossDockingexpression assignCrossDockingDetails
01

Shipment Request

input

An inbound shipment arrives described by inboundShipmentTime and outboundShipmentTime, a matchingOutboundOrders list, the inboundShipmentItems, and warehouse state via currentStorageUsed against totalStorageCapacity, plus a pre-reserved crossDockingBayAssignment. The metrics step condenses these into the three signals the routing table needs.

Sample requestJSON
{
  "inboundShipmentId": "IN-12345",
  "inboundShipmentTime": "2025-03-19T10:00:00Z",
  "outboundShipmentTime": "2025-03-20T09:00:00Z",
  "matchingOutboundOrders": [
    {
      "orderId": "ORD-789",
      "customerPriority": "standard",
      "destinationZone": "East"
    },
    {
      "orderId": "ORD-790",
      "customerPriority": "premium",
      "destinationZone": "East"
    }
  ],
  "inboundShipmentItems": [
    {
      "sku": "ITEM-001",
      "quantity": 50,
      "category": "Electronics"
    },
    {
      "sku": "ITEM-002",
      "quantity": 30,
      "category": "Home Goods"
    }
  ],
  "currentStorageUsed": 7500,
  "totalStorageCapacity": 10000,
  "crossDockingBayAssignment": "Bay-E4"
}
02

Calculate Metrics

expression

Three derived signals feed the decision table: hasMatchingOutboundOrders checks len(matchingOutboundOrders) > 0, timeDifferenceHours converts the gap between outbound and inbound timestamps to hours by dividing the epoch difference by 3600, and warehouseCapacityPercentage normalizes currentStorageUsed / totalStorageCapacity to a percentage. Reducing raw shipment data to these three numbers is what lets the routing rules stay short and auditable.

Expressions3 fields
hasMatchingOutboundOrderslen(matchingOutboundOrders) > 0
timeDifferenceHours(date(outboundShipmentTime) - date(inboundShipmentTime)) / 3600
warehouseCapacityPercentage(currentStorageUsed / totalStorageCapacity) * 100
03

Cross Docking Decision

table

Routing resolves through five first-hit rows over hasMatchingOutboundOrders, timeDifferenceHours, and warehouseCapacityPercentage. Matching orders departing within [0..24] hours with capacity at or below 36 percent cross-dock immediately; within [0..48] hours the capacity allowance loosens to 80 percent; above 48 hours the shipment still crosses the dock only if the warehouse is at 90 percent or more, with the reason 'High warehouse capacity, cross-dock to save space'. Gaps over 72 hours go to 'store' despite matching orders, and shipments with no matching outbound orders always store.

The 24-to-48-hour window is the classic cross-docking envelope: goods can only bypass storage if an outbound trailer leaves before dock staging space itself becomes a bottleneck. The third row inverts the logic under pressure, accepting a longer dock dwell when storage is nearly full, which is a realistic trade-off, though the exact 36, 80, and 90 percent triggers are operational tuning rather than fixed industry numbers.

Decision tablefirst hit policy
Has Matching OrdershasMatchingOutboundOrdersTime Difference (hours)timeDifferenceHoursWarehouse Capacity (%)warehouseCapacityPercentageDecisioncrossDockDecisionReasondecisionReason
true[0..24]<= 36'cross-dock''Matching orders available within 24 hours with sufficient capacity'
true[0..48]<= 80'cross-dock''Matching orders available within 48 hours'
true> 48>= 90'cross-dock''High warehouse capacity, cross-dock to save space'
true> 72-'store''Matching orders but time difference too large'
false--'store''No matching outbound orders'
04

Handle Cross Docking

switch

Only shipments where crossDockDecision == 'cross-dock' proceed to bay assignment; the default branch sends stored shipments straight to the response. This keeps dock-specific fields like bay and processing priority off the payload of shipments that never touch the cross-dock flow.

Branches2 paths
crossDockDecision == 'cross-dock' Assign Cross Docking Details
otherwise Response
05

Assign Cross Docking Details

expression

Cross-docked shipments pick up their execution details: dockingBay takes the crossDockingBayAssignment from the request, estimatedProcessingTime is a flat 30 minutes, and priority escalates to 'high' when timeDifferenceHours < 12, otherwise 'normal'. The urgency flag matters on the floor because a sub-12-hour turnaround leaves no slack for the shipment to wait behind routine work.

Expressions3 fields
dockingBaycrossDockingBayAssignment
estimatedProcessingTime30
prioritytimeDifferenceHours < 12 ? 'high' : 'normal'
06

Response

output

The response carries the crossDockDecision and its decisionReason for every shipment, and for cross-docked ones the dockingBay, priority, and estimatedProcessingTime as well. Including the reason string alongside the verdict lets receiving staff act on the routing without reconstructing why the engine chose it.

Make this template
your own.

Load Warehouse Cross-Docking into GoRules, adjust the rules to your policy, and ship it behind your own API.