Rakuten RMS integration
1. Notes on the Rakuten RMS integration
- The integration is mainly for cancellations. It is not used for importing orders or for returns and exchanges. Orders are imported from your OMS
- The license key must be renewed every 90 days. Once it expires, Rakuten orders can no longer be cancelled. The Recustomer admin does not show the expiry date and you will not be notified when the key expires, so renew it before it expires by following "5. Renew the license key"
2. Register an app in Rakuten RMS
Sign in to Rakuten RMS and go to 店舗様向け情報・サービス (Information and services for stores) → 6 WEB API サービス (6 WEB API service)

Click 2-2 アプリ登録 (2-2 App registration) in the left menu and register an app

※If you have already registered an app, do not register a new one. Open 2-1 アプリ一覧 (2-1 App list) and go to step 3
In 2-1 アプリ一覧 (2-1 App list), click 詳細 (Details) for the app

Mark the security check as confirmed
Click 利用機能編集 (Edit features in use) under 利用機能一覧 (Features in use)

For rpay.order.cancelOrder under 楽天ペイ受注 API(RakutenPay_OrderAPI) (Rakuten Pay Order API), check 利用状態 (Status) so that it shows 利用中 (In use), and save
Click ライセンスキーの確認・変更 (Check / change license key), enter the characters shown, and click 確認する (Confirm)
Note down the serviceSecret and license key shown under 最新の利用情報 (Latest usage information)

※Also noting down the 有効期限 (expiry date) shown to the right of the license key makes it easier to keep track of when to renew
3. Authenticate in Recustomer
Go to Settings > External service integrations > Integrations > Rakuten RMS

Enter the values you noted down in step 2, then click Authenticate
Field Value to enter serviceSecret The serviceSecret you noted down in step 2-8 licenseKey The license key you noted down in step 2-8 
The setup succeeds when the status changes to Authenticated
4. Set Rakuten RMS as a cancellation target
Set Recustomer to stop the shipment in your OMS and then also cancel the Rakuten order when a cancellation is approved. Keep your OMS as the order import source (Order Importer).
Go to Settings > External service integrations > Data integration settings and open the Exchange / Cancellation tab
Set the cancellation main to your OMS and the cancellation sub to "RAKUTEN_RMS"
Click Save at the top right
5. Renew the license key
Renew the license key with the following steps before it expires (after 90 days).
In Rakuten RMS, open the registered app from 店舗様向け情報・サービス (Information and services for stores) → 6 WEB API サービス (6 WEB API service) → 2-1 アプリ一覧 (2-1 App list)
Click ライセンスキーの変更 (Change license key) for the license key under 最新の利用情報 (Latest usage information)

Click 新しいライセンスキーを発行 (Issue a new license key)

Note down the new license key shown under 最新の利用情報 (Latest usage information) on the app details screen
In Settings > External service integrations > Integrations > Rakuten RMS, change licenseKey to the new license key and click Authenticate
※The serviceSecret does not change. Enter the value you noted down in step 2 as is
Stop the old license key. Under 過去の利用情報 (Past usage information), click ライセンスキーの変更 (Change license key) for the old license key, then click 利用停止 (Stop using)
※If the old license key is left in use, you cannot issue a new license key at the next renewal. Always complete the authentication in Recustomer in step 5 before stopping it