Search Results jty_assign_bulk_pub




Overview

JTY_ASSIGN_BULK_PUB is a public PL/SQL package body owned by the APPS schema within Oracle E-Business Suite, catalogued in ETRM under the Territory Management (JTY/JTF) product family. Its business purpose is to perform bulk territory assignment — evaluating, scoring, and assigning large populations of entities (customers, prospects, or other resources) against territory definitions in the Territory Manager, rather than processing assignments one record at a time. The package is classified as a PUB API, indicating it is intended for direct invocation by external callers rather than being an internal-only private package. In EBS 12.1.1 and 12.2.2 it remains VALID and forms part of the infrastructure supporting Territory Assignment Engine (TAE) and Deal Registration/qualification-driven assignment flows.

The body is comparatively self-contained: it is not referenced by any other database object according to the dependency metadata, meaning it sits at the top of its call graph and is consumed by concurrent programs, forms, or custom code rather than by sibling packages. Its design reflects the bulk-assignment pattern: gather transactional and qualifying data, resolve territory match candidates, apply winner-determination logic, and persist the resulting territory assignments.

Key Procedures and Functions

The documented public API exposes four procedures and functions:

  • COLLECT_TRANS_DATA — Collects the transactional or qualification data required for bulk assignment. This routine stages the input population and associated qualifying attributes so that subsequent winner-determination logic can operate against a defined working set.
  • GET_WINNERS — Evaluates the staged population against territory definitions and qualifying criteria, returning or identifying the territories that "win" the assignment for each entity. This encapsulates the ranking/scoring comparison that determines the successful territory per input record.
  • PROCESS_LEVEL_WINNERS — Processes the winners resolved at an intermediate level of the assignment hierarchy. Territory assignment can be evaluated in multiple passes or levels; this procedure handles the persistence and follow-on processing for winners at that level.
  • PROCESS_FINAL_LEVEL_WINNERS — Performs the terminal processing of winning assignments after all levels have been evaluated, committing the final territory assignment results for the bulk run.

No parameter lists are documented and none are asserted here; callers should reference the package specification (JTY_ASSIGN_BULK_PUB) for exact signatures.

Tables Accessed

The package reads and writes a broad set of Territory Manager and qualifier model tables via APPS synonyms. Core territory definition and resource tables include JTF_TERR_ALL, JTF_TERR_RSC_ALL, and JTF_TERR_RSC_ACCESS_ALL, which define territories, their assigned resources, and access rules. Qualifier metadata is sourced from JTF_QUAL_TYPES_ALL, JTF_QUAL_TYPE_USGS, JTF_TERR_QTYPE_USGS_ALL, and JTF_TAE_QUAL_PRODUCTS.

Assignment working and result data are held in JTY_CHANGED_TERRS (territories affected by a change), JTY_DEA_ATTR_PRODUCTS and its SQL variant JTY_DEA_ATTR_PRODUCTS_SQL, JTY_TAE_ATTR_PRODUCTS_SQL, and JTY_TRANS_USG_PGM_DETAILS / JTY_TRANS_USG_PGM_SQL, which support usage-program (eligibility/qualification) evaluation. Utility dependencies include AD_DDL for dynamic DDL operations and ALL_TAB_COLUMNS for metadata introspection — consistent with a package that builds or validates temporary structures at runtime. External dependencies include FND_API, FND_GLOBAL, FND_INSTALLATION, FND_LOG, and FND_MSG_PUB, providing the standard API return-status convention, session context, release-level checks, debug logging, and message stack handling.

Usage Notes

JTY_ASSIGN_BULK_PUB is typically invoked from concurrent programs or batch processes that perform territory realignment over large volumes, rather than from interactive forms. Custom code should treat it as a public API: call COLLECT_TRANS_DATA to stage input, GET_WINNERS to resolve matches, then the two PROCESS_*_WINNERS routines to persist results at intermediate and final levels. Because the package depends on FND_API and FND_MSG_PUB, callers should check the standard return status and inspect the message stack on error. The presence of AD_DDL and ALL_TAB_COLUMNS suggests runtime creation of working tables, so the executing user requires appropriate DDL privileges. Being top-of-graph and unreferenced by other objects, invocation is expected from external callers; the metadata documents twelve packages referencing it, confirming its role as a shared assignment entry point in both 12.1.1 and 12.2.2.