Search Results delete_cust_plans




Overview

CSC_PLAN_ASSIGNMENT_PKG is an Oracle EBS packages belonging to the Advanced Product Catalog / Customer Care (CSC) schema family; it is owned by APPS and is classified in the ETRM repository under API classification OTHER. Its documented purpose, per the source header, is to resolve the fundamental limitation that plan definitions are "dummy entities in the system" which "mean nothing until [they are] associated to customer(s)." The package therefore implements the association engine that links customer plan headers to individual customers and their accounts.

Functionally, the package evaluates the results of customer profile checks for each customer and its account, compares those results against the criteria defined for each plan, and where the criteria are met, persists the association of plan and customer. It serves both directions of that relationship: adding plans to qualifying customers and removing plans that no longer match. The package is declared AUTHID CURRENT_USER and carries a long evolution history beginning 09-DEC-1999, with significant engine rework in January 2002 (referencing bugs 2030164 and 1745488) and NOCOPY signature changes in 2002.

Key Procedures and Functions

  • RUN_PLAN_ENGINE — The principal entry point that drives evaluation of plan criteria against customer profile check results.
  • RUN_WITH_PLAN_ID, RUN_WITH_CHECK_ID, RUN_WITH_PARTY_ID, RUN_WITH_ACCOUNT_ID — Focused run variants that scope engine execution to a single plan, check, party, or account.
  • RUN_WITH_PLAN_PARTY, RUN_WITH_PLAN_ACCOUNT, RUN_WITH_CHECK_PARTY, RUN_WITH_CHECK_ACCOUNT — Composite run variants scoping execution to a plan/party, plan/account, check/party, or check/account pair.
  • RUN_WITH_ALL — Executes the engine across all plans and parties when no scoping parameters are supplied, reflecting the behaviour introduced 09-AUG-2000 under bug 1372050.
  • ADD_REMOVE_PLAN_CHECK — Supporting routine that determines whether a plan check should result in an addition or removal of a plan association; this procedure received an additional parameter in the August 2000 revision.
  • ADD_CUST_PLANS — Persists new plan-to-customer associations that satisfy plan criteria.
  • DELETE_CUST_PLANS — Removes existing plan-to-customer associations, typically when a customer's profile check results no longer satisfy the plan criteria. This is the procedure most frequently sought by users searching for delete_cust_plans.
  • VALIDATE_COMPARE_ARGUMENTS — Validates the arguments passed into the comparison logic before engine execution proceeds.

Tables Accessed

  • CSC_CUST_PLANS, CSC_CUST_PLANS_S — The base and secondary (language-independent) tables holding plan-to-customer associations; the primary read/write targets of ADD_CUST_PLANS and DELETE_CUST_PLANS.
  • CSC_CUST_PLANS_AUDIT, CSC_CUST_PLANS_AUDIT_S — Audit shadow tables populated as associations are inserted or deleted, preserving an historical record.
  • CSC_PLAN_HEADERS_B — Supplies plan definitions and criteria against which customer profile check results are compared.
  • CSC_PROF_CHECK_RESULTS — Stores the evaluated customer profile check outcomes that the engine consumes when deciding whether a plan applies.
  • PLITBLM — The standard EBS PL/SQL index-by table of VARCHAR2 used for temporary in-memory collections during engine processing.

Usage Notes

The package is generally not invoked directly by end users; it is called by the Customer Care plan engine concurrent programs and by supporting forms that manage customer plan assignment and removal. Custom code that must programmatically reassign or strip plans from customers should call ADD_CUST_PLANS or DELETE_CUST_PLANS rather than performing DML against CSC_CUST_PLANS directly, so that the audit tables remain consistent. Because the routines are declared with FND_API-style G_MISS defaults and OUT NOCOPY parameters (x_errbuf, x_retcode), they are intended to be launched from concurrent program definitions or server-side PL/SQL where a standard report-style return contract is expected. ETRM records one dependent package referencing this unit; any modification should be treated as a shared API change. The package is present in both EBS 12.1.1 and 12.2.2, with the online patching edition views (CSC_CUST_PLANS_S, CSC_CUST_PLANS_AUDIT_S) used in the 12.2 AD/TXK environment.