Search Results get_potential_opportunity
Overview
AS_LINK_LEAD_OPP_PUB is a public PL/SQL package in the Oracle EBS Applications (APPS) schema that belongs to the Oracle Marketing / Sales foundation product family (AS product code). Its stated purpose, taken directly from the package header, is to "Link/Copy Leads to Opportunity." The package therefore provides the supported programmatic interface for converting or associating a sales lead record into a sales opportunity, both by linking an existing opportunity to a lead and by copying lead data into a newly created opportunity.
The package is declared with AUTHID CURRENT_USER, meaning that its SQL statements execute with the privileges of the calling schema rather than the definer. This design is typical of the AS_*_PUB API layer, which relies on APPS synonyms and the standard FND_API error-handling and message-stack conventions. The header dates from 2002 (version 115.1) and the package has remained in the documented API surface through EBS 12.1.1 and 12.2.2, where it is classified as a PUB (public) API. It exposes four documented procedures and is referenced by one other package, indicating it forms part of a small dependency chain within the sales-lead-to-opportunity conversion flow.
Key Procedures and Functions
- GET_POTENTIAL_OPPORTUNITY — Evaluates a sales lead and returns the opportunity (or opportunities) that could be associated with it, along with the corresponding opportunity line records. It is used to present candidates before a link or copy action is performed.
- COPY_LEAD_TO_OPPORTUNITY — Copies the contents of a sales lead into a new opportunity header and its lines, effectively creating an opportunity from lead data rather than merely associating the two records.
- LINK_LEAD_TO_OPPORTUNITY — Establishes an association between an existing lead and an existing opportunity without duplicating the underlying data.
- CREATE_OPPORTUNITY_FOR_LEAD — Creates an opportunity directly from a lead. This is the procedure most closely matched by the user search term "create_opportunity_for_lead," and it represents the highest-level entry point of the four for converting a lead into opportunity form.
All four procedures follow the standard EBS API signature conventions, including an API version number, message-list initialization flag, commit flag, validation level, access-check and administrative flags, administrative group identifier, and an identity salesforce identifier. Output parameters use the conventional X_Return_Status, X_Msg_Count, and X_Msg_Data pattern for the message stack. The header and line output collections are typed against AS_OPPORTUNITY_PUB.HEADER_TBL_TYPE and AS_OPPORTUNITY_PUB.LINE_TBL_TYPE, and lead profile data is passed using AS_UTILITY_PUB.Profile_Tbl_Type.
Tables Accessed
The documented metadata does not enumerate a specific table list; access is performed through APPS synonyms owned by the Marketing/Sales foundation schema. Based on the package purpose and its return types, the package reads sales lead data (the AS_SALES_LEADS_PUB record structure is an input parameter) and writes to the opportunity header and line tables underlying AS_OPPORTUNITY_PUB. It also references identity salesforce and salesgroup identifiers and lead profile data, which are used to resolve ownership and defaulting during the conversion. Because the documentation does not list explicit table names, the AR tables should not be assumed; all DML is mediated through the standard AS public table interfaces.
Usage Notes
AS_LINK_LEAD_OPP_PUB is normally invoked from the Oracle Sales and Marketing application forms that handle lead qualification and opportunity creation, where the user selects a lead and chooses to create or link an opportunity. It may also be called from concurrent programs that batch-convert qualified leads, and from custom PL/SQL or workflow code extending the standard lead-to-opportunity flow. When invoking the package directly, callers should initialize the message list, supply a valid API version number, choose the appropriate validation level, and inspect X_Return_Status plus the message stack before committing. Because the package executes with AUTHID CURRENT_USER, the calling session must be initialized to the APPS environment (FND_GLOBAL.APPS_INITIALIZE or equivalent) so that MO/APPS synonyms resolve correctly.
-
PACKAGE: APPS.AS_LINK_LEAD_OPP_PUB
12.1.1
-
PACKAGE: APPS.AS_LINK_LEAD_OPP_PUB
12.2.2
-
PACKAGE: APPS.AS_SALES_LEAD_OPP_PVT
12.1.1
-
PACKAGE: APPS.AS_SALES_LEAD_OPP_PVT
12.2.2
-
PACKAGE BODY: APPS.AS_LINK_LEAD_OPP_PUB
12.2.2
-
PACKAGE BODY: APPS.AS_LINK_LEAD_OPP_PUB
12.1.1
-
PACKAGE: APPS.AS_SALES_LEADS_PUB
12.2.2
-
PACKAGE: APPS.AS_SALES_LEADS_PUB
12.1.1
-
PACKAGE: APPS.AST_UWQ_WRAPPER_PKG
12.2.2
-
PACKAGE: APPS.AST_UWQ_WRAPPER_PKG
12.1.1
-
PACKAGE BODY: APPS.AST_UWQ_WRAPPER_PKG
12.1.1
-
PACKAGE BODY: APPS.AST_UWQ_WRAPPER_PKG
12.2.2
-
PACKAGE BODY: APPS.AS_SALES_LEADS_PUB
12.1.1
-
PACKAGE BODY: APPS.AS_SALES_LEADS_PUB
12.2.2
-
PACKAGE BODY: APPS.AS_SALES_LEAD_OPP_PVT
12.2.2
-
PACKAGE BODY: APPS.AS_SALES_LEAD_OPP_PVT
12.1.1
-
APPS.AS_LINK_LEAD_OPP_PUB dependencies on AS_OPPORTUNITY_PUB
12.1.1
-
APPS.AS_LINK_LEAD_OPP_PUB dependencies on AS_OPPORTUNITY_PUB
12.2.2
-
APPS.AS_SALES_LEAD_OPP_PVT dependencies on AS_SALES_MEMBER_PUB
12.1.1
-
APPS.AS_SALES_LEAD_OPP_PVT dependencies on AS_SALES_MEMBER_PUB
12.2.2
-
APPS.AS_LINK_LEAD_OPP_PUB dependencies on FND_API
12.1.1
-
APPS.AS_LINK_LEAD_OPP_PUB dependencies on FND_API
12.2.2
-
APPS.AS_SALES_LEAD_OPP_PVT dependencies on FND_API
12.2.2
-
APPS.AS_SALES_LEAD_OPP_PVT dependencies on AS_LEAD_LINES_ALL
12.1.1
-
APPS.AS_SALES_LEAD_OPP_PVT dependencies on AS_LEAD_LINES_ALL
12.2.2
-
APPS.AS_SALES_LEAD_OPP_PVT dependencies on FND_API
12.1.1
-
APPS.AS_SALES_LEAD_OPP_PVT dependencies on AS_OPPORTUNITY_PUB
12.1.1
-
APPS.AS_SALES_LEAD_OPP_PVT dependencies on AS_OPPORTUNITY_PUB
12.2.2
-
APPS.AS_SALES_LEADS_PUB dependencies on AS_ACCESSES_ALL
12.1.1
-
APPS.AS_SALES_LEADS_PUB dependencies on AS_ACCESSES_ALL
12.2.2
-
APPS.AS_LINK_LEAD_OPP_PUB dependencies on FND_API
12.1.1
-
APPS.AS_LINK_LEAD_OPP_PUB dependencies on FND_API
12.2.2
-
APPS.AS_SALES_LEAD_OPP_PVT dependencies on FND_API
12.2.2
-
APPS.AS_SALES_LEAD_OPP_PVT dependencies on FND_API
12.1.1
-
APPS.AS_SALES_LEADS_PUB dependencies on STANDARD
12.1.1
-
APPS.AS_SALES_LEADS_PUB dependencies on STANDARD
12.2.2
-
APPS.AS_SALES_LEAD_OPP_PVT dependencies on AS_UTILITY_PVT
12.1.1
-
APPS.AS_SALES_LEAD_OPP_PVT dependencies on AS_UTILITY_PVT
12.2.2
-
APPS.AS_SALES_LEADS_PUB dependencies on FND_API
12.2.2
-
APPS.AS_SALES_LEADS_PUB dependencies on FND_API
12.1.1
-
APPS.AS_SALES_LEADS_PUB dependencies on FND_API
12.1.1
-
APPS.AS_SALES_LEADS_PUB dependencies on FND_API
12.2.2