Search Results cs_cp_service_transactions




Overview

CS_CALCULATE_CREDIT is a PL/SQL package body owned by the APPS schema in Oracle E-Business Suite Release 12.1.1 and 12.2.2. It belongs to the Service (CS) product family and supports the Telecommunications/Service Contracts credit calculation logic associated with customer product service termination. The package is classified by ETRM as OTHER, indicating it is not a public, fully documented API but an internal helper package invoked from service-related processing. Its primary business function is to compute the prorated credit to be returned to a customer when a service is terminated before the end of its contractual term. The credit is derived from the original service selling price, the number of days consumed versus the days remaining, and any previously credited amounts already applied against the same service transaction.

Key Procedures and Functions

  • CS_CALCULATE_CREDIT — The core calculation routine. It determines the first qualifying service transaction for the given cp_service_id whose effective start and end dates bracket the termination effective date, restricted to RENEW and ORDER transaction types. Using that transaction, it derives the days in the original service, the days consumed in the terminated service, the transaction end date, and the current end date. It then computes available credit as the maximum service selling price multiplied by customer product quantity, less any credit already recorded against the same transaction. Outputs include the first service transaction identifier, the first amount, total credit amount, total credit percent, and a multi-transaction indicator.
  • CREATE_INTERACTION_FROM_FORM — A helper routine used to create an interaction record from the originating form context, supporting downstream service interaction tracking.

The metadata documents only the signatures at a summary level; parameter lists should not be assumed beyond the source excerpt shown above.

Tables Accessed

  • CS_CP_SERVICE_TRANSACTIONS — The central table. The package reads transaction rows keyed by cp_service_id, filtering on effective dates and transaction type codes (RENEW, ORDER), and also joins back to itself via terminated_transaction_id to net off prior credits.
  • CS_CP_SERVICES and CS_CUSTOMER_PRODUCTS — Joined to obtain the customer product quantity used to scale the service selling price when computing available credit.
  • FND_USER — Referenced for user context, typically to record or resolve the acting user for interaction creation.

Usage Notes

The package is invoked from Customer Care/service contract forms when a user terminates a service and a credit adjustment must be calculated. It is not a documented public API: ETRM records zero packages referencing it, so custom code should not call it directly without assessing upgrade risk. The HEADER comment in the source indicates the file originates from the Service Transaction server-side library (csxstsvb.pls), reinforcing its role as a supporting back-end routine behind the service termination UI. Because its logic depends on transaction type codes and effective dating, results are sensitive to the accuracy of CS_CP_SERVICE_TRANSACTIONS data; incomplete or missing RENEW/ORDER rows for the termination window will yield a null first transaction and prevent credit calculation.