Skip to content
English
  • There are no suggestions because the search field is empty.

Generic Purchase Order And Invoice File Formats

Back Office - What To Consider

This article outlines the specifications of the generic file formats for Purchase Orders and Supplier Invoices used by Swiftpos.

 

Subjects      ▲ ▼

 

About      ▲ ▼

 

What To Consider?      ▲ ▼

  • When requesting electronic invoices from LMG, request format 6. This format is described below.

 

Notes ...

 

Do not request format 5 and attempt to import it as a Metcash invoice as it will not be successful.

 

  • Prior to creating Purchase Orders:
    • Ensure the Supplier details held in Back Office are correct.
    • Ensure the Venue's ABN is recorded in the Swiftpos Registration screen. This identifies the Venue as the source of the document.

     

    When Is It Used?      ▲ ▼

    It is intended for use by both internal and external developers and any other POS Suppliers who are interested in developing an industry standard for integration between wholesalers and POS systems. The basis of the design is that the Purchase Order structure matches the Supplier Invoice structure so it is possible to create a Purchase Order and lifecycle it into the software as a Suppliers' Invoice for testing purposes.

     

    File Formats      ▲ ▼

     

    PDT Receipts (QuickFuel)      ▲ ▼

    The file format is:

    Receipt#, Supplier, Barcode, Qty, Cost, Date, Description, Link P/O.

     

    Purchase Order File (PO)      ▲ ▼

     

    File Name Structure      ▲ ▼

    The structure of the file name is YYYYMMDD00000*.txt, where:

    • YYYY is the year (For example, 2014)
    • MM is the month (For example, 05)
    • DD is the day of the month (For example, 24)
    • 00000 is the Purchase Order number (For example, 22464)
    • * is a variable (For example, the supplier's ID, Metcash)
    • TXT is the file extension

     

     Example: 2014052422464Metcash.txt

     

    What Is Required?      ▲ ▼

    The PO File must comply with the following formatting rules:

    • The file must be CSV (comma separated variable) formatted.
    • Makes use of the CR-LF character for line termination.
    • All text fields must be enclosed within double quotes. For example : "1380DIN". Double quotes must NOT be embedded in the text itself.
    • Numeric values and Currency amounts are limited to 2 decimal places.
    • Currency Amounts must NOT contain currency symbols. For example the $ symbol must not prefix the amount.
    • Each record (line) must contain a record identifier at the start of the record to indicate the type of data, ie. the Record Type. The following Record Types are valid:

     

    Notes ...

     

    Each record (line) can contain up to 10 fields for data use. Some of which are reserved for specific data, while others remain available for potential future use.

     

    PO Header (Record Type H)      ▲ ▼
    Field# Field Field Type Length Valid Values Comments
    1 Record Type ID Text 1 H  
    2 Account ID Text 20 Alphanumeric Supplier's Account ID
    3 Location ID Text 4 Range 1 to 9999 Default to 1 if Location is not known.
    4 Clerk ID Long Integer   Numeric  
    5 Supplier ABN Text 20 Alphanumeric  
    6 PO Number Text 10 Numeric  
    7 PO Date Date 10 Alphanumeric Specify in mm/dd/yyyy format
    8 Supplier ID Text 10 Alphanumeric  
    9 Not used     Null For future use
    10 Not used     Null For future use
    11 Not used     Null For future use
    Example H,"","3366",0,"",00017,03/28/2016,,,,,

     

    PO Item (Record Type I)      ▲ ▼
    Field# Field Field Type Length Valid Values Comments
    1 Record Type ID Text 1 I  
    2 Supplier Code Text 13 Alphanumeric  
    3 Item Description Text 30 Alphanumeric  
    4 Cost Double   Numeric Last Purchase Price per Unit
    5 Case Qty Double   Numeric Quantity of Units in a Case. Example : 12 or 24 (Used in conjunction with Field # 5 below)
    6 Cases Double 5 Numeric No. of Cases. Specify a value of zero (0) if ordering in Units
    7 Units Double 10 Numeric Quantity or No. of Units. Specify a value of zero (0) if ordering in Cases
    8 Total Excl Tax Double   Numeric Total Line Cost based on Last Purchase Price multiplied by Qty Ordered. Excluding Tax
    9 Total Incl Tax Double   Numeric Total Line Cost based on Last Purchase Price multiplied by Qty Ordered. Including Tax
    10 Total Tax Double   Numeric Total calculated Tax
    11 Product Barcode Text 13 Numeric First Product Barcode
    12 Product Code Text 13 Alphanumeric Back Office Product Code
    Examples I, "500042", "THEAKSTONS OLD PECUL 330ML", 1.88, 24, 2, 3, 95.88, 95.88, 0.00,9415767017320,TOP330

    I, "500131", "MCCALLUMS SCOTCH 1125ML", 31.20, 12, 2, 0, 748.80, 748.80, 0.00,9415767017306,MS1125

    I, "500173", "RENMANO R/BRZ RIESLING 750ML", 2.85, 12, 0, 6, 17.10, 17.10, 0.00,9415767019720,RR750


    To order 2 cases and 6 single bottles where the Case Qty was 12 it would look like this. Field 5 = 12, Field 6 = 2 and Field 7 = 6. The total quantity in units is not shown because it is calculated internally by multiplying Field 5 by Field 6 and adding Field 7. Like this (2 x 12) = 24 + 6 = 30 units.

     

    PO Detail (Record Type D)      ▲ ▼
    Field# Field Field Type Length Valid Values Comments
    1 Record Type ID Text 1 D  
    2 Delivery Address Text 245 Alphanumeric  
    3 Delivery Date Date 10 Alphanumeric Specify in mm/dd/yyyy format
    4 Not used     Null For future use
    5 Not used     Null For future use
    6 Not used     Null For future use
    7 Not used     Null For future use
    8 Not used     Null For future use
    9 Not used     Null For future use
    10 Not used     Null For future use
    11 Not used     Null For future use
    Example D, "Ring the bell at the back door Deliveries only between 8am and 2pm Monday to Friday",03/28/2016,,,,,,,,

     

    PO Totals (Record Type T)      ▲ ▼
    Field# Field Field Type Length Valid Values Comments
    1 Record Type ID Text 1 T  
    2 Item Count Integer   Numeric Total Number of Items
    3 PO Total Excl Tax Double   Numeric Total of PO Items Excluding Tax
    4 PO Total Tax Double   Numeric Total of PO Items Tax
    5 Not used     Null For future use
    6 Not used     Null For future use
    7 Not used     Null For future use
    8 Not used     Null For future use
    9 Not used     Null For future use
    10 Not used     Null For future use
    11 Not used     Null For future use
    Example

    T, 3, 312.00, 0.00,,,,,,,

     

    Example Of A Purchase Order File     ▲ ▼

    H, "12223255", "0001", 1, "123456", "00011", 03/24/2014,,,,

    I, "500042", "THEAKSTONS OLD PECUL 330ML", 1.88, 24, 2, 3, 95.88, 95.88, 0.00,

    I, "500131", "MCCALLUMS SCOTCH 1125ML", 31.20, 12, 2, 0, 748.80, 748.80, 0.00,

    I, "500173", "RENMANO R/BRZ RIESLING 750ML", 2.85, 12, 0, 6, 17.10, 17.10, 0.00,

    D, "Ring the bell at the back door Deliveries only between 8am and 2pm Monday to Friday",,,,,,,,,

    T, 3, 312.00, 0.00,,,,,,,

     

    Supplier Invoice File (CSV)      ▲ ▼

    The file's format is:

     Barcode, Count, Location, Reference ID

     

    For Example:

    9300694281046,10,5,789
    5011013100156,10,5,789
    9300694281046,10,5,987
    4901777020320,10,5,987
    9300694373246,10,5,987 

     

    Supplier Invoice File (INV)      ▲ ▼

     

     

    When Is It Used?     ▲ ▼

    3rd party applications can generate Supplier invoice files using the Swiftpos generic Supplier Invoice File (INV) format. For example:

     

    File Name Structure     ▲ ▼

    The structure of the file name is YYYYMMDD*.inv, where:

    • YYYY is the year (For example, 2014)
    • MM is the month (For example, 05)
    • DD is the day of the month (For example, 24)
    • * is a variable (For example, the supplier's ID, Metcash)
    • INV is the file extension

     

    Example: 20140524Metcash.inv

     

    What Is Required?     ▲ ▼

    The Supplier Invoice File must comply with the following formatting rules:

    • The file must be CSV (comma separated variable) formatted.
    • Makes use of the CR-LF character for line termination.
    • All text fields must be enclosed within double quotes. For example : "1380DIN". Double quotes must NOT be embedded in the text itself.
    • Numeric values and Currency amounts are limited to 2 decimal places.
    • Currency Amounts must NOT contain currency symbols. For example the $ symbol must not prefix the amount.
    • Each record (line) must contain a record identifier at the start of the record to indicate the type of data, ie. the Record Type. The following Record Types are valid:

     

    Notes ...

     

    Each record (line) can contain up to 10 fields for data use. Some of which are reserved for specific data, while others remain available for potential future use.

     

    • Multiple Invoices from the same Supplier may exist in a single file.
    • Invoices can be transmitted electronically and stored in a nominated directory on the clients computer ready for import into Swiftpos.
    • Prior to importing invoice files, ensure:
      • The files from emails received from Suppliers are saved in the default folder.
      • Merge and append all the invoice files into one large text (CSV) file.
      • Once all invoice files have been merged into one, delete the individual invoice files from the folder.
      • Using the Import File option from the Invoice Import menu item, import the text (CSV) file created above.

     

    INV Header (Record Type H)     ▲ ▼
    Field# Field Field Type Length Valid Values Comments
    1 Record Type ID Text 1 H  
    2 Account ID* Text 20 Alphanumeric Account ID from Supplier. Swiftpos will attempt to match this field with the Swiftpos Supplier's Account. If no match is found, then matching will be done using the Supplier?s ABN (see field# 5 below) and the Swiftpos Supplier's Company No.
    3 Location ID Text 4 Range 1 to 9999 Default to 1 if Location is not known.
    4 Supplier Name Text 50 Alphanumeric  
    5 Supplier's ABN Text 20 Alphanumeric  
    6 INV Number Text 15 Alphanumeric  
    7 INV Date Date 10 Alphanumeric Specify in mm/dd/yyyy format
    8 Admin Fees Double   Numeric or Null  
    9 Document Type Integer   0/1/2 0 or 1 = Invoice, 2 = Credit Note
    10 PO Number Text 10 Numeric  
    11 Invoice URL or Filename TEXT 2048    
    Example H,"123456","0004",,"123456","000000000000012",09/30/2014,,2,,

     

    INV Item (Record Type I)     ▲ ▼
    Field# Field Field Type Length Valid Values Comments
    1 Record Type ID Text 1 I  
    2 Stock Code Text 20 Alphanumeric Stock Code from Supplier. Swiftpos will attempt to match this field with the Swiftpos Supplier's Order Code. If no match is found, then matching will be done using this field and the Swiftpos Product's Product Code. If no match is found, then matching will be done using this field and the Swiftpos Product's Description. If there is still no match it will record the item without a Stock Code but leave the Supplier's Stock Code and Description intact so that the Customer is able to match it against the Product purchased.
    3 Description Text 30 Alphanumeric Item Description
    4 Not used   Null For future use
    5 Case Qty Double   Numeric Quantity of Units in a Case. Example : 12 or 24 (Used in conjunction with Field # 6 below)
    6 Cases Double 5 Numeric No. of Cases. Specify a value of zero (0) if ordering in Units only
    7 Units Double 10 Numeric No. of Units. Specify a value of zero (0) if ordering in Cases only
    8 Total Excl Tax Double   Numeric Total item value excluding Tax
    9 For future use     Null  
    10 Total Tax Double   Numeric Total item Tax value
    11 Barcode Text 14    
    Examples I,"1111","B. CROWN LAGER STUB T/A",2.09,,,-15,-31.35,-34.49,-3.14,

    I,"1112","CTN TOOHEYS OLD",10.24,,,-12,-122.88,-122.88,.00,

    I,"1149","CTN TOOHEYS BLUE",7.97,,,-6,-47.82,-52.60,-4.78,


    To receive 2 cases and 6 single bottles where the Case Qty was 12 it would look like this. Field 5 = 12, Field 6 = 2 and Field 7 = 6. The total quantity in units is not shown because it is calculated internally by multiplying Field 5 by Field 6 and adding Field 7. Like this (2 x 12) = 24 + 6 = 30 units.

     

    INV Delivery Detail (Record Type D)     ▲ ▼
    Field# Field Field Type Length Valid Values Comments
    1 Record Type ID Text 1 D  
    2 Delivery Address Text 245 Alphanumeric  
    3 Not used     Null For future use
    4 Not used     Null For future use
    5 Not used     Null For future use
    6 Not used     Null For future use
    7 Not used     Null For future use
    8 Not used     Null For future use
    9 Not used     Null For future use
    10 Not used     Null For future use
    11 Not used     Null For future use
    Example D, "Ring the bell at the back door Deliveries only between 8am and 2pm Monday to Friday",,,,,,,,,

     

    INV Totals (Record Type T)     ▲ ▼
    Field# Field Field Type Length Valid Values Comments
    1 Record Type ID Text 1 T  
    2 Item Count Integer   Numeric Total Number of Items
    3 INV Total Excl Tax Double   Numeric Total of INV Items Excluding Tax.
    4 INV Total Tax Double   Numeric Total of INV Items Tax
    5 Freight Excl Tax Double   Numeric Freight Excluding Tax
    6 Freight Tax Double   Numeric Freight Tax
    7 Discount Double   Numeric Total Discount
    8 Not used     Null For future use
    9 Not used     Null For future use
    10 Not used     Null For future use
    11 Not used     Null For future use
    Example T,3,-202.05,-7.92,,,,,,,

     

    Example Of A Supplier Invoice File     ▲ ▼

    Swiftpos will attempt to match the Account ID field supplied in the Invoice Header with the field called Account No in the Supplier Details menu. If there is no match it will try matching the Supplier's ABN field with the field called Supplier ABN in the Supplier Details menu. 

    H,"123456","4",0,"123456",00012,09/30/2002,,2,,

    I,"1111","B. CROWN LAGER STUB T/A",2.09,,,-15,-31.35,-34.49,-3.14,

    I,"1112","CTN TOOHEYS OLD",10.24,,,-12,-122.88,-122.88,.00,

    I,"1149","CTN TOOHEYS BLUE",7.97,,,-6,-47.82,-52.60,-4.78,

    D," ",,,,,,,,,

    T,3,-202.05,-7.92,,,,,,,



    H, "12223255", "1", 1, "123456", "00011", 03/24/2002, , , ,

    I, "500042", "THEAKSTONS OLD PECUL 330ML", 1.88, 24, 2, 3, 95.88, 95.88, 0.00,

    I, "500131", "MCCALLUMS SCOTCH 1125ML", 31.20, 12, 2, 0, 748.80, 748.80, 0.00,

    I, "500173", "RENMANO R/BRZ RIESLING 750ML", 2.85, 12, 0, 6, 17.10, 17.10, 0.00,

    D, "Ring the bell at the back door Deliveries only between 8am and 2pm Monday to Friday", , , , , , , , ,

    T, 3, 312.00, 0.00, , , , , , ,,

     

    Supplier Invoice File (XML)      ▲ ▼

    Refer HERE to download an example of a Supplier Invoice XML file.

     

    How To?      ▲ ▼

     

    End of article      ▲