Enrich property assessor with CAD detail data

This commit is contained in:
2026-03-28 02:07:18 -05:00
parent b1722a04fa
commit 7690dc259b
6 changed files with 561 additions and 13 deletions
+21 -6
View File
@@ -121,6 +121,7 @@ function buildPublicRecordLinks(
"Tax Assessor / Collector Directory Page",
publicRecords.taxAssessorCollector?.directoryPage
);
pushLink(links, "CAD Property Detail", publicRecords.propertyDetails?.sourceUrl);
return links;
}
@@ -318,6 +319,13 @@ export function buildAssessmentReportPayload(
publicRecords.county.name && publicRecords.appraisalDistrict
? `${publicRecords.county.name} Appraisal District`
: publicRecords.county.name || publicRecords.state.name || "Official public-record jurisdiction";
const assessedTotalValue = publicRecords.propertyDetails?.assessedTotalValue ?? null;
const ownerName = publicRecords.propertyDetails?.ownerName ?? undefined;
const landValue = publicRecords.propertyDetails?.landValue ?? undefined;
const improvementValue = publicRecords.propertyDetails?.improvementValue ?? undefined;
const exemptions = publicRecords.propertyDetails?.exemptions?.length
? publicRecords.propertyDetails.exemptions
: undefined;
return {
recipientEmails,
@@ -339,6 +347,9 @@ export function buildAssessmentReportPayload(
`Matched address: ${matchedAddress}`,
`Jurisdiction anchor: ${publicRecords.county.name || "Unknown county"}, ${publicRecords.state.code || publicRecords.state.name || "Unknown state"}.`,
publicRecords.geoid ? `Census block GEOID: ${publicRecords.geoid}.` : "Census block GEOID not returned.",
assessedTotalValue != null
? `Official CAD assessed value: $${assessedTotalValue.toLocaleString("en-US")}.`
: "Official CAD assessed value was not retrieved.",
purposeGuidance.snapshot
],
whatILike: [
@@ -356,17 +367,21 @@ export function buildAssessmentReportPayload(
carryView: [purposeGuidance.carry],
risksAndDiligence: [
...publicRecords.lookupRecommendations,
...(publicRecords.propertyDetails?.notes || []),
purposeGuidance.diligence
],
photoReview,
publicRecords: {
jurisdiction,
accountNumber: options.parcelId || publicRecords.sourceIdentifierHints.parcelId,
ownerName: undefined,
landValue: undefined,
improvementValue: undefined,
assessedTotalValue: undefined,
exemptions: undefined,
accountNumber:
publicRecords.propertyDetails?.propertyId ||
options.parcelId ||
publicRecords.sourceIdentifierHints.parcelId,
ownerName,
landValue,
improvementValue,
assessedTotalValue,
exemptions,
links: publicRecordLinks
},
sourceLinks