C1-RF-PROC
This algorithm is invoked when the status of the upload request is changed to Processing. It fetches a list of records which are in the Valid status. For each valid record with a unique combination of the refund request type and account ID, this algorithm creates a refund request for the account. However, if there are multiple entity IDs with the same combination, it adds all the entities in the same refund request.
If the Approval Required option is selected in the respective refund request type, the status of the refund request is set to Approval In Progress. However, if the Approval Required option is not selected in the respective refund request type, the system checks the number of entities added in the refund request. If the number of entities added in the refund request does not exceed the online record process limit, the system creates the refund adjustments using the refund adjustment type and then changes the status of the refund request to Processed. However, if the number of entities added in the refund request exceeds the online record process limit, the status of the refund request is set to Deferred Processing.
If the record is successfully processed, the status of the record is changed to Processed. However, if the record could not be processed successfully due to any reason, the status of the record is changed to Error. Finally, the status of the upload request is changed to Processed.
