diff --git a/server/rr/rr-service-vehicles.js b/server/rr/rr-service-vehicles.js index e16dcb89e..6808a246d 100644 --- a/server/rr/rr-service-vehicles.js +++ b/server/rr/rr-service-vehicles.js @@ -121,10 +121,13 @@ async function ensureRRServiceVehicle(args = {}) { } // --- Attempt insert (idempotent) --- + // IMPORTANT: The current RR lib build validates `vehicleServInfo.customerNo`. + // To be future-proof, we also include top-level `customerNo`. const insertPayload = { vin: vinStr, - customerNo: custNoStr, - license: license ? String(license).trim() : undefined + customerNo: custNoStr, // fallback form (some builds accept this) + vehicleServInfo: { customerNo: custNoStr }, // primary form expected by the lib + vehicleDetail: license ? { licNo: String(license).trim() } : undefined }; const insertOpts = {