Daily Invoice Export - Invoice Block
Terminology
Record Set | A set of rows exported into the CSV file, it consists of the records in the order as in below
* n denotes an index of parts/fluids added in a job line of specific enquiry | |||||||||||||||||||||||||||||||||
Record | A particular line of the export that is either of indicators allowed in a record set, along with one record for the entire file among the following |
File Header - HE
- This record is mandatory
- This is the first line of the export file
- This line is not part of any record set, it is common for the entire file
Sr.No | Field Label | Data Type | Length | Notes | Mandatory |
---|---|---|---|---|---|
1 | Record Type Indicator | Text | 2 | Must be "HE" | Y |
2 | Record Version Number | Integer | 2 | Must be "6" | Y |
3 | Scheme Operator Reference | Integer | 7 | ViSN Customer Account Number | Y |
4 | Type of Transaction | Text | 1 |
| Y |
5 | File Serial Number | Integer | 8 |
| Y |
6 | Run Date | Integer | 8 | CCYYMMDD (e.g., "20031225") | Y |
7 | Run Time | Integer | 6 | HHMMSS (e.g., "232830") | Y |
8 | End of Record Marker | Control | 1 | Carriage Return Code (ASCII 10) | Y |
Scheme Operator Address Detail - LC
- The inclusion of this line is controlled by the flag
addLCLineForInvoice
, which is configured in the lease company's scheduler. - When
addLCLineForInvoice
is set to false, the LC line appears only once in the file. - When
addLCLineForInvoice
is set to true, the LC line is included for each record in the file. - If
addLCLineForInvoice
is not configured in the lease company's scheduler, the LC line defaults to being included for each record in the file. - It provides details about the customer for whom the export is being generated.
Sr.No | Field Label | Data Type | Length | Notes | Mandatory |
---|---|---|---|---|---|
1 | Record Type Indicator | Text | 2 | Must be "LC" | Y |
2 | Record Type Version Number | Integer | 2 | Must be "6" | Y |
3 | Scheme Operator Reference | Integer | 7 | ViSN Customer Account Number This value will be fetched into the column at the time of export from below location in firebase - leasecompany {leaseId} leaseDetails accountNumber The value will be blank in case of the value being not present in above location | Y |
4 | Scheme Operator Account Name | Text | 30 |
| Y |
5 | Scheme Operator Address 1 | Text | 30 |
| Y |
6 | Scheme Operator Address 2 | Text | 30 |
| Y |
7 | Scheme Operator Address 3 | Text | 30 |
| |
8 | Scheme Operator Address 4 | Text | 30 |
| |
9 | Scheme Operator Address 5 | Text | 30 |
| |
10 | Scheme Operator Postcode | Text | 8 |
| |
11 | End of Record Marker | Control | 1 | Carriage Return Code (ASCII 10) | Y |
Transaction Header - TH
- Record is mandatory for each transaction in the record set
- More than one record can exist in each file
Sr.No | Field Label | Data Type | Length | Notes | Mandatory |
---|---|---|---|---|---|
1 | Record Type Indicator | Text | 2 | Must be "TH" | Y |
2 | Record Type Version Number | Integer | 2 | Must be "6" | Y |
3 | ViSN Enquiry Number | Integer | 8 | For invoice transactions (transaction type 'I'), the enquiry number will be populated in this column. | Y |
4 | Invoice Extract Analysis Ref | Integer | 2 | Constant "01" | Y |
5 | Repairer Job Number | Text | 10 | The enquiry number will be populated in this column | |
6 | Vehicle Registration | Text | 14 | This column will contain the VRM (Vehicle Registration Mark) of the vehicle associated with the enquiry or job. | Y |
7 | Odometer Reading | Integer | 7 | This column indicates the vehicle's mileage recorded during the repair. | Y |
8 | Transaction Date | Integer | 8 | This column will contain the vehicle's check-in date at the garage. Format: CCYYMMDD (e.g., "20031225") | Y |
9 | Asset Number | Text | 10 | This column will contain the asset number associated with the vehicle in the enquiry. | Y |
10 | Card Number | Text | 19 | Blank Space | |
11 | Driver Name | Text | 40 | This column will contain the name of the driver associated with the vehicle in the enquiry | |
12 | Purchase Order Number | Text | 20 |
| |
13 | Transaction Serial Number | Integer | 8 | Constant '1' | Y |
14 | Job Completion Date | Integer | 8 | The date when the job was closed and marked as 'Job Complete'. CCYYMMDD (e.g., "20031225"). | Y |
15 | VIN | Text | 20 | This column will contain the Vehicle Identification Number (VIN) associated with the vehicle in the enquiry. | |
16 | End of Record Marker | Control | 1 | Carriage Return Code (ASCII 10) | Y |
Supplier/Repairer Details - RE
- This record is required in every record set
- Only one record is allowed per transaction
- Includes details of the supplier responsible for the service related to the enquiry
Sr.No | Field Label | Data Type | Length | Notes | Mandatory |
---|---|---|---|---|---|
1 | Record Type Indicator | Text | 2 | Must be "RE" | Y |
2 | Record Type Version Number | Integer | 2 | Must be "6" | Y |
3 | ViSN Repairer Account Number | Integer | 7 | DI Group Supplier ID, if no group then DI Supplier ID The value will be fetched into the column from below location in firebase - leasecompany {leaseId} suppliers {accountId} groupId | Y |
4 | Supplier Account Number | Text | 20 | Supplier Group ID, if no group then Supplier ID The value will be fetched into the column from below location in firebase - leasecompany {leaseId} suppliers {accountId} serviceUnits {serviceUnitObjectID} supplierId | Y |
5 | Supplier Account Name | Text | 30 | Supplier Name from Invoice Supplier DetailsIf the content for this column is found to be more than 30 characters in length, it will be trimmed down to 30 characters. | Y |
6 | Supplier Account Address 1 | Text | 30 | number from Supplier Address Details of Invoice Supplier Details | Y |
7 | Supplier Account Address 2 | Text | 30 | address1 from Supplier Address Details of Invoice Supplier Details | Y |
8 | Supplier Account Address 3 | Text | 30 | address2 from Supplier Address Details of Invoice Supplier Details | |
9 | Supplier Account Address 4 | Text | 30 | county from Supplier Address Details of Invoice Supplier Details | |
10 | Supplier Account Postcode | Text | 8 | postcode from Supplier Address Details of Invoice Supplier Details | |
11 | Supplier VAT number | Text | 10 | VAT Number from Invoice Supplier Details | Y |
12 | Scheme Operator Controller ID | Text | 10 | Constant Blank | |
13 | Supplier Account Address 5 | Text | 30 | Constant Blank | |
14 | Contact Telephone Number | Text | 15 | Contact phone number The value will be fetched into the column from below location in firebase - leasecompany {leaseId} suppliers {accountId} serviceUnits {serviceUnitObjectID} contact | |
15 | End of Record Marker | Control | 1 | Carriage Return Code (ASCII 10) | Y |
Invoice Credit Note Details - IN
- This record is required in every record set
- Each transaction can only contain one record
- Multiple records can be included in a single file
Sr.No | Field Label | Data Type | Length | Notes | Mandatory |
---|---|---|---|---|---|
1 | Record Type Indicator | Text | 2 | Must be "IN" | Y |
2 | Record Type Version Number | Integer | 2 | Must be "6" | Y |
3 | Transaction Type | Text | 1 | I = Invoice | Y |
4 | Invoice Number | Text | 20 | This value is retrieved from the invoice number recorded in the invoice drawer during invoicing. ![]() | Y |
5 | Tax Point Date | Integer | 8 | This value is retrieved from the invoice number recorded in the invoice drawer during invoicing. ![]() CCYYMMDD (e.g., "20031225") | Y |
6 | Repairer Invoice Text | Text | 16 | Blank | |
7 | Original Invoice Number | Text | 20 | Blank | Y |
8 | Original ViSN Transaction Number | Integer | 8 | Blank | |
9 | Reason for Credit | Text | 30 | Blank | |
10 | Scheme Operator Message | Text | 80 | Blank - Not In Use | |
11 | Scheme Operator Authorisation Code | Text | 10 | Blank - Not In Use | |
12 | Invoice Date | Integer | 8 | The date on which the invoice is generated CCYYMMDD (e.g., "20031225") | Y |
13 | Terms Status | Text | 1 | Constant 'I', I denotes `In terms` here | |
14 | End of record Marker | Control | 1 | Carriage Return Code (ASCII 10) | Y |
Item Line Details - IL
- Each record set must contain at least one record
- Multiple records can exist within a single transaction and in the export file
Sr.No | Field Label | Data Type | Length | Notes | Mandatory |
---|---|---|---|---|---|
1 | Record Type Indicator | Text | 2 | Must be "IL" | Y |
2 | Record Type Version Number | Integer | 2 | Must be "6" | Y |
3 | Item Number | Integer | 2 | This column represents the position or sequence of the specific job item within the job sheet linked to the enquiry. ![]() | Y |
4 | Cost Type | Text | 1 | Will be one of the Cost Types Exception: For Tyre job lines, this value will always be 'M'. | Y |
5 | Charge Indicator | Text | 1 | Will be one of the Recharge Indicators | Y |
6 | Quantity | Number | 2.2 | Value is always 1. | Y |
7 | Additional Information Text (or) Repairer Authorisation Text | Text | 30 | This column captures the customer's reason for manually authorizing a job line. | |
8 | External Code/ViSN Job Code | Text | 5 | Integration code to be used in invoice exports.
| |
9 | Job line-Item Description | Text | 90 | Description of the Jobline Item. The values for this field differ based on the job line type (details provided below)
| |
10 | Asset ID | Text | 40 | The asset number of the vehicle associated with the enquiry will be populated into this column | |
11 | Full Recharge Text | Text | 150 |
| |
12 | Action code | Text | 3 | Default on file is code R&R | |
13 | Reason Code | Text | 3 | The values for this field differ based on the job line type (details provided below)
| Y |
14 | Goodwill Percentage | Number | 3.2 | Always 0.0 | N |
15 | Labour Time | Number | 5.2 |
| Y |
16 | Labour Rate | Number | 5.2 |
| Y |
17 | Number of Parts | Number | 3.2 |
| Y |
18 | Recharge Reason Code | Text | 5 | When Charge Indicator = "R", is mandatory. Will be one of the Recharge reason codes | |
19 | Recharge Amount | Number | 5.2 | This column will contain the recharge amount entered by the customer for each job line associated with recharge details. (e.g., 99999.99) | |
20 | Recharge Percentage | Number | 3.2 | This column will contain the recharge percentage entered by the customer for each job line associated with recharge details. (e.g., 999.99) | |
21 | Recharge Text | Text | 40 |
| |
22 | End of Record Marker | Control | 1 | Carriage Return Code (ASCII 10) | Y |
Parts Record - IP
- Record is optional, available only if any of the job lines of the job sheet has parts/fluids added to them
- More than one record can exist in each file
Sr.No | Field Label | Data Type | Length | Notes | Mandatory |
---|---|---|---|---|---|
1 | Record Type Indicator | Text | 2 | Must be "IP" | Y |
2 | Record Type Version Number | Integer | 2 | Must be "6" | Y |
3 | Item Number | Integer | 2 | This column indicates the specific job item's position (order) within the job sheet associated with the enquiry. ![]() | Y |
4 | Parts Number | Integer | 1 | always "1" | Y |
5 | Parts Code | Text | 24 | During data export, the 'Part line type' field is used to determine the content for this specific column.
| |
6 | Parts Description | Text | 30 | During data export, the 'Part line type' field is used to determine the content for this specific column.
If the content for this column is found to be more than 30 characters in length, it will be trimmed down to 30 characters. | Y |
7 | Quantity | Number | 2.2 | e.g.
| Y |
8 | Unit Price | Number | 5.2 |
| Y |
9 | Parts Discount Rate | Number | 3.2 | Percentage discount provided for the specific part or fluid e.g. 999.99 | Y |
10 | Goodwill Percentage | Number | 3.2 |
| N |
11 | Discounted Unit Price | Number | 5.2 | To determine the Discounted Unit Price, we first apply theunit discount percentage to the unit price. Then, we apply thegoodwill discount percentage to the discounted price to calculate the final discounted unit price. ![]()
| Y |
12 | Nett Parts Price | Number | 5.2 | The net price is derived by calculating the total cost (unit price multiplied by quantity), then deducting the unit discount and the goodwill discount. ![]()
| Y |
13 | VAT Rate | Number | 2.2 | Mandatory with Invoice Note (e.g. 99.99) | |
14 | Normal Part | Text | 1 | Will always be 'Y' | Y |
15 | Manufacturer of Part | Text | 3 | Blank This is mandatory if Normal Part is "N". However, ViSN currently does not export "N". | |
16 | VAT Code | Text | 1 | Will be one of the VAT codes | Y |
17 | End of Record Marker | Control | 1 | Carriage Return Code (ASCII 10) | Y |
Total Line Cost Record - TL
- At least one record must exist in each record set
- More than one record can exist in each file
Sr.No | Field Label | Data Type | Length | Notes | Mandatory |
---|---|---|---|---|---|
1 | Record Type Indicator | Text | 2 | Must be "TL" | Y |
2 | Record Type Version Number | Integer | 2 | Must be "6" | Y |
3 | Nett Labour Cost | Number | 5.2 | The values for this field differ based on the job line type and job description type (details provided below)
(e.g., 99999.99) | Y |
4 | VAT Rate Labour | Number | 2.2 | Mandatory only with an invoice or credit note.
(e.g., 99.99) | Y |
5 | Total Nett Parts Cost | Number | 5.2 | The values for this field differ based on the job line type and job description type (details provided below)
(e.g., 99999.99) | Y |
6 | Total Nett Line Cost | Number | 5.2 | The total nett line cost is derived by adding the total net parts cost and the total net labour cost if the job line includes both parts and labour. Otherwise, it will reflect the job line's total value. ![]() (e.g., 99999.99) | Y |
7 | VAT Code | Text | 1 | Will be one of the VAT codes | Y |
8 | End of Record Marker | Control | 1 | Carriage Return Code (ASCII 10) | Y |
Total Transaction Cost Record - TC
- Required in every record set
- Limited to one record per transaction
- Multiple records can be included in an export file
Sr.No | Field Label | Data Type | Length | Notes | Mandatory |
---|---|---|---|---|---|
1 | Record Type Indicator | Text | 2 | Must be "TC" | Y |
2 | Record Type Version Number | Integer | 2 | Must be "6" | Y |
3 | Total Nett Labour Cost | Number | 5.2 | The value for this field is determined by the job line type and job description type. Refer IL16 to check the same. It is calculated by summing up the net labor costs (TL3) of all job lines in the jobsheet. The net labor cost is determined by considering the labor rate, labor hours, and applying goodwill discount. ![]() (e.g., 99999.99) | Y |
4 | Total Nett Parts Cost | Number | 5.2 | The values for this field differ based on the job line type and job description type. Refer IP12 to check the same It is calculated by summing up the net parts costs (TL5) of all job lines in the jobsheet. The net parts cost is determined by considering the parts price, quantity, and applying any unit and goodwill discounts. ![]() (e.g., 99999.99) | Y |
5 | Total Nett Transaction Cost | Number | 5.2 | This value is calculated by adding up the Total Nett Line Cost (TL6) of all lines in the jobsheet. The Total Nett Line Cost is determined by combining the total net parts cost and the total net labour cost if the job line includes both parts and labour. Otherwise, it represents the total value of the job line. ![]() (e.g., 99999.99) | Y |
6 | VAT Amount | Number | 5.2 | This value is calculated by adding up the vat amount of all lines in the jobsheet. ![]() (e.g., 99999.99) | |
7 | Total Gross Labour Cost | Number | 5.2 | Mandatory with an invoice or credit note The final value is calculated by factoring in the total net labor cost and applying the VAT rate ![]() (e.g., 99999.99) | |
8 | Total Gross Parts Cost | Number | 5.2 | Mandatory with an invoice or credit note The final value is calculated by factoring in the total net parts cost and applying the VAT rate (e.g., 99999.99) | |
9 | Total Gross Transaction Cost | Number | 5.2 | Mandatory with an invoice or credit note The final value is calculated by factoring in the total net jobline cost (TL6) and applying the VAT rate ![]() (e.g., 99999.99) | Y |
10 | End of Record Marker | Control | 1 | Carriage Return Code (ASCII 10) | Y |
VAT Summary Record - VA
All the joblines in the jobsheet are grouped by the vat code.- One record per VAT code in each Transaction
- More than one record can exist in a file
- More than one record can exist in a Transaction
Sr.No | Field Label | Data Type | Length | Notes | Mandatory |
---|---|---|---|---|---|
1 | Record Type Indicator | Text | 2 | Must be "VA" | Y |
2 | Record Type Version Number | Integer | 2 | Must be "6" | Y |
3 | VAT Rate | Number | 2.2 | Indicates the VAT rate associated with the specified VAT code. (e.g., 99.99) | Y |
4 | VAT Applicable Amount | Number | 5.2 | Represents the total cost of all joblines where the specified VAT code is applied. (e.g., 99999.99) | Y |
5 | VAT Amount | Number | 5.2 | Represents the total VAT amount for all joblines associated with the specified VAT code.![]() (e.g., 99999.99) | Y |
6 | VAT Code | Text | 1 | Will be one of the VAT codes | Y |
7 | End of Record Marker | Control | 1 | Carriage Return Code (ASCII 10) | Y |
Transaction Trailer Record - TT
- One record must exist for each Transaction
- More than one record can exist in an export file
Sr.No | Field Label | Format | Length | Notes | Mandatory |
---|---|---|---|---|---|
1 | Record Type Indicator | Text | 2 | Must be "TT" | Y |
2 | Record Version Number | Integer | 2 | Must be "6" | Y |
3 | Number of Records | Integer | 5 | Total number of records between Transaction Header and Transaction Trailer inclusive (excludes authorisation details) | Y |
4 | End of Record Marker | Control | 1 | Carriage Return Code (ASCII 10) | Y |
File Trailer Record - FT
- This record is mandatory
- This line does not belong to a record set, instead common for the whole file
Sr.No | Field Label | Format | Length | Notes | Mandatory |
---|---|---|---|---|---|
1 | Record Type Indicator | Text | 2 | Must be "FT" | Y |
2 | Record Version Number | Integer | 2 | Must be "6" | Y |
3 | Number of Records | Integer | 5 | Total number of transactions | Y |
4 | End of Record Marker | Control | 1 | Carriage Return Code (ASCII 10) | Y |
Status: Accepted
Category: Protected
Authored By: Rama on Sep 01, 2023
Revisions
03 Jun, 2024 - Resolved Documentation Discrepancy, VN-12905
23 Apr, 2024 - Update Post paybill Integration, VN-11017
09 Feb, 2024 - Update Post FNP Integration, VN-11235
11 Jan, 2024 - Change content in daily invoice export, VN-10934
20 Nov, 2023 - changes with respect to code
22 Sep, 2023 - Add Daily Invoice Export Documentation, VN-9668
26 Sep, 2024 - Update LC line dependency on addLCLineForInvoice flag, VN-14508
26 Nov, 2024 - Update External Code field notes in IL line, VN-15156
06 Dec, 2024 - Update Setup Required section and add a helpful image.
02 Apr, 2025 - Update the documentation to have separate doc for invoice and credit blocks.
07 May, 2025 - Update the calculations along with the diagrams representing how they are calculated.
09 May, 2025 - Revise Lease Company name column based on Paybill value and Direct Paybill name setting, VN-18231