Refunds for a return merchandise authorization (RMA) can only be directed to one destination. Either one account can be credited or one order can be credited.
This scheduler command is designed to perform refunds. Note that this job is not automatically scheduled with the base product because it is run in the context of a store. Once a store has been created, the scheduled job can be created using the Administration Console.
The table below describes the environment variable associated with this scheduled command:
Environment variable name | Description |
---|---|
storeID | The store upon which the command runs. |
Behavior
- ReturnCreditAndCloseScan scans for RMAs that are eligible to be credited and marked closed. For each RMA with the status 'APP', if all RMA items have been received and none have been credited, then the task command CreditReturnItem is called. If CreditReturnItemCmd raises an exception, then a message (_ERR_RMA_CREDIT_FAILED) is written to the error log. If CreditReturnItemCmd is successful then the RMA is moved to status 'CLO' (closed).
- CreditReturnItem will check to see if there is a refund. If there is, the approval policy command ApproveRefundPolicy will be run to see if the refund is allowed. The default implementation for this command will always allow the refund. Once the refund is allowed, the DoRefund task command is executed. On successful completion, all RMA items will have there CREDITDATE set.
- If a third party tax system is integrated, then call the TaxCalculationUsageSalesTaxTIKCmd to set the audit flag for the sales tax to be returned.