FB01 (Invoice Order File)

Name convention

FB01_<CompanyNumber>_<DateTime>_<SEQNO>.DAT

Names ComponentDescription
CompanyNumberThe company number in PayEx ledger system
DateTimeDate created in format YYYYMMDDHHMMSS
SEQNOUnbroken serial number sequence.

For example: FB01_99999_20201001155511_1.DAT

The file is semicolon-separated.

What to avoid

  • If the FB01-file contains errors witch needs to be corrected a new FB01 needs to be send with the next coming serial number
  • The customer number needs to be registred in the PayEx Billing system before processing FB01-files.

Change log

VersionDateDescriptionCreated by
1.02018-09-13

Document created

Daniel Olsson

1.12023-03-02Updated M-record. "Trial" functionality removed from field 2 and added field 3 support Company functionality to create separate invoice number series.Jakob Flodman
1.22023-09-26

Added D-Record for future use of invoice date, distribution date and due date.
Changed and removed reference to internal PFB removed in favor for a more dynamic database invoice order split flow.

Jakob Flodman


General information and explanation of records

Using invoice ordering files (FB) in the Payex Billing system gives possibilities to create invoices for one or a certain group of customers. For each customer a specified market text, attachment, document set and specified bill argument can be set

Incorrect data in fields will be returned in a detailed error file.

FB01 needs to be correct in its total to get processed.

Record description

The FB file has three different ordering records who can be used separately on a customer in the same file.

  • Normal record – B
    • The B record can be used to set the marketing texts or objects The record includes customer number, type of ordering marketing text 1 and 2.
  • Enclosure - L
    • The L record can be used to set different enclosures. The record includes customer number, type of ordering, marketing text 1, enclosures 1-4, marketing text 2.
  • Alternative layout – N
    • The N record  includes customer number, type of ordering, layout, marketing text 1, enclosures 1-4, marketing text 2.

Response files

Response files depends on which process the Company use for FB01 -files

Standard process (until 2023-09-25)

All response files are .txt format

Format errors and incorrect data in fields will be returned into an error file (BERR001..ErrorlogInvoiceOrdering).

Correct data in all fields will result into a receipt file (BRCP001..ReceiptFakturering).

Standard process receipt and error -files: Examples

Split process (as per 2023-09-26)

To regulate large volumes the FB-file can be split in several parts with a certain amount of customers

1686901240336-652.png

Split process response

All response files from the FB are semicolon separated or in xml format
Format errors and incorrect data will be returned in a general error file with name BERR030..ErrorlogInvoiceOrdering

Correct data in all fields will lead to a split receipt file with file name:  BRCP050..ReceiptInvoiceOrder
When all split parts have been processed in the Billing system a summary receipt file with name  BRCP051..ReceiptBilling will be created.

Soft validation

Some type of errors can be configured as "soft" errors. Meaning that customer numbers with certain preconfigured errors can be excluded from the FB split process. These mentioned “soft” errors will be presented as a warning (W) in BERR030..ErrorlogInvoiceOrdering instead and simultaneously returned in an .XML file with name INVOICEORDERRESPONSE.
This response file needs actions to be taken before resending the incorrect data of the customer in a new FB file after finalizing the original billing process.

Split process receipt and error -files documentation:

- BERR030..ErrorlogInvoiceOrdering

- INVOICEORDERRESPONSE

- BRCP050..ReceiptInvoiceOrder

- BRCP051..ReceiptBilling

Record description

H - Header record

Required record

Field nameField no.FormatTypeDescription
Transaction type1HReq.Header record
Firm number2N(5)Req.The firm number you receive from PayEx
Firm name3X(40)Req.Your firm name
Creation date4N(6)Req.YYMMDD – the same date as in the filename
Creation time5N(4)Req.HHMM – the time of creation

M - Metadata record

Optional record

Field nameField no.FormatTypeDescription
Transaction type1MReq.Metadata record
Test invoicing2N(2) 0 = ordinary invoicing
Invoice Order management property3N(2) 

0 = ordinary
1 = Separate invoice number sequence

Support for "Separate invoice number sequence" (value=1) needs to be set up in collaboration with PayEx.

D - Date record

Optional record

Field nameField no.FormatTypeDescription
Transaction type1DReq.Metadata record
Preferred Invoice Date2N(10) YYYY-MM-DD
Preferred Distribution Date3N(10) YYYY-MM-DD
Preferred Due Date4N(10) YYYY-MM-DD

B - Ordering record

Optional record

Field nameField no.FormatTypeDescription
Transaction type1BReq.Normal ordering record
Customer number2X(15)Req.Customer number
Type of ordering3N(2)Req.Type of ordering: See further down for information about the types available
Marketing text code14N(3) Decides which marketing text or object that will be used for the invoice. The text is set up in cooperation with PayEx.
Marketing text code25N(3) Decides which marketing text or object that will be used for the invoice. The text is set up in cooperation with PayEx.

L - Enclosure

Optional record

Field nameField no.FormatTypeDescription
Transaction type1LReq.Enclosure record
Customer number2X(15)Req.Customer number
Type of ordering3N(2)Req.Type of ordering: See further down for information about the types available
Marketing text code14N(3) Decides which marketing text or object that will be used for the invoice. The text is set up in cooperation with PayEx.
Enclosure15X(30) A code that connects the order to a specific enclosure. The codes are set up in cooperation with PayEx. An empty field indicates that no enclosure is to be added to the invoice.
Enclosure 26X(30) A code that connects the order to a specific enclosure. The codes are set up in cooperation with PayEx. An empty field indicates that no enclosure is to be added to the invoice
Enclosure37X(30) A code that connects the order to a specific enclosure. The codes are set up in cooperation with PayEx. An empty field indicates that no enclosure is to be added to the invoice
Enclosure48X(30) A code that connects the order to a specific enclosure. The codes are set up in cooperation with PayEx. An empty field indicates that no enclosure is to be added to the invoice
Not in use9X(30) Reserved for future use
Not in use10X(30) Reserved for future use
Marketing text code211N(3) Decides which marketing text or object that will be used for the invoice. The text is set up in cooperation with PayEx.

N - Alternative layout

Optional record

Field nameField no.FormatTypeDescription
Transaction type1NReq.Alternative layout record
Customer number2X(15)Req.Customer number
Type of ordering3N(2)Req.Type of ordering: See further down for information about the types available
Layout4X(30)Req.A code that connects the order to a specific enclosure. The codes are set up in cooperation with PayEx. An empty field indicates that no enclosure is to be added to the invoice
Marketing text code15N(3) Decides which marketing text or object that will be used for the invoice. The text is set up in cooperation with PayEx.
Enclosure16X(30) A code that connects the order to a specific enclosure. The codes are set up in cooperation with PayEx. An empty field indicates that no enclosure is to be added to the invoice
Enclosure 27X(30) A code that connects the order to a specific enclosure. The codes are set up in cooperation with PayEx. An empty field indicates that no enclosure is to be added to the invoice
Enclosure38X(30) A code that connects the order to a specific enclosure. The codes are set up in cooperation with PayEx. An empty field indicates that no enclosure is to be added to the invoice
Enclosure49X(30) A code that connects the order to a specific enclosure. The codes are set up in cooperation with PayEx. An empty field indicates that no enclosure is to be added to the invoice
Not in use10X(30) Reserved for future use
Not in use11X(30) Reserved for future use
Marketing text code212N(3) Decides which marketing text or object that will be used for the invoice. The text is set up in cooperation with PayEx.

S - Trailer record

Required record

Field nameField no.FormatTypeDescription
Transaction type1SReq.Trailer record
Number of records2N(8)Req.Total number of records inclusive header and trailer record.
Number of B-records3N(8)Req.The number of ordering records, normal
Not in use4N(8)Req.Leave empty, Reserved for future use
Number of L-records5N(8)Req.The number of ordering records, enclosure
Number of N-records6N(8)Req.The number of ordering records, alternative layout

Definitions and terms

Header record and Trailer record exists only once.

A customer can only occur once.

Ordering types

Ordering typeMeaningDescription
1StandardOrdinary invoicing rules will be used.
2OrderIf the customer has calls or products an invoice is created regardless to invoice amount or other invoice rules with the exception of credit invoices and invoices where the amount is zero before the round off.
3Threshold limit<not available if nothing else is agreed>
4Interval<not available if nothing else is agreed>
5Order, creditAllows credit bills, in other respects same as order.
8Standard and invoices with the amount of zero

Ordinary invoicing rules apply with the exception for invoices with the amount of zero which also will bi produced.

An invoice with the amount of zero is an invoice where the total amount of calls and/or products is zero (but not those who would be rounded off to zero).

11ForceGenerates all invoices, even the credit invoices and invoices with the amount of zero.

Example of appearance

H;99999;TestFirm;230601;1200
M;0;
D;2023-06-01;2023-06-01;2023-06-30
B;a1;1;;
B;a2;1;2;
B;a3;1;;1
N;a8;2;3;TXT1;Encl12;;;;;;
N;a9;2;7;;Encl12;;;;;;
N;a12;2;9;;;;;;;;
L;a10;1;2;Encl12;;;;;;
S;11;3;;1;3

 

Created by Anders Göthberg on 2021/04/06 10:22