GoRules Version 2 is here - redesigned, now with managed cloud.GoRules Version 2 is here!
Watch the launch videoWatchWarehouse 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:
- Input Processing: Captures inbound shipment details, associated outbound orders, timing information, and current warehouse metrics.
- Metrics Calculation: Determines if matching outbound orders exist, calculates the time difference between inbound and outbound movements, and assesses current warehouse capacity percentage.
- Decision Rules: Applies business rules based on order matching, time windows, and capacity utilization thresholds.
- Cross-Dock Evaluation: For qualifying shipments, assigns appropriate docking bays and processing priorities.
- 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.
Shipment Request
inputAn 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"
}Calculate Metrics
expressionThree 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.
len(matchingOutboundOrders) > 0(date(outboundShipmentTime) - date(inboundShipmentTime)) / 3600(currentStorageUsed / totalStorageCapacity) * 100Cross Docking Decision
tableRouting 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.
| Has Matching OrdershasMatchingOutboundOrders | Time Difference (hours)timeDifferenceHours | Warehouse Capacity (%)warehouseCapacityPercentage | DecisioncrossDockDecision | ReasondecisionReason |
|---|---|---|---|---|
| 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' |
Handle Cross Docking
switchOnly 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.
Assign Cross Docking Details ResponseAssign Cross Docking Details
expressionCross-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.
crossDockingBayAssignment30timeDifferenceHours < 12 ? 'high' : 'normal'Response
outputThe 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.
Other Logistics templates
View all templatesShipping Carrier Selector
Rule-based system that selects optimal carriers by analyzing package details, service level needs, and cost factors to streamline shipping decisions.
LogisticsDelivery Route Optimizer
Smart logistics system that evaluates capacity, traffic, time windows, and distance to determine the most efficient delivery routes for maximum efficiency.
LogisticsWarehouse Storage Location
Maximizes warehouse efficiency by strategically placing products based on turnover rates, picking frequency, and product characteristics.
Make this template
your own.
Load Warehouse Cross-Docking into GoRules, adjust the rules to your policy, and ship it behind your own API.