---
title: IHierarchialTransaction
summary: API reference for IHierarchialTransaction.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-15
library: SAIF.Framework.Common.Files
reference_type: package
---

# IHierarchialTransaction

`IHierarchialTransaction` is the contract implemented by `HierarchialTransaction`; it extends `ISegmentGroup` with the BHT-rooted `LevelData`/`HierarchialTransactionSegment` and nested `Levels` surface required to model a hierarchical transaction ([BR-035](../../business-rules.md#br-035-hierarchical-levels-nested-inside-hierarchical-transaction)).

## Purpose
- Declares the typed `LevelData` (BHT) accessor, raw `HierarchialTransactionSegment`, member `Segments`, and the nested `Levels` collection that any hierarchical-transaction implementation must provide.

## Context
- Namespace: `SAIF.Common.Files.Edi`
- Assembly/package: `SAIF.Framework.Common.Files`
- Extends: `ISegmentGroup`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| LevelData | `BhtSegment LevelData { get; }` | The strongly-typed BHT segment for this hierarchical transaction. |
| HierarchialTransactionSegment | `IEdiSegment HierarchialTransactionSegment { get; }` | The raw BHT segment used as the source for `LevelData`. |
| Segments | `IEnumerable<IEdiSegment> Segments { get; }` | This hierarchical transaction's member segments with control segments excluded ([BR-033](../../business-rules.md#br-033-control-segments-excluded-from-member-segments-collections)). |
| Levels | `IList<IHierarchialLevel> Levels { get; }` | The hierarchical levels (HL-rooted) nested within this hierarchical transaction ([BR-035](../../business-rules.md#br-035-hierarchical-levels-nested-inside-hierarchical-transaction)). |

## Inherited public members

Members in this section are inherited from `ISegmentGroup` in `SAIF.Framework.Common.Files`. They are available on this type through inheritance.

| Member | Signature | Purpose | Origin |
| --- | --- | --- | --- |
| Index | `int Index { get; set; }` | The sequential ordinal assigned to this hierarchical transaction among its siblings. | `SAIF.Framework.Common.Files` — `ISegmentGroup` |
| Key | `string Key { get; set; }` | The BHT01 value that uniquely identifies this hierarchical transaction ([BR-034](../../business-rules.md#br-034-group-keys-derived-from-control-number-elements)). | `SAIF.Framework.Common.Files` — `ISegmentGroup` |
| SegmentGroupId | `string SegmentGroupId { get; set; }` | The segment tag (`"BHT"`) that this group was delimited by during parsing. | `SAIF.Framework.Common.Files` — `ISegmentGroup` |
| Level | `int Level { get; set; }` | The nesting depth of this group. | `SAIF.Framework.Common.Files` — `ISegmentGroup` |

## Sources
- Common\SAIF.Common.Files\Edi\IHierarchialTransaction.cs
