# order-return

> 2.0: form where the customer asks to return delivered lines of its order (Shopify's orderRequestReturn: the return reaches the admin as requested, the merchant approves it). Read once the order is painted: a request-line-item row per returnable line, with what can be returned; the form sends the rows asked for, then reads the order again. The form hides when nothing can be returned

Status: Ready (Smootify 2.0)  
URL: https://www.smootify.io/docs/astro/reference/elements/order-return  
Updated: 2026-10-21

## Where it can go

- **Inside any of:** [`order-page`](https://www.smootify.io/docs/astro/reference/elements/order-page), [`customer-order`](https://www.smootify.io/docs/astro/reference/elements/customer-order).
- **Must contain** `form`, [`request-line-item`](https://www.smootify.io/docs/astro/reference/elements/request-line-item).
- **Out of place,** Smootify removes it from the page: outside an order, or without a form or a row.

## What it requires

- Shopify’s **customer accounts**, and `newCustomerAccountsPublicKey` in [`SmootifyUserOptions`](https://www.smootify.io/docs/astro/reference/options).

## Fields in the form

Each field’s `name` attribute tells Smootify what the field holds.

| Name | Field | What it does |
|---|---|---|
| `quantity` (in each `request-line-item`) | `input type="number"` input, `select` | How many of the line are asked for, kept between 0 and what the line allows (`max` written; a select gets its options, from 1 with a checkbox, else 0). |
| a checkbox (in each `request-line-item`, any name) | `input type="checkbox"` | The row is asked for only while ticked: its `quantity` field, else all of the line. |
| `reason` (in each `request-line-item`) | `select` | **Required** (, when it offers reasons: Shopify refuses a return line without one, so a row asked for without it shows “Choose a reason for `<title>`” in `[form-fail]` and nothing is sent). Filled with the return reasons Shopify suggests for the line’s product category, after the site’s first option when its value is empty (`Choose a reason`), the visitor’s choice kept when the order is read again; hidden and disabled when Shopify suggests none. |
| `note` (in each `request-line-item`) | `textarea`, `input type="text"` input | The customer’s note on the line, up to 300 characters. |

## Attributes on the element

- **It reads** `is-requestable`, `has-request`, `loaded`.

## Attributes inside it

| Group | Attribute name | Values |
|---|---|---|
| [Return request](https://www.smootify.io/docs/astro/reference/attributes/order-return) | `order-return` | 5 |
| [Return and removal fields](https://www.smootify.io/docs/astro/reference/attributes/order-request-fields) | `name` | 3 |

## Loading

Its code loads only on pages that have `order-return`.
