10 Deposit Opcode Workflows

Learn about the Oracle Communications Billing and Revenue Management (BRM) deposit opcode workflows.

Topics in this document:

Opcodes Described in This Chapter

Table 10-1 lists the deposit management opcodes described in this chapter.

Caution:

  • Always use the BRM API to manipulate data. Changing data in the database without using the API can corrupt the data.

  • Do not use SQL commands to change data in the database. Always use the API.

Table 10-1 Opcodes Described in This Chapter

Opcode Topic
PCM_OP_DEPOSIT_CREATE_SPECIFICATION_PROFILE

Creating Deposit Specification Profiles

Modifying Deposit Specification Profiles

Validating Deposit Specification Profiles

PCM_OP_DEPOSIT_POL_VALID_SPECIFICATION_PROFILE

Validating Deposit Specification Profiles

PCM_OP_DEPOSIT_GET_SPECIFICATION_PROFILE

Getting Deposit Specification Profiles

PCM_OP_DEPOSIT_MODIFY_SPECIFICATION_PROFILE

Modifying Deposit Specification Profiles

Validating Deposit Specification Profiles

Creating Deposit Specification Profiles

PCM_OP_DEPOSIT_CREATE_SPECIFICATION

Creating Deposit Specifications

Validating Deposit Specifications

PCM_OP_DEPOSIT_POL_VALID_SPECIFICATION

Validating Deposit Specifications

PCM_OP_DEPOSIT_GET_SPECIFICATION

Getting Deposit Specifications

PCM_OP_DEPOSIT_MODIFY_SPECIFICATION

Modifying Deposit Specifications

Validating Deposit Specifications

PCM_OP_DEPOSIT_PURCHASE_DEPOSIT

Purchasing Deposits

Validating a Deposit Purchase

PCM_OP_DEPOSIT_POL_VALID_PURCHASE_DEPOSIT

Validating a Deposit Purchase

PCM_OP_DEPOSIT_GET_DEPOSITS

Getting Deposits

PCM_OP_DEPOSIT_UPDATE_DEPOSIT

Updating Deposits

PCM_OP_DEPOSIT_POL_VALID_UPDATE_DEPOSIT

Validating Deposit Updates

PCM_OP_DEPOSIT_COLLECT_PAYMENT

Collecting Deposit Payments

PCM_OP_DEPOSIT_POL_VALID_COLLECT_PAYMENT

Validating Deposit Payment Collections

PCM_OP_DEPOSIT_REVERSE_DEPOSIT

Reversing Deposits

Validating a Deposit Reversal

PCM_OP_DEPOSIT_POL_VALID_REVERSE_DEPOSIT

Validating a Deposit Reversal

PCM_OP_DEPOSIT_RELEASE_DEPOSIT

Releasing Deposits

Validating a Deposit Release

PCM_OP_DEPOSIT_POL_VALID_RELEASE_DEPOSIT

Validating a Deposit Release

PCM_OP_DEPOSIT_TRANSFER_DEPOSIT

Transferring Deposits

Validating a Deposit Transfer

PCM_OP_DEPOSIT_POL_VALID_TRANSFER_DEPOSIT

Validating a Deposit Transfer

PCM_OP_DEPOSIT_ADD_INTEREST

Adding Interest to a Deposit

PCM_OP_DEPOSIT_POL_PRE_ ADD_INTEREST

PCM_OP_DEPOSIT_POL_POST_ADD_INTEREST

Customizing the Interest Calculation

PCM_OP_DEPOSIT_REFUND_REQUEST

Requesting Deposit Refunds

PCM_OP_DEPOSIT_POL_VALID_REFUND_REQUEST

Validating a Deposit Refund Request

PCM_OP_DEPOSIT_GET_REFUND_REQUEST

Getting Refund Requests

PCM_OP_DEPOSIT_UPDATE_REFUND_REQUEST

Updating Refund Requests

PCM_OP_DEPOSIT_UPDATE_DEPOSIT_RECEIVED

Updating Received Deposits

PCM_OP_DEPOSIT_TRIGGER_DEPOSIT

Triggering Deposits

Creating Deposit Specification Profiles

Use the PCM_OP_DEPOSIT_CREATE_SPECIFICATION_PROFILE opcode to create a deposit specification profile. Profiles define common business rules for deposits and are used to create deposit specifications.

In the input flist, you can set the profile name, description, start date, end date, interest calculation flags, transferable flags, interest type, interest rate, interest offset details, and details about handling refund fees.

This opcode creates a /config/deposit_spec_profile object. This opcode is called by Billing Care.

The PCM_OP_DEPOST_CREATE_SPECIFICATION_PROFILE opcode does the following:

  • Validates the mandatory parameters in the input flist.

  • Calls the PCM_OP_DEPOSIT_POL_VALID_SPECIFICATION_PROFILE opcode to validate the input parameters.

  • Checks the results of PCM_OP_DEPOSIT_POL_VALID_SPECIFICATION_PROFILE and sends appropriate error messages.

  • Searches the database for the /config/deposit_spec_profile with the name. If it already exists, sends an error.

  • Calls the PCM_OP_CREATE_OBJ opcode to create the /config/deposit_spec_profile object.

Validating Deposit Specification Profiles

Use the PCM_OP_DEPOSIT_POL_VALID_SPECIFICATION_PROFILE policy opcode to validate and implement any customizations while creating deposit specification profile information. It validates if the deposit specification profile name is provided. This policy opcode is called by the PCM_OP_DEPOSIT_CREATE_SPECIFICATION_PROFILE opcode.

PCM_OP_DEPOSIT_POL_VALID_SPECIFICATION_PROFILE validates the deposit specification profile information in the /config/deposit_spec_profile object. PCM_OP_DEPOSIT_CREATE_SPECIFICATION_PROFILE does the following before calling PCM_OP_DEPOSIT_POL_VALID_SPECIFICATION_PROFILE:

  • Validates that the deposit specification profile mandatory parameters are in the input.

  • Calls the PCM_OP_SEARCH opcode with the provided deposit specification profile name. If the profile exists, it returns an error.

  • Validates that the details of PIN_FLD_DEPOSIT_PROFILE_SPEC in the input flist use the required format.

  • Validates if the PIN_FLD_INTEREST_TYPE is provided. There are three interest types: simple, compound, and absolute. If the type is not present, sends an error.

  • If any BRM-related error occurs, sets the PIN_FLD_RESULT field to FAIL, shares a designated error message to the output flist, and clears the error buffer. If there are no errors, reviews all related areas. If there are no failures, sets the PIN_FLD_RESULT field to PASS.

Getting Deposit Specification Profiles

Use the PCM_OP_DEPOSIT_GET_SPECIFICATION_PROFILE opcode to get any existing deposit specification profiles available in the BRM database using its name or POID. This opcode is called by Billing Care.

PCM_OP_DEPOSIT_GET_SPECIFICATION_PROFILE does the following:

  • Validates the mandatory parameters in the input flist.

  • Prepares the search template to search the /config/deposit_spec_profile object.

  • Calls the PCM_OP_SEARCH opcode to find the /config/deposit_spec_profile object and prepares the output flist.

Modifying Deposit Specification Profiles

Use the PCM_OP_DEPOSIT_MODIFY_SPECIFICATION_PROFILE opcode to update, edit, or modify an existing deposit specification profile attributes in the /config/deposit_spec_profile object. This opcode is called by Billing Care.

PCM_OP_DEPOSIT_MODIFY_SPECIFICATION_PROFILE does the following:

  • Validates the mandatory parameters in the input flist.

  • Searches for the given /config/deposit_spec_profile object.

  • Calls the PCM_OP_DEPOSIT_POL_VALID_SPECIFICATION_PROFILE opcode to validate the input parameters.

  • Calls the PCM_OP_WRITE_FLDS opcode to update the /config/deposit_spec_profile object with the fields provided in the input flist.

Creating Deposit Specifications

Use the PCM_OP_DEPOSIT_CREATE_SPECIFICATION opcode to create deposit specification details. This opcode creates the /deposit_specification object.

In the input flist fields, you can set the deposit specification name and select the deposit specification profile, start date, end date, deposit specification code, credit limit flags, draft flag, permitted type and category, and product or plan object.

PCM_OP_DEPOSIT_CREATE_SPECIFICATION does the following:

  • Validates the mandatory parameters in the input flist.

  • Calls the PCM_OP_DEPOSIT_POL_VALID_SPECIFICATION opcode to validate if the deposit event or appropriate charge offer is available. If not available, sends an error.

  • Searches the database for an existing /deposit_specification object with the provided name. If it already exists, sends an error.

  • Calls the PCM_OP_DEPOSIT_POL_VALID_SPECIFICATION_PROFILE opcode to validate the input parameters.

  • Calls the PCM_OP_CREATE_OBJ opcode to create the object.

Validating Deposit Specifications

Use the PCM_OP_DEPOSIT_POL_VALID_SPECIFICATION opcode to validate and implement any customizations while creating the deposit specifications. This policy opcode is called by the PCM_OP_DEPOSIT_CREATE_SPECIFICATION opcode.

The PCM_OP_DEPOSIT_POL_VALID_SPECIFICATION policy opcode validates the deposit specification information in the /deposit_specification object. Before calling this opcode, PCM_OP_DEPOSIT_CREATE_SPECIFICATION makes the following initial validation checks:

  • Validates the deposit specification's mandatory parameters in the input flist.

  • Calls the PCM_OP_SEARCH opcode with the provided deposit specification name. If the specification exists, it returns an error.

  • Validates that the details of the input flist are in the required format.

  • If any BRM-related error occurs, sets the PIN_FLD_RESULT field to FAIL, shares a designated error message to the output flist, and clears the error buffer. If there are no errors, reviews all related areas. If there are no failures, sets the PIN_FLD_RESULT field to PASS.

Getting Deposit Specifications

Use the PCM_OP_DEPOSIT_GET_SPECIFICATION opcode to get existing deposit specification objects. If the name is specified in the input flist, it returns only the particular /deposit_specification object, otherwise it returns all objects in the BRM database. This opcode is called by Billing Care.

Note:

By default, the search limit for the opcode is set to 500 and only lists the most recent records. You can customize the search limit according to the requirement.

PCM_OP_DEPOSIT_GET_SPECIFICATION does the following:

  • Validates the mandatory parameters in the input flist.

  • Calls the PCM_OP_SEARCH opcode to find the specified /deposit_specification object and prepares the output flist.

Modifying Deposit Specifications

Use the PCM_OP_DEPOSIT_MODIFY_SPECIFICATION opcode to modify the /deposit_specification object attributes. This opcode is called by Billing Care.

PCM_OP_DEPOSIT_MODIFY_SPECIFICATION does the following:

  • Validates the mandatory parameters in the input flist.

  • Searches for the given /deposit_specification with the POID.

  • If the specification exists, calls the PCM_OP_DEPOSIT_POL_VALID_SPECIFICATION opcode to validate the input parameters.

  • Calls the PCM_OP_WRITE_FLDS opcode to update the /deposit_specification object with the fields provided in the input flist.

Deleting Draft Deposit Specifications

Use the PCM_OP_DEPOSIT_DELETE_DRAFT opcode to delete draft deposit specifications. The opcode internally validates the status. If the specification is in draft status, the opcode deletes the provided /deposit_specification object. Otherwise, the opcode returns an error. This opcode is called by Billing Care.

Purchasing Deposits

Use the PCM_OP_DEPOSIT_PURCHASE_DEPOSIT opcode to create a customer deposit.

Using this opcode, you can select any existing specification from the BRM database and associate it with the customer. The specification must include a deposit charge.

As part of this opcode, a purchase deposit entity is created in the BRM database, the associated charge offer from the deposit specification is purchased by the customer, and the charge is applied. The opcode creates a deposit object that includes all the information about the deposit purchased.

PCM_OP_DEPOSIT_PURCHASE_DEPOSIT triggers the /deposit_charge event and the /item/deposit_charge item. It creates the /purchased_deposit object and makes the payment for the deposit.

Note:

Interest calculation happens only when the payments are received for the account. If the purchased deposit does not collect any payment, the last_interest_calc_t field stays empty and is updated in the PCM_OP_DEPOSIT_COLLECT_PAYMENT opcode.

The PCM_OP_DEPOSIT_PURCHASE_DEPOSIT opcode does the following:

  • Validates the mandatory parameters in the input flist.

  • Calls the PCM_OP_DEPOSIT_POL_VALID_PURCHASE_DEPOSIT opcode to validate the input parameters.

  • Calls the PCM_OP_READ_OBJ opcode to get the product details that are configured in the deposit specification.

  • Prepares the input flist for the PCM_OP_BILL_MAKE_BILL_NOW opcode to include the /item/deposit_charge item.

  • Calls the PCM_OP_BAL_GET_BALANCES opcode to get the credit limit.

  • Calls the PCM_OP_BILL_SET_LIMIT_AND_CR opcode to increase the credit limit by the deposit amount.

  • Gets the /event/billing/item/transfer event from the output flist.

  • For a payment, including a pre-defined payment, calls the PCM_OP_PYMT_COLLECT opcode to collect the deposit amount.

  • Prepares the input flist for the PCM_OP_BILL_ITEM_TRANSFER opcode to allocate the collected or pending payments to the deposit amount.

  • Calls the PCM_OP_ACT_USAGE opcode to trigger the /event/deposit/create notification event that can be sent to the customer.

Validating a Deposit Purchase

Use the PCM_OP_DEPOSIT_POL_VALID_PURCHASE_DEPOSIT policy opcode to validate and implement any customizations while purchasing a deposit. This policy opcode is called by the PCM_OP_DEPOSIT_PURCHASE_DEPOSIT opcode.

Getting Deposits

Use the PCM_OP_DEPOSIT_GET_DEPOSITS opcode to get the purchased deposits for an account, service, or bill unit from the /purchased_deposit object. This opcode is called by Billing Care.

Note:

By default, the search limit for the opcode is set to 500 and only lists the most recent records. You can customize the search limit.

The opcode gets the available deposits associated with a given account or service.

PCM_OP_DEPOSIT_GET_DEPOSITS does the following:

  • Validates the mandatory parameters in the input flist.

  • Calls the PCM_OP_READ_OBJ opcode if the /purchased_deposit object is provided.

  • Prepares the search template to search the /purchased_deposit object.

  • Calls the PCM_OP_SEARCH opcode and prepares the output flist.

Updating Deposits

Use the PCM_OP_DEPOSIT_UPDATE_DEPOSIT opcode to increase or decrease the deposit amount. The opcode reverses the existing deposit_charge item and creates a new deposit_charge for the given deposit amount and updates the purchased deposit object.

Note:

Requesting an update for a transferred deposit is not valid.

PCM_OP_DEPOSIT_UPDATE_DEPOSIT does the following:

  • Validates the mandatory parameters in the input flist.

  • Calls the PCM_OP_DEPOSIT_POL_VALID_UPDATE_DEPOSIT opcode to validate the input parameters.

  • Calls the PCM_OP_DEPOSIT_REVERSE_DEPOSIT opcode to reverse a deposit.

  • Calls the PCM_OP_DEPOSIT_PURCHASE_DEPOSIT opcode to purchase a deposit.

  • Creates a custom event to update the deposit and include it in the events array of the /purchased_deposit object.

Validating Deposit Updates

Use the PCM_OP_DEPOSIT_POL_VALID_UPDATE_DEPOSIT opcode to validate and implement any customizations while updating the deposit. This policy opcode is called by the PCM_OP_DEPOSIT_UPDATE_DEPOSIT opcode.

Collecting Deposit Payments

Use the PCM_OP_DEPOSIT_COLLECT_PAYMENT opcode to collect pending payments for deposits purchased by customers.

The PCM_OP_DEPOSIT_COLLECT_PAYMENT opcode does the following:

  • Validates the mandatory parameters in the input flist.

  • Calls the PCM_OP_DEPOSIT_POL_VALID_COLLECT_PAYMENT opcode to validate the input parameters.

  • Calls the PCM_OP_READ_OBJ opcode to get the deposit details provided in the input.

  • Calls the PCM_OP_PYMT_COLLECT opcode to collect the deposit amount.

  • Gets the /event/billing/item/transfer event from the output flist.

  • Prepares the input flist for the PCM_OP_BILL_ITEM_TRANSFER opcode to transfer the deposit amount.

  • Calls the PCM_OP_WRITE_FLDS opcode to update the received deposit amount and the balance amount.

  • If the payment received is the first payment, and the calculate interest flag is set, interest calculation starts from the date of this payment.

Validating Deposit Payment Collections

Use the PCM_OP_DEPOSIT_POL_VALID_COLLECT_PAYMENT opcode to validate and implement any customizations while collecting the deposit payments. This policy opcode is called by the PCM_OP_DEPOSIT_COLLECT_PAYMENT opcode.

Reversing Deposits

Use the PCM_OP_DEPOSIT_REVERSE_DEPOSIT opcode to reverse any unintentional or wrongly made deposits. The opcode opens the /item/payment object associated with the /item/deposit_charge object and creates /item/deposit/reversal with the same deposit charge amount.

PCM_OP_DEPOSIT_REVERSE_DEPOSIT does the following:

  • Validates the input flist.

  • Calls the PCM_OP_DEPOSIT_POL_VALID_REVERSE_DEPOSIT opcode with the input flist.

  • Gets the PIN_FLD_RESULT from the PCM_OP_DEPOSIT_POL_VALID_REVERSE_DEPOSIT output flist.

  • Searches for /item/deposit_charge item for the given /purchased_deposit.

  • Gets the status and the item total from the /item/deposit_charge item.

  • If the calculate interest flag is set:

    • Prepares the input flist and calls the PCM_OP_DEPOSIT_ADD_INTEREST opcode to calculate and add the interest.

    • Gets the interest amount from the PIN_FLD_DEPOSIT_INTEREST_AMOUNT from /purchased_deposit.

    • Prepares the input flist for the PCM_OP_PYMT_COLLECT opcode, to provide the interest accumulated as an /item/payment object with the G/L ID.

  • Calls the PCM_OP_PYMT_COLLECT opcode to create the /item/payment object for the interest amount.

  • Prepares the input flist for PCM_OP_ACT_USAGE.

  • Calls the PCM_OP_BILL_ITEM_TRANSFER to transfer /item/deposit/reversal to /item/deposit_charge.

  • Calls the PCM_OP_BILL_SET_LIMIT_AND_CR opcode to adjust the credit limit amount.

  • Calls the PCM_OP_WRITE_FLDS opcode to update the /purchased_deposit object.

  • Calls the PCM_OP_ACT_USAGE opcode to trigger the /event/deposit/reversal notification event that can be sent to the customer.

Validating a Deposit Reversal

Use the PCM_OP_DEPOSIT_POL_VALID_REVERSE_DEPOSIT opcode to validate and implement any customizations while reversing the deposit. This policy opcode is called by the PCM_OP_DEPOSIT_REVERSE_DEPOSIT opcode.

Releasing Deposits

Use the PCM_OP_DEPOSIT_RELEASE_DEPOSIT opcode to release an existing deposit amount.

You can release the deposit amount as a refund, as a prepayment for due bills or future bills, or to settle the customer’s account balance, an option called zeroize.

You can select one of the following modes to release the deposit:

  • Prepayment: The /item/payment object is created immediately.

  • Refund: The /deposit_refund_request object is created and can be approved by the approver. After it is approved, the /item/payment and /item/refund objects are created and refunded.

  • Zeroize: The /item/payment object is created immediately, the pending items are billed, /item/payment is allocated to the bill items, and the remaining balance is refunded to the customer.

PCM_OP_DEPOSIT_RELEASE_DEPOSIT does the following:

  • Validates the input flist.

  • Calls the PCM_OP_DEPOSIT_POL_VALID_RELEASE_DEPOSIT opcode to validate the input parameters.

  • Calls the PCM_OP_WRITE_FLDS opcode to update the /purchased_deposit object for the balance amount and amount released.

  • Calls the PCM_OP_BILL_MAKE_BILL_NOW opcode to bill the pending items for a specific service or bill unit from the /purchased_deposit object.

  • If the calculate interest flag is set:

    • Prepares the input flist and calls the PCM_OP_DEPOSIT_ADD_INTEREST opcode to calculate and add the interest.

      Note:

      Interest is released only when the complete balance amount is refunded or released. Otherwise, interest is calculated but not released.
    • Gets the interest amount from the PIN_FLD_DEPOSIT_INTEREST_AMOUNT field in the /purchased_deposit object.

    • Prepares the input flist for the PCM_OP_PYMT_COLLECT opcode to provide the accumulated interest as /item/payment, with the G/L ID.

  • Prepares the input flist to call the PCM_OP_BILL_ITEM_TRANSFER opcode, to transfer the deposit amount to a bill.

  • Calls the PCM_OP_WRITE_FLDS opcode to update the /purchased_deposit object for the balance amount and released amount.

  • Calls the PCM_OP_DEPOSIT_REFUND_REQUEST opcode to create the /deposit_refund_request object for the deposit amount.

  • Calls the PCM_OP_DEPOSIT_UPDATE_REFUND opcode to create the /item/refund object.

  • Calls the PCM_OP_CUST_SET_NOTE opcode to create the /note object.

  • Calls the PCM_OP_ACT_USAGE opcode to trigger the /event/deposit/release notification event that can be sent to the customer.

  • Calls the PCM_OP_WRITE_FLDS opcode to add the /event/deposit/release event details to the /purchased_deposit object.

Validating a Deposit Release

Use the PCM_OP_DEPOSIT_POL_VALID_RELEASE_DEPOSIT opcode to validate and implement any customizations while releasing the deposit. This policy opcode is called by the PCM_OP_DEPOSIT_RELEASE_DEPOSIT opcode.

Transferring Deposits

Use the PCM_OP_DEPOSIT_TRANSFER_DEPOSIT opcode to transfer deposits from one account to another. The interest is calculated and updated before transferring and is also transferred to the target account.

The PCM_OP_DEPOSIT_TRANSFER_DEPOSIT opcode does the following:

  • Validates the input flist.

  • Calls the PCM_OP_DEPOSIT_POL_VALID_TRANSFER_DEPOSIT opcode to validate the input parameters.

  • Reads the /purchased_deposit object using the PCM_OP_READ_OBJ opcode.

  • Prepares and calls the PCM_OP_DEPOSIT_ADD_INTEREST opcode to calculate the interest on the source account.

  • Prepares the input flist to create the /purchased_deposit object on the target account or service by copying the relevant fields from the /purchase_deposit object.

  • Calls the PCM_OP_CREATE_OBJ opcode to create the /purchased_deposit object on the target account.

  • Calls the PCM_OP_ACT_USAGE opcode to create the /event/deposit/transfer event on the source account.

  • Calls the PCM_OP_ACT_USAGE opcode to create the /event/deposit/receive event on the target account.

Validating a Deposit Transfer

Use the PCM_OP_DEPOSIT_POL_VALID_TRANSFER_DEPOSIT opcode to validate and implement any customizations while transferring the deposit. This policy opcode is called by the PCM_OP_DEPOSIT_TRANSFER_DEPOSIT opcode.

Adding Interest to a Deposit

Use the PCM_OP_DEPOSIT_ADD_INTEREST opcode to calculate the interest amount for the purchased_deposit, for a specific duration.

The PCM_OP_DEPOSIT_ADD_INTEREST opcode does the following:

  • Validates the input.

  • Calls the PCM_OP_DEPOSIT_POL_PRE_ADD_INTEREST opcode to modify the effective date of the interest calculation.

  • Calculates the interest based on the effective date or the interest calculation offset unit. The offset unit can be daily, weekly, monthly, or yearly.

    Note:

    If the effective date is passed, the interest is calculated from the last interest calculation date until the effective date for the applicable days. Otherwise, the interest is calculated based on the interest offset unit and the offset value.
  • Calls the PCM_OP_DEPOSIT_POL_POST_ADD_INTEREST opcode to modify the calculated interest amount.

  • Calls the PCM_OP_ACT_USAGE opcode to create the /event/billing/deposit/interest/credit event and associate it with the /item/deposit/interest/credit item. Sets PIN_FLD_START_T and PIN_FLD_END_T as interest calculation start and end dates from the PIN_FLD_INTEREST_INFO array.

  • Calls the PCM_OP_ACT_USAGE opcode to create the /event/billing/deposit/interest/debit event and the /item/deposit/interest/debit item to negate the credited interest amount.

  • Calls the PCM_OP_WRITE_FLDS opcode to add the /event/billing/deposit/interest/debit event details to the PIN_FLD_EVENTS array.

  • Calls the PCM_OP_BILL_ITEM_TRANSFER opcode to transfer the amount from the /item/deposit/interest/credit object to the /item/deposit/interest/debit object.

Customizing the Interest Calculation

You can customize the interest calculation using these policy opcodes:

  • PCM_OP_DEPOSIT_POL_PRE_ADD_INTEREST: Use to modify the effective date of the interest calculation.

  • PCM_OP_DEPOSIT_POL_POST_ADD_INTEREST: Use to modify the calculated interest amount.

Requesting Deposit Refunds

Use the PCM_OP_DEPOSIT_REFUND_REQUEST opcode to create a deposit refund request.

The PCM_OP_DEPOSIT_REFUND_REQUEST opcode does the following:

  • Validates the input.

  • Calls the PCM_OP_DEPOSIT_POL_VALID_REFUND_REQUEST opcode to validate the input parameters.

  • Calls the PCM_OP_CREATE_OBJ opcode to create the /deposit_refund_request request.

  • Calls the PCM_OP_CUST_SET_NOTE opcode to create /note object. Creates the /event/customer/note/create event in the output flist.

  • Calls the PCM_OP_ACT_USAGE opcode and creates the /event/deposit/refund/request event.

Validating a Deposit Refund Request

Use the PCM_OP_DEPOSIT_POL_VALID_REFUND_REQUEST opcode to validate and implement any customizations while requesting a deposit refund. This policy opcode is called by the PCM_OP_DEPOSIT_REFUND_REQUEST opcode.

Getting Refund Requests

Use the PCM_OP_DEPOSIT_GET_REFUND_REQUEST opcode to get all the deposit refund requests. This opcode is called by Billing Care.

The PCM_OP_DEPOSIT_GET_REFUND_REQUEST opcode does the following:

  • Validates the input.

  • Gets the user ID and adds it to the search template if the account or service POID or status exists.

  • Calls the PCM_OP_SEARCH opcode to get, prepare, and return the /deposit_refund_request.

Updating Refund Requests

Use the PCM_OP_DEPOSIT_UPDATE_REFUND_REQUEST opcode to update the deposit refund review request. CSRs review the /deposit_refund_request object and select either APPROVE_FULL, APPROVE_PARTIAL, or REJECT.

The PCM_OP_DEPOSIT_UPDATE_REFUND_REQUEST opcode does the following:

  • Validates the input.

  • Gets the /deposit_specification object using the /purchased_deposit object.

  • Gets the /deposit_spec_profile object using the /deposit_specification object.

  • If the complete balance is released or refunded, calls the PCM_OP_DEPOSIT_ADD_INTEREST opcode to calculate and add the interest amount.

  • Calls the PCM_OP_ACT_USAGE opcode to charge the /event/billing/product/fee/purchase/deposit/refund event and associate it with the /item/deposit/refund/fee item.

  • Calls the PCM_OP_BILL_ITEM_TRANSER opcode to transfer the /item/deposit/refund/fee item to the /item/payment item.

  • Calls the PCM_OP_CUST_SET_NOTE opcode to create the /note object.

  • Calls the PCM_OP_ACT_USAGE opcode to create an /event/deposit/refund/approved event.

  • Calls the PCM_OP_ACT_USAGE opcode to charge the /event/billing/product/fee/purchase/deposit/refund event and associate it with the /item/deposit/refund/fee item.

  • Calls the PCM_OP_BILL_ITEM_TRANSER opcode to transfer the /item/deposit/refund/fee item to the /item/payment item and transfer the approved_amount from the /item/payment item to the /item/refund item.

Updating Received Deposits

The PCM_OP_DEPOSIT_UPDATE_DEPOSIT_RECEIVED opcode is called through the notification of the /event/billing/item/transfer event to update the received amount, balance amount, and map the /event/billing/item/transfer event.

The PCM_OP_DEPOSIT_UPDATE_DEPOSIT_RECEIVED opcode does the following:

  • Validates the mandatory parameters in the input flist.

  • Calls the PCM_OP_WRITE_FLDS opcode to update the /purchased_deposit object with the input flist.

  • Prepares the input flist for the PCM_OP_ACT_USAGE opcode to trigger the notification event, /event/deposit/collected.

  • Calls the PCM_OP_ACT_USAGE opcode to update the deposit amount received.

  • Calls the PCM_OP_BILL_SET_LIMIT_AND_CR opcode to decrease the credit limit by the deposit amount.

Triggering Deposits

The PCM_OP_DEPOSIT_TRIGGER_DEPOSIT opcode is called to create the /purchased_deposit object. This is called when any charge offer with the /event/billing/product/fee/purchase/deposit event type is created as part of purchasing a deal.

The PCM_OP_DEPOSIT_TRIGGER_DEPOSIT opcode does the following:

  • Prepares the input flist.

  • Searches for the deposit specification that is configured with the purchased product.

  • Calls the PCM_OP_PURCHASE_DEPOSIT opcode to purchase the product that is associated with the deposit specification.

Retrieving Transaction Details of a Deposit

Use the PCM_OP_DEPOSIT_GET_TRANSACTIONS opcode to get the transaction details of a purchased deposit. It returns the complete details of the events. If this opcode is called for purchased deposit which is having a different parent, it fetches the event details of the purchased deposit in the hierarchy.

The PCM_OP_DEPOSIT_GET_TRANSACTIONS opcode does the following:

  • Validates the mandatory parameters in the input flist.
  • Gets the event details and corresponding notes for a given purchase deposit. If the input POID of purchase deposit is not same as the POID of parent or purchased_deposit, then it fetches the event and corresponding notes of the purchased deposit in the hierarchy.
  • Calls the PCM_OP_SEARCH opcode for /event and corresponding notes object and prepares the output flist.