This pull request removes our custom RMA functionality that was built on CosmosDB and replaces it with native OrderCloud Order Returns
Differences from previous implementation
Although OrderCloud order returns solves the same general problem, it does so in a slightly different way. Feature parity was kept wherever possible but there are some notable changes that should be mentioned
You are now able to define which products are returnable (Product.Returnable) this is part of editing a product and will default to true on new products. If you are using an existing marketplace, this will need to be set to true before returns can be submitted against the order. Note: this will only work for any orders submitted from this point forward
Order returns do not support partial cancellations and we have decided not to support partial cancellations via a custom feature at this time. An order must have no line items that have shipped for it to be canceled (in full). Once any line items on an order have shipped it can no longer be cancelled, only returns can be submitted against those shipped items.
The approval process is working with OrderCloud's seller approval roles which means you can define a subset of admin users that are allowed to process returns. You can go to Seller Admin > Seller Users to add the "Order Return Approver" permission to any admin user that you wish. Note: they will need to log out and log back in for permissions to take effect, additionally old permissions are cached for up to 5 minutes
You are now able to override return amounts. By default, the returned line items refund amount will be calculated to take into account promotions, tax, etc but will exclude shipping cost.
Only admin users are able to process returns. Previously suppliers could also process returns.
Migrating an existing marketplace from RMAS (old) to Order Returns (new)
Call the POST /seed endpoint to regenerate the data inside your marketplace
Update Product.Returnable on any product you wish to be returnable. This can be done via the admin UI in product edit. Note: this will not affect already submitted orders
Grant any admin user you wish to handle order returns the "Order Return Approver" permission. This can be done via the admin UI in Seller Admin > Seller Users > Edit seller user
If you are using the Sendgrid integration, then you will need to define SendgridSettings:OrderReturnTemplateID in app settings. A default template can be found in assets/templates/email folder
Deploy solution (new endpoints for handling order returns must be exposed to OrderCloud)
Order Return User Flow
User creates an order where at least one lineitem has product.Returnable=true
Admin ships line items where product.Returnable=true
User creates an order return by selecting line items, quantities, and return reason
Admin user belonging to the "Order Return Approver" user group can now see the order return awaiting their approval. They may choose to modify the refund amount on the line items and then "Approve" or "Decline" the order return with a comment. When approving the return they can choose to refund immediately in which case any payment will be refunded and the return will be completed or they can choose to simply approve it in which case they can elect to complete it at a later time (possibly when they receive the returned items)
Coming Soon
Allow admin users to create returns. This may be useful for example when they receive a call from a customer and need to issue a refund or return on their behalf
Allow admin users to delete line items on a return
This pull request removes our custom RMA functionality that was built on CosmosDB and replaces it with native OrderCloud Order Returns
Differences from previous implementation
Although OrderCloud order returns solves the same general problem, it does so in a slightly different way. Feature parity was kept wherever possible but there are some notable changes that should be mentioned
Product.Returnable
) this is part of editing a product and will default to true on new products. If you are using an existing marketplace, this will need to be set to true before returns can be submitted against the order. Note: this will only work for any orders submitted from this point forwardMigrating an existing marketplace from RMAS (old) to Order Returns (new)
SendgridSettings:OrderReturnTemplateID
in app settings. A default template can be found in assets/templates/email folderOrder Return User Flow
Coming Soon