Project

General

Profile

Bug #12038

Updated by Yalavarthi Thriveni 1 day ago

 Individual Product Shipping (shipsIndividually & maxUnitsPerPackage) 
 What is implemented: In  

 shippingPackage.util.js:L92-124 
 : 
 javascript 
 const shipsIndividually = s.shipsIndividually !== undefined ? Boolean(s.shipsIndividually) : Boolean(preset.shipsIndividually); 
 const maxPerPkg = Math.max(1, toNumber(s.maxUnitsPerPackage, toNumber(preset.maxUnitsPerPackage, shipsIndividually ? 1 : quantity))); 
 If shipsIndividually: true, maxPerPkg is set to 1. If a customer orders 3 units of a ceramic fountain, the system divides them into 3 separate package boxes in the packages[] array sent to FedEx. 
 The Gap: When FedEx responds with rates for those 3 boxes,  

 shippingSplit.service.js:L470-515 
  collapses them: 
 javascript 
 const expPkg = expressLive?.packages?.[0] || {}; 
 const stdPkg = standardLive?.packages?.[0] || {}; 
 The customer is charged the combined carrier rate for 3 boxes, but the checkout response and the order.shipments record only register 1 package card. The customer UI and the warehouse packing ticket do not get multi-piece tracking numbers. 

  Individual Product Shipping (shipsIndividually) 
 "When FedEx responds with rates for those 3 boxes, are shipping charges not calculated as the sum of all packages?" 

 How It Works Under the Hood 
 What is sent to FedEx: In  

 shippingPackage.util.js:L92-124 
 , if a product has shipsIndividually: true with a quantity of 3, the engine creates 3 distinct box entries inside the packages[] array: 

 json 
 "requestedPackageLineItems": [ 
   { "sequenceNumber": 1, "weight": { "value": 10, "units": "LB" }, "dimensions": { "length": 14, "width": 12, "height": 8 } }, 
   { "sequenceNumber": 2, "weight": { "value": 10, "units": "LB" }, "dimensions": { "length": 14, "width": 12, "height": 8 } }, 
   { "sequenceNumber": 3, "weight": { "value": 10, "units": "LB" }, "dimensions": { "length": 14, "width": 12, "height": 8 } } 
 ] 
 How FedEx rates it: In  

 fedex.adapter.js:L806-815 
 , the adapter extracts shipmentRate.totalNetCharge. In FedEx's official REST API, totalNetCharge is the multi-piece consolidated sum of all 3 boxes combined (taking into account base freight, dimensional weight per box, and multi-piece discounts). 

 👉 Yes, when FedEx Live is active, the customer IS charged the combined cost for all 3 boxes. 

 The Critical Gaps in This Flow 
 Gap A: Offline Fallback Rate Under-charging (Financial Loss): If FedEx's API experiences a network timeout or temporary outage, the system falls back to  

 buildNationwideCourierOptions 
 . 
 javascript 
 standardShipping: { fallbackRate: 7.99 } 
 The fallback charges a flat $7.99 for the entire order, rather than `$7.99 × 3 boxes = $23.97$! You end up paying the carrier for 3 heavy boxes while the customer was only charged for 1. 
 Gap B: UI & Order Tracking Metadata Collapse: In  

 shippingSplit.service.js:L470-515 
 : 
 javascript 
 const expPkg = expressLive?.packages?.[0] || {}; 
 Even though FedEx rated 3 distinct physical boxes, the service pulls packages[0] and creates only 1 customer-facing shipment card. The customer and the warehouse team are shown: Package Dimensions: 14x12x8, Weight: 10 lb, Quantity: 1 box 
 The warehouse packing staff has no multi-piece shipment (MPS) records to print 3 independent shipping labels. 



  What Does FedEx Consider vs. What Does It Miss? - attached screenshots for this section issues  
 !clipboard-202611061433-73lvm.png! 

 !clipboard-202611061433-8muoo.png! 

Back