Search Results methodology_code




Overview

AS_LEADS is a multi-org view in the APPS schema belonging to the AS (Sales Foundation) product family in Oracle E-Business Suite 12.1.1 and 12.2.2. It exposes sales opportunity (lead) data and is implemented as a filtered projection over the base table AS_LEADS_ALL. The view presents a stable, reporting-friendly interface to opportunity records, exposing identifiers, status, financials, assignment attributes, and descriptive flexfield columns. Because it is defined over a multi-org base table, AS_LEADS is intended to be queried within an operating unit context, and Oracle's Multi-Org security (via the ORG_ID column) restricts rows to the current organization. Compliance with documented view semantics means reporting and integration code should reference AS_LEADS rather than AS_LEADS_ALL where multi-org filtering is required.

Underlying Base Objects

The documented referenced base object for AS_LEADS is AS_LEADS_ALL, accessed through a synonym. The view's text is a straight column projection: every column listed in the view definition is selected from AS_LEADS_ALL; no joins, aggregation, or computed expressions are present in the documented SELECT text. In practice this pattern means the view serves as the org-striped read layer, while AS_LEADS_ALL stores the full multi-org dataset. Any DML or structural change to AS_LEADS_ALL affects AS_LEADS, and the view is reported as VALID in the ETRM metadata. Because the view inherits the underlying table's audit columns (LAST_UPDATE_DATE, LAST_UPDATED_BY, CREATION_DATE, CREATED_BY, LAST_UPDATE_LOGIN, REQUEST_ID, PROGRAM_APPLICATION_ID, PROGRAM_ID, PROGRAM_UPDATE_DATE), it supports standard EBS audit and concurrent program lineage tracing.

Key Columns

The column list covers the full opportunity lifecycle and is dominated by lookup-driven codes and foreign keys. Business keys and status include LEAD_ID (primary identifier), LEAD_NUMBER (user-facing number), STATUS, SALES_STAGE_ID, SALES_METHODOLOGY_ID, METHODOLOGY_CODE, and RANK. Party and customer references include CUSTOMER_ID, ADDRESS_ID, INITIATING_CONTACT_ID, and the end-user columns requested by the search: END_USER_CUSTOMER_ID, END_USER_CUSTOMER_NAME, and END_USER_ADDRESS_ID. The user searched for "end_user_customer_id"; this column identifies the end-user customer associated with the opportunity when the opportunity is sold not to the transacting customer but to a downstream end user, a common pattern in channel and distribution sales. Financial and forecast fields include TOTAL_AMOUNT, CURRENCY_CODE, WIN_PROBABILITY, CUSTOMER_BUDGET, BUDGET_STATUS_CODE, DECISION_DATE, DECISION_TIMEFRAME_CODE, and FOLLOWUP_DATE. Source and channel tracking columns include LEAD_SOURCE_CODE, ORIG_SYSTEM_REFERENCE, CHANNEL_CODE, SOURCE_PROMOTION_ID, OFFER_ID, and VEHICLE_RESPONSE_CODE. Competitor and closure data are captured by CLOSE_REASON, CLOSE_COMPETITOR, CLOSE_COMPETITOR_ID, CLOSE_COMPETITOR_CODE, and CLOSE_COMMENT. Partner/PRM columns include INCUMBENT_PARTNER_RESOURCE_ID, INCUMBENT_PARTNER_PARTY_ID, PRM_EXEC_SPONSOR_FLAG, PRM_PRJ_LEAD_IN_PLACE_FLAG, PRM_IND_CLASSIFICATION_CODE, PRM_LEAD_TYPE, and PRM_ASSIGNMENT_TYPE. Control flags include DELETED_FLAG, FREEZE_FLAG, NO_OPP_ALLOWED_FLAG, and DELETE_ALLOWED_FLAG. ATTRIBUTE_CATEGORY through ATTRIBUTE15 provide the descriptive flexfield, and ORG_ID provides the multi-org discriminator. ORIGINAL_LEAD_ID and PARENT_PROJECT support lineage and grouping.

Common Use Cases and Queries

Typical usage covers opportunity pipeline reporting, end-user analysis, integration extracts, and PRM channel reporting. A standard pipeline query filters by status, stage, and operating unit:

  • SELECT lead_id, lead_number, status, total_amount, currency_code, win_probability FROM as_leads WHERE org_id = :p_org_id AND status = 'OPEN';
  • SELECT lead_id, lead_number, end_user_customer_id, end_user_customer_name FROM as_leads WHERE end_user_customer_id = :p_end_user_id;
  • SELECT sales_stage_id, COUNT(*), SUM(total_amount) FROM as_leads WHERE org_id = :p_org_id GROUP BY sales_stage_id;
  • SELECT lead_id, orig_system_reference, channel_code, source_promotion_id FROM as_leads WHERE creation_date >= :p_since;

Because the view exposes audit columns such as LAST_UPDATE_DATE and REQUEST_ID, it is suitable for incremental ETL extracts using a high-water-mark pattern. Queries that must span all operating units should target AS_LEADS_ALL, while queries honoring Multi-Org security should remain on AS_LEADS.