Search Results escalation_territory_flag




Overview

The view APPS.JTF_TERR_SRCH_ADV_GEN_V is a CRM Foundation (JTF) reporting object that presents territory definitions in a denormalized, human-readable format suitable for advanced territory search and integration. It is owned by the APPS schema and is documented as VALID in Oracle EBS 12.1.1 and 12.2.2. The view resolves the internal identifiers stored on the base territory record into descriptive names, exposing parent, escalation, and template territory labels alongside the territory's own name and type.

Its principle purpose is to support advanced territory search functionality within Oracle Territory Manager, where applications and integration points must resolve territory relationships by name rather than by surrogate key. Because the view joins multiple aliases of JTF_TERR to itself, it collapses the parent, escalation, and template hierarchies into a single flat row per territory, which simplifies downstream queries and reporting.

Underlying Base Objects

The ETRM metadata documents the view as defined over four referenced base objects, all accessed through synonyms: JTF_SOURCES_ALL, JTF_TERR, JTF_TERR_TYPES, and JTF_TERR_USGS. The view text reveals the precise join structure:

  • JTF_TERR is referenced four times, aliased JT7 (the primary territory), JT8 (parent territory), JT9 (escalation territory), and JT10 (template territory). JT7 drives the result set.
  • JTF_TERR_TYPES (JTY) supplies the territory type name and is joined with an outer join on TERRITORY_TYPE_ID = TERR_TYPE_ID.
  • JTF_TERR_USGS (JTU) supplies territory usage by source and is outer-joined on TERR_ID.
  • JTF_SOURCES_ALL (JS) provides the source meaning and is joined on JTU.SOURCE_ID = JS.SOURCE_ID.

The parent territory join is an inner join, meaning every returned row must have a resolvable parent territory; the escalation and template joins are outer joins, permitting territories that define no escalation or template to remain visible.

Key Columns

  • TERR_ID — Primary identifier of the territory record.
  • NAME (exposed as TERRITORY_NAME) — The territory name.
  • DESCRIPTION — Descriptive text for the territory.
  • RANK — Priority ranking used in territory qualification and resolution.
  • PARENT_TERR_NAME — Resolved name of the parent territory.
  • START_DATE_ACTIVE / END_DATE_ACTIVE — Effective dating for the territory.
  • ESCALATION_TERRITORY_FLAG — Indicates whether the territory participates in escalation. This is the column most directly associated with the search term escalation_territory_flag.
  • ESCALATION_TERR_NAME — Resolved name of the escalation territory, derived from the outer join to JT9.
  • TEMPLATE_FLAG / TEMPLATE_TERR_NAME — Flag and resolved name for template-based territories.
  • TERRITORY_TYPE_NAME — Descriptive type of the territory.
  • MEANING (exposed as TERR_USAGE) — The source usage meaning from JTF_SOURCES_ALL.

Common Use Cases and Queries

A typical requirement is to identify escalation-enabled territories and their associated escalation targets:

SELECT terr_id, territory_name, escalation_territory_flag, escalation_terr_name
FROM   jtf_terr_srch_adv_gen_v
WHERE  escalation_territory_flag = 'Y';

Because the view flattens the hierarchy, it is also convenient for territory hierarchy reporting:

SELECT territory_name, parent_terr_name, territory_type_name, rank
FROM   jtf_terr_srch_adv_gen_v
ORDER  BY parent_terr_name, rank;

Filtering by usage source supports integration and assignment purposes:

SELECT terr_id, territory_name, terr_usage
FROM   jtf_terr_srch_adv_gen_v
WHERE  terr_usage = 'Sales';

Consumers should note the inner join to the parent territory: orphan territories without a resolvable parent are excluded. Effective-date filtering should be applied explicitly using START_DATE_ACTIVE and END_DATE_ACTIVE where point-in-time correctness is required.