Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for Spree::CustomerReturn model #2677

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions guides/returns/customer-returns.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Customer returns

Once a [return authorization][return-authorizations] has been created and marked
as authorized, administrators can create a `Spree::CustomerReturn` for the
authorized order.

A [`Spree::StockLocation`][stock-locations] should be assigned for each customer
return. This stock location is where the customer return is to be received.

A `Spree::CustomerReturn` object has the following attributes:

- `number`: A unique eleven-character return number starting with `CR`. For
example: `CR123456789`.
- `stock_location_id`: The ID for the `Spree::StockLocation` where the customer
return should be received.

You may want to also see a list of the `Spree::ReturnItem`s that are associated
with a customer return with the `return_items` method:

```ruby
Spree::CustomerReturn.find(1).return_items
# => <Spree::ReturnItem id: 1 ...>, <Spree::ReturnItem id: 2 ...>
```

[return-authorizations]: return-authorization.md
[stock-locations]: ../inventory/overview.md#stock-locations

## User interface

Solidus does not include a customer-facing customer returns interface. Only
store administrators can authorize and administrate returns from the
`solidus_backend` interface.

Once a store administrator has created a customer return in the
`solidus_backend` interface, each [return item][return-items] can be managed and
[reimbursements][reimbursements] can be made.

For example, you can specify whether return items are resellable, whether your
stock location has received each item, and what they reason for the return is.
All of this information is stored in a `Spree::ReturnItem` object's attributes.

Once an item is marked as "Received", you can create a `Spree::Reimbursement`
for it.

[reimbursement-types]: reimbursement-types.md
[return-items]: return-items.md

31 changes: 9 additions & 22 deletions guides/returns/return-authorizations.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Return authorizations (RMAs)

A `Spree::ReturnAuthorization` allows you to authorize the return of any part of
a customer's order.
a customer's order. A return authorization can only be created for shipments
that have already been shipped. For each item in a return authorization, a
[`Spree::ReturnItem`][return-items] is created.

Return authorizations are also referred to as "return
merchandise authorizations" (RMAs) in the `solidus_backend`.


After an order is shipped, administrators can approve the return of any part
of an order in the `solidus_backend` (from the **Orders -> Order -> RMA** page).

Return authorizations are just the first part of the larger returns system built
into Solidus. When a store administrator creates a new RMA, they fill out a form
that defines the scope of the anticipated return.
Once an RMA has been created, store administrators can add any item listed in
the RMA to a new [`Spree::CustomerReturn`][customer-returns].

A `Spree::ReturnAuthorization` object has the following attributes:

Expand All @@ -28,24 +28,11 @@ A `Spree::ReturnAuthorization` object has the following attributes:
- `return_reason_id`: The ID for the `Spree::ReturnReason` associated with this
return authorization.

## Reimbursement types

Once a return authorization is created, there are many ways that the
administrator could provide compensation to a customer:

- `Spree::Reimbursement::Credit`: Credit the customer for the returned item.
- `Spree::Exchange`: Send a replacement item to the customer.
- `Spree::OriginalPayment`: Refund the original payment.
- `Spree::StoreCredit`: Offer the customer store credit.

## Return items

Return authorizations allow the creation of `Spree::ReturnItem`s. Return items
are associated with `Spree::InventoryUnit`s and can be re-added to your store's
inventory once they are received. For more information, see the
[Inventory][return-items] documentation.
RMAs begin the larger customer return process. Note that there are many ways
that the administrator could provide compensation to a customer.

[return-items]: ../inventory/overview.md#return-items
[customer-returns]: customer-returns.md
[return-items]: return-items.md

## Return authorization flow

Expand Down