From c0157454e1452498d4350d76354439f31f4318bc Mon Sep 17 00:00:00 2001 From: Dave Date: Fri, 7 Nov 2025 16:02:25 -0500 Subject: [PATCH] feature/IO-3357-Reynolds-and-Reynolds-DMS-API-Integration - insert service vehical working --- server/rr/rr-service-vehicles.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 = {