> ## Documentation Index
> Fetch the complete documentation index at: https://docs.queryful.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Returns

> Each returned item, dated by the day the return was created: quantity, value and reason, exchanges and fees collected, by product and variant option.

Each returned item, dated by the day the return was created: quantity, value and reason, exchanges and fees collected, by product and variant option.

## Example

```sql theme={null}
FROM returns
  SHOW returned_quantity, returns
  GROUP BY product_title
  SINCE startOfMonth(-1m) UNTIL today
  ORDER BY returned_quantity DESC
```

## Metrics

| Metric | Type | Description |
| - | - | - |
| `returned_quantity` | Number | Units customers asked to return. |
| `returns` | Number | Returns created in the period. |
| `returned_value` | Currency | What the returned units sold for, after discounts. |
| `return_fees_collected` | Currency | Restocking fees and return shipping fees charged to customers. |
| `exchange_rate` | Percent | Returns swapped for another item, as a share of returns. |
| `restocked_on_return` | Number | Returned units put back into stock. |
| `not_restocked_on_return` | Number | Returned units not put back into stock, or missing from the return. |
| `exchange_value_retained` | Currency | The value of the items customers took in exchange: sales kept rather than refunded. |

## Dimensions

| Dimension | Description |
| - | - |
| `return_line_item_reason` | The reason given for the returned item, such as too-small or changed-my-mind. |
| `return_status` | requested, open, closed, declined or canceled. |
| `return_disposition` | Where the returned item went: Restocked, Not restocked, Missing or Processing required. |
| `return_carrier` | The carrier that brought the return back. |
| `product_title` | Product title (variants roll up). |
| `product_variant_title` | Product variant: splits a product into its variants. |
| `product_variant_sku` | Variant SKU. |
| `product_vendor` | Product vendor. |
| `product_type` | Shopify product type. |
| `product_title_at_time_of_sale` | The product's title when it was sold. |
| `product_variant_title_at_time_of_sale` | The variant's title when it was sold. |
| `product_variant_option_1` | The variant's first option with its name, such as Size: S. |
| `product_variant_option_2` | The variant's second option with its name, such as Colour: Blue. |
| `product_variant_option_3` | The variant's third option with its name. |

## Filters

| Filter | Type | Description |
| - | - | - |
| `return_status` | Text | requested, open, closed, declined or canceled. |
| `return_disposition` | Text | Where the returned item went: Restocked, Not restocked, Missing or Processing required. |
| `return_carrier` | Text | The carrier that brought the return back. |
| `product_variant_sku` | Text | Variant SKU. |
| `product_type` | Text | Shopify product type. |
| `product_title_at_time_of_sale` | Text | The product's title when it was sold. |
| `product_variant_title_at_time_of_sale` | Text | The variant's title when it was sold. |
| `product_variant_option_1` | Text | The variant's first option with its name, such as Size: S. |
| `product_variant_option_2` | Text | The variant's second option with its name, such as Colour: Blue. |
| `product_variant_option_3` | Text | The variant's third option with its name. |
| `return_line_item_reason` | Text | The reason given, such as too-small. |
| `product_title` | Text | Product title. |
| `product_vendor` | Text | Product vendor. |

## Linked records

Fields of the records this dataset reaches can be shown, grouped by and filtered on, written with a dot after the record (for example `order.name`). Each record's page lists its fields.

| Write | Record | Reached through |
| - | - | - |
| `order.<field>` | [Order](https://docs.queryful.app/queryfulql/records/order.md) | Order |
| `order.customer.<field>` | [Customer](https://docs.queryful.app/queryfulql/records/customer.md) | Order › Customer |
| `order.customer.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Order › Customer › Company |
| `order.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Order › Company |
| `order.company_location.<field>` | [Company location](https://docs.queryful.app/queryfulql/records/company_location.md) | Order › Company location |
| `order.company_location.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Order › Company location › Company |
| `order.location.<field>` | [Location](https://docs.queryful.app/queryfulql/records/location.md) | Order › Location |
| `order.market.<field>` | [Market](https://docs.queryful.app/queryfulql/records/market.md) | Order › Market |
| `product.<field>` | [Product](https://docs.queryful.app/queryfulql/records/product.md) | Product |
| `variant.<field>` | [Variant](https://docs.queryful.app/queryfulql/records/variant.md) | Variant |
| `variant.product.<field>` | [Product](https://docs.queryful.app/queryfulql/records/product.md) | Variant › Product |
| `shop.<field>` | [Store](https://docs.queryful.app/queryfulql/records/shop.md) | Store |

## Related datasets

* [Sales](https://docs.queryful.app/queryfulql/datasets/sales.md)
* [Orders](https://docs.queryful.app/queryfulql/datasets/orders.md)
* [Order line items](https://docs.queryful.app/queryfulql/datasets/order_lines.md)
* [Restocks](https://docs.queryful.app/queryfulql/datasets/refund_lines.md)
* [Refunds](https://docs.queryful.app/queryfulql/datasets/refunds.md)
* [Sales taxes](https://docs.queryful.app/queryfulql/datasets/sales_taxes.md)
* [Write-offs](https://docs.queryful.app/queryfulql/datasets/sale_write_offs.md)
* [Profitability](https://docs.queryful.app/queryfulql/datasets/profitability.md)
* [Agentic sales](https://docs.queryful.app/queryfulql/datasets/agentic_sales.md)
* [Products bought together](https://docs.queryful.app/queryfulql/datasets/product_pairs.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.