In Electronic Data Interchange (EDI), BHT stands for Beginning of Hierarchical Transaction. It is a fundamental segment used to initiate and identify a specific business transaction within an X12 EDI document.
The BHT segment is a critical control segment that signifies the start of a transaction set, providing essential information about the nature and purpose of the business document being exchanged. This segment is crucial for the correct interpretation and processing of the subsequent data within any EDI transaction.
Key Aspects of BHT in EDI
The BHT segment contains vital information that helps the receiving system understand and process the EDI document correctly. Its primary role is to set the context for the entire transaction set that follows.
- Transaction Set Identification: The BHT segment typically carries a code that identifies the specific type of business document, such as a Purchase Order (EDI 850), Invoice (EDI 810), or Ship Notice/Manifest (EDI 856). This element is crucial for routing and processing the document.
- Purpose Code: It includes a code indicating the purpose of the transaction, such as whether it's an original document ("00"), a cancellation ("01"), or a replacement ("05"). This helps manage different scenarios for the same transaction type.
- Transaction Type Code: This element provides a more granular classification of the transaction within its broader category, offering additional detail about the specific business process.
- Date and Time: The segment also records the date and, optionally, the time when the transaction was originally created, providing a precise timestamp for the document's inception.
- Reference Identification: Often, a unique reference number pertinent to the transaction (e.g., a purchase order number or invoice number) is included, facilitating easy tracking and reconciliation.
Structure and Placement
The BHT segment is always positioned as the first segment within an EDI transaction set, appearing immediately after the functional group header (GS segment) and interchange control header (ISA segment). Its consistent placement ensures that the receiving system can immediately identify the type and purpose of the incoming business document.
Typical BHT Data Elements
Here's a breakdown of common data elements found within the BHT segment for an X12 transaction:
Element | Description | Example Value | Purpose |
---|---|---|---|
BHT01 | Hierarchical Structure Code | 0010 |
Defines the structure of the transaction set (commonly "0010" for X12). |
BHT02 | Transaction Set Purpose Code | 00 |
Indicates the purpose (e.g., "00" for original, "01" for cancellation). |
BHT03 | Transaction Type Code | PO |
Specifies the transaction type (e.g., "PO" for Purchase Order, "IV" for Invoice). |
BHT04 | Reference Identification | ABC12345 |
A unique identifier for the transaction (e.g., PO number, Invoice number). |
BHT05 | Date | 20231027 |
The date the transaction was created (YYYYMMDD). |
BHT06 | Time (Optional) | 1430 |
The time the transaction was created (HHMM or HHMMSS). |
Note: The exact elements and their order may vary slightly depending on the specific X12 version and transaction set implementation guidelines.
Why is BHT Crucial?
The BHT segment plays a vital role in EDI for several reasons:
- Accurate Identification: It unambiguously identifies the type and intent of the EDI document, preventing misinterpretation by automated processing systems.
- Process Initiation: It signals the start of a new business process or transaction, allowing the receiving system to prepare for and correctly parse the upcoming data segments.
- Data Validation: The information in BHT assists in initial data validation, ensuring that the expected transaction type matches the received content.
- Audit Trail: The date, time, and reference identification provide valuable information for auditing, tracking, and reconciling the flow of business documents between trading partners.
Example Use Case (Purchase Order - EDI 850)
When a buyer sends a Purchase Order (EDI 850) to a supplier, the BHT segment within that 850 document would typically appear as follows:
BHT*0010*00*PO*ORD789012*20231027*1430~
In this example:
BHT
identifies the segment.0010
(BHT01) is the hierarchical structure code.00
(BHT02) indicates that this is an original transaction.PO
(BHT03) specifies that the document is a Purchase Order.ORD789012
(BHT04) is the unique Purchase Order number.20231027
(BHT05) is the date of creation (October 27, 2023).1430
(BHT06) is the time of creation (2:30 PM).
Further Resources
For more detailed information on X12 EDI segments and standards, you can refer to reputable sources: