Transaction and Credit Collection Process

Most transactions originate in other applications, such as order capture, accounts receivables, and sales. After you import these transactions into the transaction staging table, you gather them using the Collect Transactions process.

The import process treats any credits imported from a source application in the same way as transactions, by populating them in the staging table along with the credit information.

In this figure, transactions are gathered in the transaction staging table to be processed by Collect Transactions.

Transactions Imported to the Staging Table and then Processed

The Collect Transactions process is included in the task Run All Transaction Processes, or you can run it individually. You can find both in the Credits and Earnings work area task menu. Here's what the process does:

  • Checks for duplicates

  • Validates data

  • Converts currencies

Duplicate Transaction Handling

If the collection process detects duplicate transactions, then it checks each staging table record that has the same combination of transaction number and transaction type: the composite key. For credit transactions, the process includes the credited participant ID in the composite key to identify duplicates. The process collects only the record with the most recent, last updated date.

The collection process then checks for duplicates between the staging table records and the original transaction and credit table records by comparing the composite keys. If the profile option ORA_CN_COLLECT_CHANGED_TRX is set to yes, then the process also compares all the attributes for a duplicate transaction to check for any changes. If the process compares just the composite keys, then it sets the status for the original transaction to Obsolete. But if it also checks attributes and finds no attribute change, then it doesn't collect the stage transaction. The status change ensures that regular processes, such as Run Crediting and Rollup, don't include the obsolete original transaction before the Revert Transactions process runs.

When the application collects the new transaction in the appropriate table, it sets Change Transaction to yes. This setting notifies the incentive compensation processes that there is a newer, modified transaction to include during processing.

If the original transaction has a status of Paid, then the incentive process reverses the transaction, credit, and earning records and creates a negative offset for these transactions. The next time a paysheet is created with the transaction, the paysheet includes a negative payment based on the earnings. During the next collection run, the incentive process runs the reversal with the new, changed transaction.

Credit Collection Validation

When collecting the transactions from the staging table, the collection process performs these actions:

  1. It validates the data to ensure that the mandatory columns are available and reference integrity is maintained.

    If you override the crediting process, then the collection process expects that the gathered transactions include this data:

    • Credit receiver

    • Credit amount

    • Split percentage

    • Revenue type

    If you override the classification process, then the collection process expects that the gathered transactions include a credit category.

    If a participant or credit receiver is included in your imported data, the process validates the participant's active start and end dates and Active setting. If the participant is inactive or the transaction end date is after the participant's end date, then the transaction is collected and identified as containing an error.

  2. The process uses the process request parameters to identify the uncollected transactions.

  3. It inserts the validated and identified transactions into the transaction table and updates transaction statuses

  4. It deletes all records from the staging table after the collection process completes.

During each collection run, the process automatically validates any transactions in the base transaction table and any credit transactions in the base credit table that have an error status. For example, a missing participant was imported after the original collection run. During the next collection run, the process changes the status from Collection error to New or Credited for the relevant transactions.

Currency Conversion

When collecting data from the staging table into the transaction table, the collection process converts transaction table source currency values to operating currency values. If a conversion rate is missing for the transaction event date, then the process sets the transaction status to Collection error. Next, if collecting credit transactions, then the application updates all currencies in the credit table.