Search Results lead_source_code
Overview
AS_OPPORTUNITIES is a multi-organization view within the Oracle E-Business Suite Sales Foundation (AS) module. It exposes sales opportunity records — the qualified sales leads that a sales organization is actively pursuing — in a form that respects the Oracle Multi-Org access model. From a functional standpoint, an opportunity is a lead that has progressed beyond initial qualification and is now tracked through a sales pipeline, with attributes such as sales stage, win probability, decision date, and expected revenue.
Because the view is defined over AS_LEADS_ALL and applies an ORG_ID predicate driven by the session's client information, it presents only the opportunities visible to the current operating unit. This makes it the appropriate read layer for reports, concurrent programs, and integrations that must respect multi-org security. It is important to note that the view is documented as not implemented in the reference database, so it should not be assumed to exist in every environment; it is a metadata definition available for report and integration design.
Underlying Base Objects
The view text documents a single source object: AS_LEADS_ALL. Despite the "LEADS" naming, AS_LEADS_ALL stores both leads and opportunities, distinguished by attributes such as STATUS and SALES_STAGE_ID. The SELECT list of AS_OPPORTUNITIES projects a curated subset of columns from that table.
The multi-org filter is applied through the standard Oracle Multi-Org mechanism. The WHERE clause evaluates the ORG_ID column against the client information stored in the session via USERENV('CLIENT_INFO'), extracting the first ten characters to derive the operating unit. When the client information is blank, the expression resolves to -99, meaning rows whose ORG_ID is null or -99 are visible; otherwise only rows matching the current operating unit are returned. No additional documented base objects are referenced, and the view itself exposes no joins in its definition.
Key Columns
- LEAD_ID — Primary identifier of the opportunity record. Although the column is named LEAD_ID, it uniquely identifies opportunities as stored in AS_LEADS_ALL.
- LEAD_NUMBER — The user-facing opportunity or lead number. This is the column most commonly searched by users and is the anchor for the search term "lead_number."
- STATUS — Current status of the opportunity (for example, open, converted, or closed).
- CUSTOMER_ID, ADDRESS_ID — The customer and location associated with the opportunity.
- LEAD_SOURCE_CODE, CHANNEL_CODE, SOURCE_PROMOTION_ID — Source and channel attribution for the opportunity.
- SALES_STAGE_ID — The sales stage the opportunity currently occupies in the pipeline.
- TOTAL_AMOUNT, CURRENCY_CODE — Expected deal value and its currency.
- DECISION_DATE, WIN_PROBABILITY — Forecasted close/decision date and the assessed probability of winning.
- CLOSE_REASON, CLOSE_COMPETITOR, CLOSE_COMPETITOR_CODE, CLOSE_COMPETITOR_ID, CLOSE_COMMENT — Outcome detail captured when the opportunity closes.
- END_USER_CUSTOMER_NAME, END_USER_CUSTOMER_ID, END_USER_ADDRESS_ID — The end-user customer distinct from the buying customer, where applicable.
- ORG_ID — Operating unit that owns the opportunity; this column drives the multi-org filtering.
- ATTRIBUTE_CATEGORY and ATTRIBUTE1–ATTRIBUTE15 — The standard Oracle descriptive flexfield columns for customer-defined attributes.
- PARENT_PROJECT, PRICE_LIST_ID, RANK, REQUEST_ID, PROGRAM_* — Supporting attributes covering project association, pricing, ranking, and the concurrent request that created or updated the row.
Common Use Cases and Queries
The view is typically used to report on pipeline activity by operating unit, to reconcile opportunity values against forecast, and to supply opportunity data to external CRM or analytics systems. A recurring scenario is locating an opportunity by its number, which is exactly the "lead_number" search pattern.
Locate an opportunity by number:
SELECT lead_id, lead_number, status, customer_id,
total_amount, currency_code, win_probability
FROM as_opportunities
WHERE lead_number = :lead_number;
List open opportunities for the current operating unit with their expected value:
SELECT lead_number, sales_stage_id, decision_date,
win_probability, total_amount, currency_code
FROM as_opportunities
WHERE status = 'OPEN'
ORDER BY decision_date;
Summarize pipeline value excluding closed-won and closed-lost records:
SELECT currency_code,
COUNT(*) AS opportunity_count,
SUM(total_amount) AS pipeline_value
FROM as_opportunities
WHERE status NOT IN ('WON','LOST')
GROUP BY currency_code;
Because the view enforces the multi-org predicate automatically, these queries return only the opportunities for the operating unit in the current session context, provided ORG_ID is set appropriately before execution.
-
View: AS_OPPORTUNITIES
12.1.1
product: AS - Sales Foundation , description: Sales opportunities (multi-org) , implementation_dba_data: Not implemented in this database ,
-
View: AS_LEADS
12.1.1
owner:APPS, object_type:VIEW, fnd_design_data:AS.AS_LEADS, object_name:AS_LEADS, status:VALID, product: AS - Sales Foundation , description: Sales opportunities (multi-org) , implementation_dba_data: APPS.AS_LEADS ,
-
View: AS_LEADS
12.2.2
owner:APPS, object_type:VIEW, fnd_design_data:AS.AS_LEADS, object_name:AS_LEADS, status:VALID, product: AS - Sales Foundation , description: Sales opportunities (multi-org) , implementation_dba_data: APPS.AS_LEADS ,
-
View: AS_OPPORTUNITIES
12.2.2
product: AS - Sales Foundation , description: Sales opportunities (multi-org) , implementation_dba_data: Not implemented in this database ,
-
View: AS_OPPORTUNITIES_LIST_V
12.1.1
product: AS - Sales Foundation , description: Sales Opportunities List View , implementation_dba_data: Not implemented in this database ,
-
View: AS_OPPORTUNITIES_V
12.1.1
owner:APPS, object_type:VIEW, fnd_design_data:AS.AS_OPPORTUNITIES_V, object_name:AS_OPPORTUNITIES_V, status:VALID, product: AS - Sales Foundation , description: view based on as_leads_all and hz_parties , implementation_dba_data: APPS.AS_OPPORTUNITIES_V ,
-
View: AS_OPPORTUNITIES_V
12.2.2
owner:APPS, object_type:VIEW, fnd_design_data:AS.AS_OPPORTUNITIES_V, object_name:AS_OPPORTUNITIES_V, status:VALID, product: AS - Sales Foundation , description: view based on as_leads_all and hz_parties , implementation_dba_data: APPS.AS_OPPORTUNITIES_V ,
-
View: AS_OPPORTUNITIES_LIST_V
12.2.2
product: AS - Sales Foundation , description: Sales Opportunities List View , implementation_dba_data: Not implemented in this database ,
-
View: AS_OPPORTUNITY_DETAILS_V
12.2.2
owner:APPS, object_type:VIEW, fnd_design_data:AS.AS_OPPORTUNITY_DETAILS_V, object_name:AS_OPPORTUNITY_DETAILS_V, status:VALID, product: AS - Sales Foundation , implementation_dba_data: APPS.AS_OPPORTUNITY_DETAILS_V ,
-
View: AS_OPPORTUNITY_DET_ADDR_V
12.1.1
product: AS - Sales Foundation , implementation_dba_data: Not implemented in this database ,
-
View: AS_OPPORTUNITY_DETAILS_V
12.1.1
owner:APPS, object_type:VIEW, fnd_design_data:AS.AS_OPPORTUNITY_DETAILS_V, object_name:AS_OPPORTUNITY_DETAILS_V, status:VALID, product: AS - Sales Foundation , implementation_dba_data: APPS.AS_OPPORTUNITY_DETAILS_V ,
-
View: AS_OPPORTUNITY_DET_ADDR_V
12.2.2
product: AS - Sales Foundation , implementation_dba_data: Not implemented in this database ,
-
View: AS_OPPORTUNITY_DET_PRM_V
12.1.1
product: AS - Sales Foundation , implementation_dba_data: Not implemented in this database ,
-
View: AS_OPPORTUNITY_DET_PRM_V
12.2.2
product: AS - Sales Foundation , implementation_dba_data: Not implemented in this database ,