Search Results create_sales_lead




Overview

AMS_SCR_LEAD_PVT is a private PL/SQL package body in the APPS schema that supports sales lead creation within the Oracle E-Business Suite Advanced Marketing (AMS) module. The package forms part of the Scripting (SCR) subsystem used to generate and qualify sales leads from marketing activities. Its central responsibility is to bridge marketing lead data into the sales lead infrastructure by way of the AS_IMPORT_INTERFACE tables, which serve as the standard Oracle Sales staging mechanism for lead import. Because the package is classified as a PVT (private) API, it is not intended for direct invocation by external consumers; rather, it is called internally by sibling AMS packages and public APIs that expose lead creation to forms, concurrent programs, and integrations.

Key Procedures and Functions

The package body exposes one documented procedure: CREATE_SALES_LEAD. This procedure encapsulates the logic required to construct a sales lead record from a marketing scripting context. Its responsibilities include validating source data, staging the lead in the AS_IMPORT_INTERFACE tables, and invoking the standard Oracle Sales import pipeline so that the record is ultimately materialized as a sales lead. Consistent with the FND_API dependency, the procedure adheres to the Oracle Application Object Library API conventions, including standard return status handling and message propagation through the FND_API utility layer. Additional helper routines not documented in the ETRM metadata may exist as private subprograms within the body, but only CREATE_SALES_LEAD is exposed for reference.

Tables Accessed

The package references four documented tables through APPS synonyms:

  • AS_IMPORT_INTERFACE — the primary staging table into which lead records are inserted before import processing.
  • AS_IMPORT_INTERFACE_S — the corresponding interface table storing child or supplementary attributes (such as phone, address, or contact detail rows) linked to the parent import record.
  • HZ_RELATIONSHIPS — the Trading Community Architecture relationship table, queried or updated to establish the relationship between the newly created lead and the associated party or contact.
  • DUAL — used for single-row scalar operations such as sequence lookups or constant validation.

Usage Notes

Because the package is private, invocation occurs through higher-level AMS APIs, typically when a user converts a scripting or campaign response into a sales lead from an Oracle Forms-based marketing screen, or when a concurrent program processes bulk lead generation. The heavy reliance on AS_IMPORT_INTERFACE and AS_IMPORT_INTERFACE_S indicates that records inserted by CREATE_SALES_LEAD are subsequently consumed by the standard Oracle Sales lead import concurrent programs (for example, the AS_IMPORT interface processing routines), which validate and promote them to live leads. The package depends on FND_API and FND_GLOBAL for API standards and session context (user ID, responsibility, application). The ETRM metadata records no other database object that references AMS_SCR_LEAD_PVT, confirming its private, leaf-level position in the dependency hierarchy. Customizations should not call this package directly; they should use the documented public AMS or AS lead APIs to preserve upgrade safety.