---
schema_version: "1"
id: eafeff425deda86fb547ff8bd5a37f684743e6b97a28f413a13957d09e285afa
title: AccountFlattenedHierarchy
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries/advanced-orders-for-telesales/references/standard-objects/account-flattened-hierarchy.md
canonical_url: https://developer.salesforce.com/docs/industries/advanced-orders-for-telesales/references/advanced-orders-for-telesales-objects/account-flattened-hierarchy.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 55cc317b89ac1e6999169bd9b5d0e86a9425cec989baee8dbb633ce646c59252
products:
  - Advanced Orders for Telesales Developer Guide
  - Industries Developer Documentation
---
# AccountFlattenedHierarchy

Represents a flattened, denormalized view of an account's ancestor chain — up to 15 levels of parent accounts — so queries and reports can filter or group by any level of the hierarchy without recursively walking Account.ParentId. This object is available in API version 68.0 and later.

## Supported Calls

`create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()`, `update()`, `upsert()`

## Special Access Rules

Available only in orgs with Manufacturing Cloud, Automotive Cloud, or Consumer Goods Cloud enabled, or with the relevant Account Hierarchy / B2B relationship features licensed.

## Fields

### AccountId

**Type:** reference

**Properties:** Create, Filter, Group, Sort, Update

**Description:** The account whose hierarchy is being flattened.

**Relationship Name:** Account

**Refers To:** Account

### AccountLevel01Id – AccountLevel15Id

**Type:** reference

**Properties:** Create, Filter, Group, Nillable, Sort, Update

**Description:** Fifteen parallel fields, one per hierarchy level, each holding the account ID of AccountId's ancestor at that level (Level01 = immediate parent, up to Level15).

**Relationship Name:** AccountLevel01 … AccountLevel15 (one per field)

**Refers To:** Account

### CurrencyIsoCode

**Type:** picklist

**Properties:** Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update

**Description:** ISO code for the currency of this record. Possible values are: AED (UAE Dirham), USD (U.S. Dollar), and every other active currency ISO code configured for the org. The default value is USD.

### ExecutionRefIdentifier

**Type:** string

**Properties:** Create, Filter, Group, Nillable, Sort, Update

**Description:** Identifier for the batch/job execution that generated or last refreshed this flattened-hierarchy record.

### InternalOrganizationUnitId

**Type:** reference

**Properties:** Create, Filter, Group, Nillable, Sort, Update

**Description:** The internal organization unit this flattened hierarchy record applies to.

**Relationship Name:** InternalOrganizationUnit

**Refers To:** InternalOrganizationUnit

### IsPromotionRole

**Type:** boolean

**Properties:** Create, Defaulted on create, Filter, Group, Sort, Update

**Description:** Indicates whether AccountId holds a promotion-related role in this hierarchy. The default value is false.

### IsStoreRole

**Type:** boolean

**Properties:** Create, Defaulted on create, Filter, Group, Sort, Update

**Description:** Indicates whether AccountId holds a store role in this hierarchy. The default value is false.

### LastReferencedDate

**Type:** dateTime

**Properties:** Filter, Nillable, Sort

**Description:** Date on which a user last viewed a record related to this flattened-hierarchy record.

### LastViewedDate

**Type:** dateTime

**Properties:** Filter, Nillable, Sort

**Description:** Date on which a user last viewed this record.

### Name

**Type:** string

**Properties:** Autonumber, Defaulted on create, Filter, idLookup, Sort

**Description:** Auto-generated name for the flattened-hierarchy record.

### NodeLevel

**Type:** int

**Properties:** Create, Filter, Group, Nillable, Sort, Update

**Description:** The depth of AccountId within its hierarchy (number of ancestor levels populated).

### OwnerId

**Type:** reference

**Properties:** Create, Defaulted on create, Filter, Group, Sort, Update

**Description:** The user or queue that owns this record.

**Relationship Name:** Owner

**Refers To:** Group, User

### Source

**Type:** picklist

**Properties:** Create, Filter, Group, Nillable, Restricted picklist, Sort, Update

**Description:** The source object this flattened hierarchy was generated from. Possible values are Account and AccountAccountRelation.

### UsageType

**Type:** picklist

**Properties:** Create, Filter, Group, Restricted picklist, Sort, Update

**Description:** The usage context for this flattened hierarchy, for example, Retail.

## Associated Objects

This object has the following associated objects. If the API version isn't specified, they're available in the same API versions as this object. Otherwise, they're available in the specified API version and later.

- [AccountFlattenedHierarchyChangeEvent](https://developer.salesforce.com/docs/industries/advanced-orders-for-telesales/references/associated-objects/change-event.md): Change events are available for the object.
- [AccountFlattenedHierarchyFeed](https://developer.salesforce.com/docs/industries/advanced-orders-for-telesales/references/associated-objects/feed.md): Feed tracking is available for the object.
- [AccountFlattenedHierarchyHistory](https://developer.salesforce.com/docs/industries/advanced-orders-for-telesales/references/associated-objects/history.md): History is available for tracked fields of the object.
- [AccountFlattenedHierarchyOwnerSharingRule](https://developer.salesforce.com/docs/industries/advanced-orders-for-telesales/references/associated-objects/owner-sharing-rule.md): Sharing rules are available for the object.
- [AccountFlattenedHierarchyShare](https://developer.salesforce.com/docs/industries/advanced-orders-for-telesales/references/associated-objects/share.md): Sharing is available for the object.
