Search Results contact_primary_flag




Overview

ICX_SALESREP_CONTACTS_V is a database view registered under the ICX — Oracle iProcurement product family in Oracle E-Business Suite 12.1.1 and 12.2.2. Its ETRM description, "Web Customer Salesrep Contacts List View," defines its purpose precisely: it produces a flattened, denormalized list of customer contacts associated with sales representatives, intended for display within web-based (HTML/self-service) iProcurement and related e-commerce pages. Rather than requiring application code to join multiple Trading Community Architecture (TCA) entities at runtime, the view pre-composes the sales-team-to-customer-contact relationship so that a single query returns both the sales rep identity and the full contact, address, and phone attributes needed to render a list page.

The view is documented as not implemented in this database in the source ETRM excerpt, meaning it may be absent or conditionally deployed depending on the installed licensing and patch level. Its practical relevance to a search for contact_area_code is direct: the view exposes both AREA_CODE (the primary address phone area code) and CONTACT_AREA_CODE (the specific contact's phone area code), alongside the matching PHONE_NUMBER and CONTACT_PHONE_NUMBER columns.

Underlying Base Objects

The ETRM metadata lists no independently documented base tables; instead the view text reveals it is a join of two other views:

The join predicate is a four-part correlation: the sales team row must not be a partner record (PARTNER_CUSTOMER_ID IS NULL and PARTNER_ADDRESS_ID IS NULL), and it matches the customer on CUSTOMER_ID and ADDRESS_ID. Finally, multi-org isolation is enforced through NVL(CUST.ORG_ID,-9999) = NVL(IAS.ORG_ID,-9999), a null-safe comparison that keeps contacts aligned to the correct operating unit.

Key Columns

Beyond CONTACT_AREA_CODE, the view projects a broad contact and customer profile:

Common Use Cases and Queries

Typical uses include building sales-rep contact directories, confirming which contact phone to dial for a given customer address, and feeding iProcurement supplier/customer list pages. To retrieve contact area codes for a specific customer:

SELECT CUSTOMER_NAME, FULL_NAME, CONTACT_AREA_CODE,
       CONTACT_PHONE_NUMBER, CONTACT_EXTENSION
FROM   ICX_SALESREP_CONTACTS_V
WHERE  CUSTOMER_ID = :p_customer_id
AND    NVL(CONTACT_PRIMARY_FLAG,'N') = 'Y';

To list all contacts handled by a sales representative within one operating unit:

SELECT PERSON_ID, SALESFORCE_ID, CUSTOMER_NUMBER,
       FULL_NAME, AREA_CODE, CONTACT_AREA_CODE
FROM   ICX_SALESREP_CONTACTS_V
WHERE  PERSON_ID = :p_person_id
AND    ORG_ID    = :p_org_id
ORDER BY CUSTOMER_NAME, LAST_NAME;

Because the view is documented as not necessarily implemented at every site, developers should verify its existence in ALL_VIEWS before relying on it, and should treat the CONTACT_AREA_CODE versus AREA_CODE distinction carefully—the former belongs to the contact's own phone record, the latter to the address-level phone.