# Stock lookup and reservation

> Common settings

> **注意: Only if you accept exchanges**
>
> These settings are used to look up the stock of replacement items and to issue exchange slips, so they are not needed if you do not accept exchanges.

If you accept exchanges, these settings let shoppers choose a replacement based on the stock in the connected system, and issue an exchange slip that reserves the stock of the replacement.

An exchange slip is a slip for the replacement item, issued to the connected system when a shopper chooses an exchange. It is issued at ¥0, so it reserves the stock without creating a charge. The slip is then shipped in the same way as a normal order.

> **注意: An SKU is required on every product (variant) you accept exchanges for**
>
> Exchange slips are sent to your warehouse system or OMS using the SKU as the key. Creating the slip fails for products without an SKU, so always set an SKU on products you accept exchanges for.

## 1. Choosing the systems for lookup and issuing

On the Exchange / Cancellation tab of [Settings > External service integrations > Data integration settings](https://rcmr.io/settings/integrations/integration/target), set the following and save ([Data integration settings](./data-import.html)).

| Item | What to set |
|---|---|
| Get Product Variants | The system the stock is looked up in |
| Create Exchange Order | The system the exchange slip is issued in |

※Set the same system for the stock lookup (Get Product Variants) and the order import source (Order Importer). If they differ, the replacement items are not shown correctly

## 2. Stock lookup

Open the system at [Settings > External service integrations > Integrations](https://rcmr.io/settings/integrations/integration/externals) and configure it on the Integration settings tab.

| Item | Description |
|---|---|
| Stock lookup | Looks up the stock when a shopper chooses an exchange and only allows them to select items that are in stock. Items without stock are shown as "Out of stock" (Product Variant Get) |
| Stock lookup locations | Choose "Look up all locations" or "Look up specific locations only" (Shopify) |

※For items without stock, the exchange option is greyed out on the shopper's request page and only a refund can be chosen

## 3. Reserving stock (issuing exchange slips)

On the same Integration settings tab, configure the exchange slip.

| Item | Description |
|---|---|
| Create an order slip for the replacement item | Creates a ¥0 order through the API to reserve the stock of the replacement (Order Exchange Post) |
| Order tags (optional) | Add up to three Shopify order tags of your choice to the generated order (Shopify) |

### When the exchange slip is issued

| Option | Description |
|---|---|
| Create it automatically when the approval status becomes approved | The exchange order is created when the return request is approved: on completion of the request for automatically approved requests, and on approval in the admin dashboard for manually approved ones. Use this if you ship the replacement without waiting for the returned item |
| Enter it manually on the exchange processing page | The order is created when you click **Create exchange slip** on the exchange processing page of the request detail, after approval. Use this if you ship the replacement after inspecting the returned item |

### How the stock is reserved

| Option | Description |
|---|---|
| Create the order on approval to reserve the stock | The exchange order is created and the stock reserved at the moment you approve the request |
| Reserve the stock with a draft order on request, and confirm the order after approval and payment | The stock is reserved provisionally with a draft order when the request is made, and the order is confirmed once the approval and payment are complete |

※With "Reserve the stock with a draft order on request", Shopify sends the shopper an order confirmation email on approval

※For an equal exchange (no price difference), the payment is marked as complete automatically on approval and the order is confirmed immediately

※The request ID is added automatically to the Shopify order tags

※The exchange order is created in Shopify with a new order number and a product price of ¥0
