Search Results import_quote_lead




Overview

IBE_LEAD_IMPORT_PVT is a private PL/SQL package in the APPS schema that implements the core processing logic behind the Oracle iStore / Oracle Sales Lead Import feature in Oracle E-Business Suite. Its declared purpose is to consume staged lead and opportunity records originating from external systems — order capture, quoting, and trade-show or web-based imports — and to transform them into valid Oracle CRM sales leads held within the Oracle Sales foundation tables. The package declares AUTHID CURRENT_USER, meaning it executes with the privileges of the calling user and is therefore intended to be invoked through a public wrapper or concurrent program rather than directly by end users.

The package exposes several strongly typed record and collection definitions. G_Leads_Rec models a single lead header, carrying quote header identifier, contact point, party and party site identifiers, related party, organization contact, contact role, notes, currency, order references, promotion code, total amount, lead description, and primary/secondary source references. G_Lead_Line_Rec and its associated G_Lead_Line_Tbl index-by table model lead line details such as inventory item, organization, unit of measure, quantity, part number, product description, line price, and promotion. Constants such as G_ORDER_LEAD, G_QUOTE_LEAD, G_COMPLETE_IMPORT, and G_INCREMENTAL_IMPORT drive the branching logic that determines which source system produced the lead and whether the run is a full or delta import.

Key Procedures and Functions

The documented API surface comprises twenty-two procedures. Logging is handled by WRITE_LOG, UPDATE_LOG, and INSERT_LOG_DETAILS, which record import run status and per-record diagnostic messages for later review.

Input parsing and extraction are performed by PARSEINPUT, GET_QUOTES_RECORDS, GET_QUOTE_LINE_RECORDS, GET_ORDER_RECORDS, GET_ORDER_LINE_RECORDS, and GET_DATE_PERIOD. These retrieve header and line data from the quoting and order schemas and determine the effective date window for the import.

Lead construction and persistence are handled by CREATE_ORDER_LEADS, CREATE_QUOTE_LEADS, CREATE_SALES_LEAD, CREATE_LEADANDNOTES, and RANK_SALES_LEAD. The CREATE_LEADANDNOTES routine is the specific entry point that persists a lead together with its associated notes text. Sales team assignment is accomplished through CREATE_SALES_TEAM and BUILD_SALES_TEAM.

Orchestration is provided by PROCESS_SALES_LEAD_IMPORT, IMPORT_QUOTE_LEAD, IMPORT_ORDER_LEAD, and PRINT_PARAMETER, which sequence extraction, lead creation, ranking, and team building for each import mode.

Tables Accessed

The package reads source transaction data from OE_ORDER_HEADERS (order number and creation date), ASO_QUOTE_HEADERS_ALL and ASO_QUOTE_LINES_ALL (quote header, line, pricing, and marketing source code), and AMS_SOURCE_CODES (promotion source codes).

Party and contact information is sourced from HZ_PARTIES, HZ_PARTY_SITES, HZ_CONTACT_POINTS, and HZ_ORG_CONTACTS, providing the TCA identifiers required to attach a lead to the correct customer entity.

Staging and interface data reside in AS_IMPORT_INTERFACE, AS_IMPORT_INTERFACE_S, AS_IMP_LINES_INTERFACE, and AS_IMP_LINES_INTERFACE_S, which hold inbound lead and line records awaiting processing. Operational tracking uses IBE_LEAD_IMPORT_DETAILS, IBE_LEAD_IMPORT_DETAILS_S1, and IBE_LEAD_IMPORT_LOG to record individual import results and run-level log entries.

Usage Notes

Because this is a private (PVT) package, direct invocation from custom code is discouraged. It is normally driven by the Oracle Sales Lead Import concurrent program or by the iStore lead-capture flows that call the corresponding public wrapper. Two other packages reference it, confirming its role as a shared internal engine. Integrators staging external leads should populate the AS_IMPORT_INTERFACE tables and submit the standard import concurrent request rather than calling IBE_LEAD_IMPORT_PVT procedures directly, ensuring logging, ranking, and sales team assignment execute in the intended sequence.