Skip to main content

Import Breakdown Catalogue file

This will import catalogue of Breakdown job items with costs for a given customer and supplier.

NOTE:

Max allowed file size is 1.1Mb.

Fields

Field NameDescriptionDatatypeValidationMax lengthMandatoryExample
Supplieraccount Id/group Id (header may be Supplier or groupId)stringValid stringUnlimitedYesY41y2jOv4xtieweJiITF
ProductType of catalogue (reference only, not used by the import)NANANANABreakdown
Vehicle IdentifierUnique Id for a vehicle Make & ModelstringHyphens, plus signs, letters, digits, underscores and spaces only. Saved as default when emptyUnlimitedNo75920321
Repair Type IdUnique Id issued by ViSNstringHyphens, plus signs, letters, digits, underscores and spaces onlyUnlimitedYesBDF581871D
Repair DescriptionBrief description of the job itemstringLetters, digits, underscores, at symbols, periods, forward slashes, hash symbols, ampersands, plus signs, hyphens, parentheses, square brackets and double quotes onlyUnlimitedYesRecovery mileage (per mile after 20 miles)
isAncilliaryMarks the job item as an ancillary chargestringCase-insensitive, one of: Yes, No. Saved as false when empty or column absentNANoYes
MakeVehicle MakestringHyphens, plus signs, letters, digits, underscores and spaces only. Saved as default when emptyUnlimitedNoCITROEN
ModelVehicle ModelstringValid string. Saved as default when emptyUnlimitedNoGRAND C4 SPACETOURER
Vehicle TypeVehicle type the price applies tostringCase-insensitive, one of: Car, LCV, Van, Commercial (under 3.5), Commercial (over 3.5), HGV, Motor Bike, Electric Car. Saved as default when emptyNANoCAR
Net CostCostdecimalValid numberNAYes122.00
Uplift CostUplifted costdecimalUp to 5 digits with up to 2 decimal places. Must not be lower than Net CostNANo125.00
Customer Account NumberCustomer account the price applies tostringLetters, digits and underscores only. Saved as default when emptyUnlimitedNoACC_45829

Combination of Make, Model, Repair Type Id, Vehicle Identifier, Vehicle Type and Customer Account Number must be unique. These fields, in that order, generate the document id; empty fields become default. For example BDF581871D and CAR with Make, Model, Vehicle Identifier and Customer Account Number empty generates default-default-bdf581871d-default-car-default

Importing a file

Preparation

  1. Create a new branch with Jira task number in the branch name
  2. Delete all the files in importFiles folder
  3. Create a folder with the current sprint number
  4. Copy the file that needs to be imported
  5. Go to package.json , find the line validate:breakdownPriceCatalogue
  6. Modify --leaseId with the required lease Id
  7. Modify --file with the relative path of the file
  8. Save package.json

Validating locally

  1. in a terminal run npm run validate:breakdownPriceCatalogue
  2. If there are no errors, push the code

Validating in workflow

  1. Go to Action of Import-manger
  2. Find <Environment> - on-demand-import
  3. Select the branch that was created for this import
  4. Enter script name as validate:breakdownPriceCatalogue
  5. Leave Overrides empty

Importing the file

  1. If the validation has passed
  2. Go to Action of Import-manger
  3. Find <Environment> - on-demand-import
  4. Select the branch that was created for this import
  5. Enter script name as validate:breakdownPriceCatalogue
  6. Enter --persist in Overrides field

Testing

  1. A folder will be created (if not already exists) in Firestore, under the /accounts/<accountId from the import file>/cataloguePrice/<lease Id from package.json>/breakdown
  2. New documents will be added in Typesense > breakdownCatalogueIndex, each carrying isAncilliary
Status: Draft
Category: Protected
Authored By: Meet Shah on Sep 18, 2026
Revisions.