Search Results as_terr_resources_tmp




Overview

AS_TERR_RESOURCES_TMP is a transient staging table owned by the OSM schema within the AS – Sales Foundation product family of Oracle E-Business Suite (documented across 12.1.1 and 12.2.2). Per the ETRM metadata, its stated purpose is to "hold territory assignment results." In practice, the table acts as an intermediate landing zone used by the Territory Assignment and Resources engine: the territory assignment batch process evaluates customer parties, party sites, and leads against defined territory rules in JTF_TERR_ALL, resolves the qualifying sales resources and resource groups, and writes the candidate rows into this temporary table before they are promoted into the permanent territory resource assignments. Because the contents are scoped to a single concurrent program run, it is an ephemeral, run-scoped structure rather than a durable master or transactional entity.

From a Data Vault modeling perspective, the heuristic classification mined from the foreign key structure is link. This is consistent with the table's role: it captures relationships between parties, party sites, leads, territories, resources, and resource groups rather than storing descriptive attributes about any single business entity.

Key Information Stored

The table comprises 13 documented columns. The most significant are:

The documented unique index AS_TERR_RESOURCES_TMP_U1 spans (TERR_ID, RESOURCE_ID, RESOURCE_GROUP_ID, PARTY_ID, PARTY_SITE_ID, LEAD_ID), making this composite the business-key candidate. The metadata does not document a separate single-column surrogate primary key.

Common Use Cases and Queries

Typical uses are diagnostic and reconciliation-oriented. Administrators inspect the temporary results of a territory assignment run before or after promotion, verify that a specific party or lead was correctly matched, and troubleshoot missing or duplicate assignments.

  • Review the outcome of the most recent run: SELECT * FROM AS_TERR_RESOURCES_TMP WHERE REQUEST_ID = :request_id;
  • Check assignments for a given party: SELECT TERR_ID, RESOURCE_ID, RESOURCE_GROUP_ID, FULL_ACCESS_FLAG FROM AS_TERR_RESOURCES_TMP WHERE PARTY_ID = :party_id;
  • Reconcile against territories by joining TERR_ID to JTF_TERR_ALL.
  • Audit resource-level coverage by grouping on RESOURCE_ID and RESOURCE_GROUP_ID.
  • Validate run completeness using PROGRAM_UPDATE_DATE and REQUEST_ID.

Because rows are run-scoped, queries should always filter by REQUEST_ID to avoid mixing results from concurrent executions.

Related Objects

The documented foreign keys establish these principal dependencies:

  • JTF_TERR_ALL via TERR_ID – the territory definition.
  • JTF_RS_RESOURCE_EXTNS via RESOURCE_ID – the assigned sales resource.
  • JTF_RS_GROUPS_B via RESOURCE_GROUP_ID – the assigned resource group.
  • HZ_PARTIES via PARTY_ID – the customer party.
  • HZ_PARTY_SITES via PARTY_SITE_ID – the party site.
  • AS_LEADS_ALL via LEAD_ID – the lead record.
  • FND_SECURITY_GROUPS via SECURITY_GROUP_ID – the security group context.

Taken together, these relationships confirm AS_TERR_RESOURCES_TMP as the link table bridging territory definitions, resources, and the parties, sites, and leads they are assigned to.