Merged in feature/IO-3570-Fortellis-Multiple-Veh-Records (pull request #3022)

IO-3570 Fortellis Owner Phone Search
This commit is contained in:
Allan Carr
2026-02-19 20:36:15 +00:00

View File

@@ -425,7 +425,7 @@ async function QueryDmsCustomerByName({ socket, redisHelpers, JobData }) {
const ownerName = const ownerName =
JobData.ownr_co_nm && JobData.ownr_co_nm.trim() !== "" JobData.ownr_co_nm && JobData.ownr_co_nm.trim() !== ""
? //? [["firstName", JobData.ownr_co_nm.replace(replaceSpecialRegex, "").toUpperCase()]] // Commented out until we receive direction. ? //? [["firstName", JobData.ownr_co_nm.replace(replaceSpecialRegex, "").toUpperCase()]] // Commented out until we receive direction.
[["phone", JobData.ownr_ph1?.replace(replaceSpecialRegex, "")]] [["phone", JobData.ownr_ph1?.replace(/[^0-9]/g, "")]]
: [ : [
["firstName", JobData.ownr_fn?.replace(/[^a-zA-Z0-9-]/g, "").toUpperCase()], ["firstName", JobData.ownr_fn?.replace(/[^a-zA-Z0-9-]/g, "").toUpperCase()],
["lastName", JobData.ownr_ln?.replace(/[^a-zA-Z0-9-]/g, "").toUpperCase()] ["lastName", JobData.ownr_ln?.replace(/[^a-zA-Z0-9-]/g, "").toUpperCase()]
@@ -501,7 +501,7 @@ async function InsertDmsCustomer({ socket, redisHelpers, JobData }) {
phones: [ phones: [
{ {
//"uuid": "", //"uuid": "",
number: JobData.ownr_ph1?.replace(replaceSpecialRegex, ""), number: JobData.ownr_ph1?.replace(/[^0-9]/g, ""),
type: "HOME" type: "HOME"
// "doNotCallIndicator": true, // "doNotCallIndicator": true,
// "doNotCallIndicatorDate": `null, // "doNotCallIndicatorDate": `null,