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 VIN, and then imported to stock in Firestore through the policy import pipeline. VIN is the primary vehicle key for PVM imports and vehicle searches; VRM is still imported and displayed as vehicle information.

Files Required​

  1. pvmFleetFile.csv

File Format​

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

PVM policy import overwrite behaviour

During a PVM policy import, existing values in the following policy-holder and vehicle fields are retained and are not overwritten by values from the import file:

  • Title
  • First name
  • Surname
  • Home, work, and mobile telephone numbers
  • Email address
  • Building name/number, street, district, town, county, and postcode
  • Vehicle Registration (VRM)

All other fields continue to be updated from the import file.

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 validationNo
YtypeCar Class20stringSpecial characters allowedNo
ZcapcodeCAPID20stringSpecial alphanumeric characters allowedNo
AAdescriptionVehicle Make150stringSpecial characters allowedNo
ABcolourColour100stringSpecial characters allowedNo
ACcapidIgnored--Not usedNo
ADfnetidIgnored--Not usedNo
AEvinnoVIN17stringUsed as Primary keyYes
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 VIN, they are aggregated into one vehicle with multiple policies. VRM is not used as the primary vehicle key.
  8. During a PVM policy import, existing values in the policy holder and vehicle fields listed above are retained and are not overwritten by values from the import file. Other imported fields continue to update as normal.
  9. Delta import (reimportAll = false) imports only changed/new rows by hash comparison.
  10. If reimportAll is enabled, all rows from merged output are imported.
  11. 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