Skip to main content

PVM Policy Import

Overview

The PVM Policy Import uses a single fleet file. Each row represents one policy record. Rows are validated, transformed, grouped by VRM, and then imported to stock in Firestore through the policy import pipeline.

Files Required

  1. pvmFleetFile.csv

File Format

Comma Separated Values - *.csv
Encoding - UTF-8

PVM Fleet File

ColumnPVM Contract File valuesViSN MappingMax LengthData TypeValidation / FormatMandatory
Astock profileIgnored--Not usedNo
Bvehicle typeIgnored--Not usedNo
CVersionIgnored--Not usedNo
Dbatch referenceIgnored--Not usedNo
Epolicy refPolicy Number50stringRequiredYes
FlocationPurchase Location Code10stringSpecial characters allowedNo
Gissue dateIssue Date10dateDD/MM/YYYYNo
Hsales personSales Person150stringSpecial characters allowedNo
Ihr numberPolicy Hr. no150stringSpecial characters allowedNo
JtitlePolicy Holder Title10stringSpecial characters allowedNo
KfirstnameFirst Name of Policy Holder100stringSpecial characters allowedNo
LsurnameLast Name of Policy Holder100stringSpecial characters allowedNo
MhometelPolicy Holder Phone (Home)11stringAlphanumeric characters allowedNo
NworktelPolicy Holder Phone (Work)11stringAlphanumeric characters allowedNo
OmobiletelPolicy Holder Mobile11stringAlphanumeric characters allowedNo
PemailaddrPolicy Holder Email Address50stringStandard email validationNo
QhousenoIgnored--Not usedNo
Raddress1Policy Holder Building Name/Number50stringSpecial characters allowedNo
Saddress2Policy Holder Street100stringSpecial characters allowedNo
Taddress3Policy Holder District100stringSpecial characters allowedNo
Uaddress4Policy Holder Town100stringSpecial characters allowedNo
VcountyPolicy Holder County100stringSpecial characters allowedNo
WpostcodePolicy Holder Postcode10stringStandard postcode validationNo
XregVRM10stringStandard vehicle registration validationYes
YtypeCar Class20stringSpecial characters allowedNo
ZcapcodeCAPID20stringSpecial alphanumeric characters allowedNo
AAdescriptionVehicle Make150stringSpecial characters allowedNo
ABcolourColour100stringSpecial characters allowedNo
ACcapidIgnored--Not usedNo
ADfnetidIgnored--Not usedNo
AEvinnoVIN17stringAlphanumeric characters allowedNo
AFpurchasepriceVehicle Purchase Price8numbernnnnn.nnNo
AGdofrDate of First Registration10dateDD/MM/YYYYNo
AHmileageMileage6numberNumeric valueNo
AIstocknoAsset Number20stringSpecial alphanumeric characters allowedNo
AJmotdueMOT Due Date10dateDD/MM/YYYYNo
AKcdeProduct Type30stringSpecial characters allowedNo
ALperiodPolicy Term2stringNumeric valueNo
AMstartdatePolicy Start Date10dateDD/MM/YYYYYes
ANpurchaseprice_prodPolicy Purchase Price8numbernnnnn.nnNo
AOretailpricePolicy Retail Price8numbernnnnn.nnNo
APcostpricePolicy Cost Price8numbernnnnn.nnNo
AQpurchasedatePurchase Date10dateDD/MM/YYYYNo
ARintcodeIgnored--Not usedNo
ASclaimlimitClaim Limit8numbernnnnn.nnNo
ATdealergroupPurchase Location (Group)150stringSpecial characters allowedNo
AUdealernamePurchase Location (Site)150stringSpecial characters allowedNo
  1. For scheduler setup, see Creating PVM Policy Import Schedulers.
  2. For a full operator walkthrough, see Running a PVM Policy Import End to End.
  3. For more details on the shared import flow, see BigQuery Import Strategy.

Key Behaviours

  1. PVM import uses only one file (no benefits file).
  2. One row represents one policy.
  3. subCustomerId is matched from lease sub-customers by location == customerAccountNumber.
  4. startDate, issueDate, purchaseDate, motDue, and dateOfFirstRegistration are normalized to ISO dates.
  5. endDate is derived from startDate + period months - 1 day.
  6. Rows with endDate in the past are skipped during validation (SKIPPED log).
  7. If multiple rows exist for the same VRM, they are aggregated into one vehicle with multiple policies.
  8. Delta import (reimportAll = false) imports only changed/new rows by hash comparison.
  9. If reimportAll is enabled, all rows from merged output are imported.
  10. If shouldTerminate is enabled, vehicles missing from the latest raw file can be marked terminated.

Status: Pending Approval
Category: Protected
Authored By: Aditya on Jul 16, 2026