Results for “customer_class_code”

2 results




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

OE_DISCOUNT_CUSTOMERS_V is an APPS-owned database view shipped within the Oracle E-Business Suite Advanced Pricing (QP) module. Its status in the ETRM data dictionary is VALID in both release 12.1.1 and 12.2.2, and it is formally documented with a description of "Obsolete." The view is a denormalized projection over the pricing qualifier tables that were once used by Oracle Order Management and Advanced Pricing to associate customer eligibility criteria with a price list or modifier header. Historically, the view served as the compatibility surface for the legacy "discount customer" concept, exposing a surrogate DISCOUNT_CUSTOMER_ID together with customer class, sold-to organization, and ship-to/site-use organization identifiers derived from qualifier records.

Because Oracle rearchitected customer eligibility around the QP_QUALIFIERS and QP_QUALIFIER_RULES model, this view is retained only for backward compatibility of custom reports, forms, and interfaces that referenced the older discount-customer construct. It should not be used as the basis for new development; Oracle's guidance is to query QP_QUALIFIERS directly or to use the supported pricing APIs.

Underlying Base Objects

The ETRM metadata records two referenced objects: the synonym QP_QUALIFIERS and the package QP_UTIL. The query selects from QP_QUALIFIERS using the alias A, filtered by the following predicates:

The result set is aggregated with GROUP BY LIST_HEADER_ID, QUALIFIER_GROUPING_NO, START_DATE_ACTIVE, and END_DATE_ACTIVE. Every non-grouped column is wrapped in an aggregate function, predominantly MAX. QP_UTIL is invoked at parse time to resolve the context and attribute identifiers, so the view's behavior is dependent on the contents of those package constants.

Key Columns

  • DISCOUNT_CUSTOMER_ID — Surrogate identifier produced as MAX(A.QUALIFIER_GROUPING_NO) within each grouped set. It is the column most frequently searched for by name, but it is not a true primary key and carries no foreign-key relationship in the current data model.
  • DISCOUNT_ID — Maps to A.LIST_HEADER_ID, the price list or modifier list header that the qualifier belongs to.
  • CUSTOMER_CLASS_CODE — Populated via DECODE on QUALIFIER_ATTRIBUTE against QP_UTIL.GET_CUST_CLASS_ATTRIB, returning QUALIFIER_ATTR_VALUE when the qualifier is a customer class.
  • SOLD_TO_ORG_ID — Populated via the sold-to attribute constant and converted with TO_NUMBER; identifies the customer organization eligible for the discount.
  • SITE_ORG_ID — Populated via the site-use attribute constant and converted with TO_NUMBER; identifies the specific customer site eligible for the discount.
  • START_DATE_ACTIVE / END_DATE_ACTIVE — Effective dating of the qualifier record.
  • Standard WHO and descriptive flexfield columns — CREATION_DATE, CREATED_BY, LAST_UPDATE_DATE, LAST_UPDATED_BY, LAST_UPDATE_LOGIN, PROGRAM_APPLICATION_ID, PROGRAM_ID, PROGRAM_UPDATE_DATE, REQUEST_ID, CONTEXT, and ATTRIBUTE1 through ATTRIBUTE15.

Common Use Cases and Queries

The primary legacy use case is resolving which customer organizations and sites are eligible for a given price list or modifier. A representative query is:

  • SELECT discount_id, sold_to_org_id, site_org_id, customer_class_code FROM oe_discount_customers_v WHERE discount_id = :p_list_header_id;
  • SELECT discount_customer_id, discount_id, sold_to_org_id FROM oe_discount_customers_v WHERE sold_to_org_id = :p_org_id AND SYSDATE BETWEEN start_date_active AND NVL(end_date_active, SYSDATE + 1);

Two caveats apply. First, because the view aggregates with MAX, distinct qualifier granularity is collapsed; results may differ from direct queries against QP_QUALIFIERS. Second, since the object is documented as Obsolete, any new integration should be built against QP_QUALIFIERS or the public pricing APIs. Existing custom code that searches on discount_customer_id should be reviewed and migrated before a future upgrade removes the view.