Purpose
The RFF (Reference) segment provides reference numbers that link the current message to other business documents or identifiers. It is one of the most commonly used segments in EDIFACT because business transactions rarely exist in isolation. An invoice references the purchase order it fulfills. A despatch advice references the order being shipped. A credit note references the original invoice being corrected.
The RFF segment uses a qualifier code to specify what type of reference is being provided, and it can appear multiple times within a message to convey different references. It frequently appears alongside a DTM segment to provide the date associated with the referenced document.
Data Elements
The RFF segment contains one composite data element:
- C506 - Reference:
- 1153 - Reference Code Qualifier: Identifies the type of reference. Common qualifiers include:
- ON - Order number (buyer's)
- VN - Supplier's order number
- IV - Invoice number
- DQ - Delivery note number
- CT - Contract number
- AAK - Despatch advice number
- CR - Customer reference
- ACD - Additional reference number
- PQ - Payment reference
- VA - VAT registration number
- 1154 - Reference Identifier: The actual reference number or identifier string.
- 1156 - Document Line Identifier (conditional): Identifies a specific line within the referenced document.
- 4000 - Reference Version Identifier (conditional): Identifies a specific version of the referenced document.
- 1153 - Reference Code Qualifier: Identifies the type of reference. Common qualifiers include:
Format and Syntax
The general format of a RFF segment is:
RFF+qualifier:referenceNumber' With a line reference:
RFF+qualifier:referenceNumber:lineNumber' All components are part of the composite element C506, separated by colons.
Messages That Use RFF
RFF is used extensively across EDIFACT message types:
- INVOIC - References to purchase orders, delivery notes, contracts
- ORDERS - References to contracts, previous orders, quotations
- DESADV - References to orders, delivery notes
- REMADV - References to invoices being paid
- ORDRSP - References to the original order being responded to
- CONTRL - References to the interchange being acknowledged
Example
A buyer's order number reference:
RFF+ON:PO-2024-0042' Qualifier ON means "order number" and PO-2024-0042 is the purchase order number. This commonly appears in an invoice to identify which order the invoice relates to.
An invoice reference with a date (using an accompanying DTM):
RFF+IV:INV-2024-0815'
DTM+171:20240301:102' The RFF segment provides the invoice number INV-2024-0815 (qualifier IV), and the following DTM with qualifier 171 (reference date) indicates the invoice was dated 1 March 2024.
A contract reference at the header level of a purchase order:
RFF+CT:FRAME-AGR-2024-100' This references the framework contract FRAME-AGR-2024-100 under which the order is placed.