Search Results pv_batch_assign_pub




Overview

PV_BATCH_ASSIGN_PUB is a public PL/SQL package in the Oracle E-Business Suite Partner/Channel Management (PV) module, owned by the APPS schema and defined with AUTHID CURRENT_USER. Its name and the documented procedure signature indicate that it exists to perform batch assignment of unassigned lead records — most commonly partner or channel leads registered through Oracle Partner Management and Oracle Trade Management lead infrastructure — to resources such as channel managers, partner users, or sales representatives.

In typical EBS deployments, leads arrive from external sources (web registrations, telemarketing imports, campaign responses) and remain in an unassigned state until a routing or assignment process allocates them. PV_BATCH_ASSIGN_PUB provides the programmatic entry point for that allocation. The package is small — a single header file, pvbtasns.pls, version 120.1, dated 2005 — which indicates it is a stable interface that has not required structural change across the 12.1.1 and 12.2.2 releases. The module-level constants G_PKG_NAME and g_log_to_file show that the implementation supports optional logging to a file, a common convention in EBS public APIs for concurrent program execution diagnostics.

Key Procedures and Functions

The package exposes exactly one documented procedure, PROCESS_UNASSIGNED. Its signature declares three OUT NOCOPY parameters (ERRBUF, RETCODE) followed by three IN parameters: P_COUNTRY, P_USERNAME, and P_FROMDATE. The OUT NOCOPY convention is the standard EBS concurrent program interface: ERRBUF returns the completion message and RETCODE returns 0 for success or 1 for warning/error, values consumed by the concurrent manager and by the Standard Concurrent Program framework.

The three inbound parameters scope the run. P_COUNTRY restricts processing to leads associated with a specific country, allowing assignment rules to be applied per geography. P_USERNAME identifies the executing or owning user, typically the FND_USER name of the channel manager or administrator driving the batch, and is used for record stamping, security filtering, and audit purposes. P_FROMDATE supplies a lower date bound so that only leads created or modified on or after that date are picked up, which supports incremental nightly or on-demand runs rather than reprocessing the whole lead population. The procedure therefore performs a governed, parameter-driven sweep of unassigned leads and applies the appropriate assignment logic to each qualifying row.

Tables Accessed

The documented table references reflect the full scope of a lead assignment operation. AS_LEADS_ALL and AS_STATUSES_B belong to the Oracle Marketing/TeleSales lead schema: the former is the lead master table and the latter supplies status codes so that assignment can be limited to leads in an assignable status and updated to a post-assignment status. FND_USER is read for user validation and ownership resolution. HZ_LOCATIONS and HZ_PARTY_SITES provide address and site information used for territory or geography matching — the mechanism behind the P_COUNTRY filter. JTF_RS_RESOURCE_EXTNS supplies the resource (salesperson/channel manager) extension attributes that make a candidate assignee eligible. PV_CHANNEL_TYPES defines channel classifications that drive routing rules, and PV_LEAD_WORKFLOWS holds the workflow definitions that determine the lead lifecycle and assignment path. PLITBLM is an Oracle Marketing PL/SQL table type commonly used as a transient work area during bulk processing.

Usage Notes

This package is primarily invoked in two ways. First, as a concurrent program: the three IN parameters map directly to concurrent program parameters, and the ERRBUF/RETCODE OUT pair maps to the standard completion outputs, enabling scheduled batch assignment. Second, from custom PL/SQL or forms-based code that needs to trigger assignment on demand. Because it is classified as a public (PUB) API with AUTHID CURRENT_USER, it is intended for direct calling by customer extensions; it should be called from a session where the APPS schema is on the naming path. There are no documented calling packages (zero dependents), which confirms it is a top-level entry point rather than an internal helper. Before invoking, ensure the FND_USER, country, and date parameters are validated, since they gate the entire selection set.