Kwikfit IPP exports
Introduction
For a specific supplier group, compile a list of authorised job lines in ViSN where the enquiry status is either "Authorised" or "Partially Authorised.".
Purpose
Kwikfit currently adds authorised job lines manually into their backend system, IPP. To streamline this process, a file is generated daily containing all authorised jobs from the past 24 hours, formatted specifically to meet the requirements of Kwikfit's IPP system.
File format
each column is separated by a comma
File Naming Convention
VISN<space><space><space><space><space><YYYY><mm><dd>01.ath
example: VISN 2025101801.ath
Fields
| Column | Field | Type | Length | Comment | Mandatory | Example |
|---|---|---|---|---|---|---|
| A | Source | Text | 10 | default to 5 | Yes | 5 |
| B | CustCust | Text | 10 | Kwikfit provides a reference code for each lease company. This code must be obtained directly from Kwikfit for every lease company. All SAVi Paybill customers use a common reference ID. If no mapping exists in ViSN for a specific lease company, export an empty value. | No | P1372D |
| C | Authorisation Date | Date | 10 | DD/MM/YYYY - The last authorisation date from the enquiry level. For enquiries with multiple job lines authorised on different dates, use the most recent authorisation date for all job lines. | Yes | 21/09/2021 |
| D | Authorisation Number | Text | 20 | Enquiry number in ViSN | Yes | 57078 |
| E | Card Number | Text | 20 | empty value | No | |
| F | Registration Number | Text | 20 | VRM for this enquiry | Yes | YH17HHB |
| G | Merchant Number | Text | 20 | Empty value | No | |
| H | Mileage | Number(9,0) | 9 | Mileage saved against this enquiry | No | 10675 |
| I | Part ID | Text | 20 | For MOT, use MOT, else use Job description of the job line. (truncated to 20 characters) | Yes | BR235/55V18TUR6, 20000 Mile Service ( |
| J | Quantity | Number(9,2) | 12 | for Tyre use tyre.quantity else default to 1 | Yes | 1 |
| K | Part Net | Number(9,2) | 12 | MOT → cost.value else job line total. Formatted to 2 decimal places | Yes | 249.99 |
| L | KF Fitter | Text | 20 | For supplier Id "859", use "008". For all other supplier IDs, use "001". | No | 008 |
| M | KF Depot Code | Text | 15 | The root level supplier Id associated with the job line | Yes | 859 |
Data storage process
Save Job line data
- When the enquiry status transitions to Authorised or Partially Authorised.
- Verify the
authorisedTransactionExportvalue for the enquiry's group. - If the value is
true, save the required fields underancillary/exports/kwikfitTransactionsExport/{accountId}/authorised/{enquiryId}. - If the value is
false, do not save the data.
Delete Job line data
- When the enquiry status transitions to anything other than Authorised or Partially Authorised.
- Verify the
authorisedTransactionExportvalue for the enquiry's group. - If the value is
true, delete this enquiryancillary/exports/kwikfitTransactionsExport/{accountId}/authorised/{enquiryId}. - If the value is
false, exit the process
Location of the data
- Ensure lease export root exists (created when missing):
ancillary/exports/kwikfitTransactionsExport/{accountId}
- Save the individual enquiry transaction at:
ancillary/exports/kwikfitTransactionsExport/{accountId}/authorised/{enquiryId}
Export scheduler and configuration
- The export is triggered by a scheduler that is triggered at a predefined time.
- The scheduler reads a JSON payload with the following fields:
accountId→ Supplier Group for which to generate the exportrecipientEmailList→ Comma-separated email list to receive the exported fileforPastHours→ Time window (in hours) to fetch authorised transactions generated in the past hours
Example payload:
{
"accountId": "RMZj6hYyP4PqhobUm1zw",
"recipientEmailList": "recipient@email.com",
"forPastHours": 24
}
An export file will be created for the account ID "RMZj6hYyP4PqhobUm1zw," containing enquiries authorised within the last 24 hours. Once the file is generated, it will be emailed to recipient@email.com.
Generating the file
Data Retrieval
- Query:
ancillary/exports/kwikfitTransactionsExport/{accountId}/authorised - Filter:
updatedTimestamp >= (now - forPastHours) - Streams matching docs and collects
csvLinesfrom each document - newline character is CRLF
File Upload
- Destination bucket: Google Cloud Storage
- Path:
${accountId}/billing/${year}/${month}/${date}/{file-name-generated-in-above-step} - Content-Type:
text/plain
Email Notifications
- When data exists: send
SUPPLIER_TRANSACTION_REPORTwith the file attached - When no data: send
SUPPLIER_TRANSACTION_REPORT_FAILED - Recipients: split
recipientEmailListby comma and send to each address
Authored By: Meet Shah on Sep 25, 2025
Modified by: VIshwa Kumar on Oct 19, 2025
Modified by: VIshwa Kumar on Oct 26, 2025 (VN-21652, VN-21723)