Skip to main content

SAVi Invoice Export

Introduction

An export file is required to process invoices for Paybill customers. The export file contains all the invoices (Credits are not included) created within ViSN for the following rate cards

  • The rate card types include:
    1. ViSN with DI Network and Paybill
    2. ViSN Hybrid - Customer’s Network and DI Network with Paybill This is not fully implemented
    3. ViSN

Purpose

Invoices for the Paybill suppliers are processed using this exports. Savi exports file is imported into Quickbooks for creating bills for each suppliers. Suppliers will be paid by the information imported into Quickbooks.

note

Since a daily manual process was laborious and error prone, a direct API integration was introduced in the mid of May 2024.

SAVi Invoice Export exports may be deprecated once the API integration has been battle tested.

File format

comma-separated values - *.csv

Fields

Column PositionHeader NameDescriptionDatatypeValidationMax lengthExample
ACustomer NameName of the CustomerstringA-Z, 0-9, specialCharacters20Next Fleet Services
BSupplier NameName of the supplierstringA-Z, 0-9, specialCharacters50Grand Repair 01
CRegistration NumberVehicle Registration Number (VRM)stringVRM standard formatNH12JBS
DInvoice Numbernumber assigned to the invoice.stringA-Z, 0-9, specialCharacters20Invoice-420
ECredit Invoice Numbernumber assigned to the Credit invoice.stringA-Z, 0-9, specialCharacters20Invoice-420
FEnquiry NumberVisn Enquiry NumberstringNumber15652
GLine DescriptionDescription of the line item on the invoicestringstringMOT
HLine AmountAmount for the line item before taxNumber0-965.25
ICredit ValueCredit amount for the lineNumber0-935
JLine Tax CodeTax code applicable to the line itemstringA-Z, 0-9, specialCharacters STANDARD -20%
KLine Tax AmountTax amount applied to the line itemnumber0-969.96
LLine TotalTotal amount for the line item, including taxstringA-Z15.02
LDateDate associated with the invoice or transactionDateDate19 Nov 2024
MType"Invoice" or "Credit"stringA-Z1Credit
NPO NumberPurchase Order number associated with the invoice or transactionstringA-Z, 0-910PO-5645

Data source

Once an invoice is created for an enquiry, Savi data is generated and prepared for export

The generated data is maintained in Firebase at

doc: /leasecompany/[leasecompanyId]/exports/[year]/[month]/[date]/enquiries/[enquiryId]
attribute: "saviData"

Setup Required

A Scheduler is required to merge all the SAVi data generated for all enquiries that were invoiced for the day.

  • Name: generateSAViPayBillExport
  • Region: europe-west2
  • Frequency: 30 23 * * *
  • TimeZone: GMT London
  • Topic: projects/biddirect-2/topics/generateSAViPayBillExport
  • Message Body:

    The request should contain a JSON object with the following parameters:

    ParameterDescription
    endDate:

    Defines the last date for data export.

    Format: yyyy-MMM-dd (e.g., 2025-Feb-10).

    Default: If skipped, it defaults to the current date.

    numberOfDaysToFetchDataFor:

    Specifies how many days of data should be included in the export.

    Default: 7 (if not provided).

    Calculation Logic:

    StepDetails
    Step 1:The start date is calculated as: endDate - (numberOfDaysToFetchDataFor - 1).
    Step 2:Both the start date and end date are included in the export.

    Example Calculation:

    InputExport Date Range
    endDate = 2025-Feb-10, numberOfDaysToFetchDataFor = 72025-Feb-04 to 2025-Feb-10 (inclusive)

Debugging Steps

  1. Ensure the enquiry is successfully invoiced.

  2. Check the rate card type in the customer-level data in the admin portal:

    • Confirm if the rate card type is one of the following:

      • VISN_NETWORK_OFFERING_SAVI
        (ViSN with DI Network and Paybill)

      • VISN
        (ViSN with Customer’s Network)

      • COST_TYPE_HYBRID_VISN
        (ViSN Hybrid - Customer’s Network and DI Network with Paybill)

  3. Check the current "Paybill" name in the lease-side supplier configuration:

    • Navigate to the lease company:

      1. Open Settings from the Main Menu.

      2. Select Supplier from the Sub Menu.

      3. Locate the supplier providing the service.

      4. Click View to access the supplier details page.

      5. Verify the "Paybill" value.

  4. Verify the Paybill and RateCard type values during enquiry creation:

    • Check the enquiry data for the following:

      • Paybill value

      • RateCard type

        Enquiry Level: /accounts/{accountId}/serviceUnits/{serviceUnitId}/enquiries/{enquiryId}

        Invoice Export Level : /accounts/{accountId}/serviceUnits/{serviceUnitId}/enquiries/{enquiryId}/invoices/export

  • If the rate card type is "VISN_NETWORK_OFFERING_SAVI" or "VISN", proceed to Step 6
  • If the rate card type is "COST_TYPE_HYBRID_VISN", continue with the next step.
  • If the rate card type is anything other than the above options, the enquiry record should not appear in the SAVi export report.
  1. Determine Paybill value handling:

    • Direct Paybill: The enquiry record should not appear in the SAVi export report.
    • ViSN Paybill: The enquiry record should appear in the SAVi export report. Proceed with further debugging.
  2. Check Firebase SAVi export node creation:

    • Verify the export data is created at the expected path: /leasecompany/{leasecompanyId}/exports/{year}/{month}/{date}/enquiries/{enquiryId}

  3. If all steps are verified and no issue is identified:

    • Raise a bug to investigate the issue further.

Downloading SAVi Invoice export file

Savi Invoice export file can be downloaded via DI Admin for a given day

Status: Accepted
Category: Protected
Authored By: Jeyakumar Arunagiri on Feb 09, 2024
Revisions
19 Apr, 2024 - Renamed SAVi Invoice Export label and updated details for rate card type - VN-12200
Revisions
29th May, 2024 - Modify SAVi Invoice Exports with correct information
- https://myvisn.atlassian.net/browse/VN-12863
Authored by: Vishwa Kumar
Revisions
11th Dec, 2024 - Added Debugging Steps
- https://myvisn.atlassian.net/browse/VN-15340
Authored by: Jeyakumar Arunagiri
Revisions
03th Feb, 2025 - Update the export file
- https://myvisn.atlassian.net/browse/VN-15908
Authored by: Jeyakumar Arunagiri