# Size Recommender

The Size Recommender analyzes historical return data and customer feedback to generate size-fit guidance for individual products. It helps shoppers understand whether an item runs small, true to size, or large, and provides an AI-generated summary of what other customers have experienced.

## How it works

1. **Data collection** — parcelLab aggregates return reasons and customer feedback across your order history.
2. **Analysis** — The system calculates a fit position and confidence score for each product based on return patterns.
3. **AI summary** — An LLM generates a plain-language summary of customer sizing feedback.
4. **Display** — The recommendation is shown on the product detail page (PDP) via the embeddable UI widget or your own custom integration using the API.

## Key components

| Component                                                                                                        | Description                                                                                                                                                                                                                                                                                                                                                                   |
| ---------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [**Size Recommender API**](https://docs.parcellab.com/docs/developers/size-recommender/size-recommender/api)     | REST endpoint that returns fit category, confidence score, fit position, and customer feedback summary for a given product.                                                                                                                                                                                                                                                   |
| [**Selection Guide UI**](https://docs.parcellab.com/docs/developers/size-recommender/size-recommender/ui-plugin) | Open-source reference implementation from the [Selection Guide UI module](https://github.com/parcelLab/parcellab-embedded-ui-snippets/tree/main/packages/selection-guide-ui) in the parcelLab Embedded UI Snippets repository. It renders recommendations on your PDP and supports multiple locales, configurable missing-data handling, and per-section visibility controls. |

## Use cases

* **Reduce size-related returns** — Give customers confidence in their size choice before they buy.
* **Improve conversion** — Shoppers who see fit guidance are more likely to complete a purchase.
* **Surface customer insights** — Show aggregated feedback like "runs small in the waist" directly on the PDP.
* **Customize the experience** — Match the widget's appearance to your brand with themes, colors, layout options, and visibility controls.

## Getting started

{% stepper %}
{% step %}

#### Confirm your account is enabled

The Size Recommender requires sufficient historical order and return data. Contact your parcelLab account manager to confirm the feature is enabled for your account.
{% endstep %}

{% step %}

#### Test the API

Make a test call to verify data is available for your products:

```bash
curl "https://api.parcellab.com/v4/size-recommender/recommendation/YOUR_PRODUCT_ID/?account_id=YOUR_ACCOUNT_ID"
```

A successful response includes `size_fit_category`, `confidence_smetabase_core`, and `llm_summary`.
{% endstep %}

{% step %}

#### Embed the widget

Add the UI widget to your product detail page using a simple script tag and HTML attribute:

```html
<div
  data-size-recommender
  data-account-id="YOUR_ACCOUNT_ID"
  data-product-id="YOUR_PRODUCT_ID"
></div>

<script
  src="https://cdn.parcellab.com/js/selection-guide-ui/v1/size-recommender.iife.js"
  defer
></script>
```

See the [UI Plugin documentation](https://docs.parcellab.com/docs/developers/size-recommender/size-recommender/ui-plugin) for full configuration and customization options.

You can also preview configurations and copy working embed code from the [live demo](https://cdn.parcellab.com/playground/selection-guide-ui/index.html), which is maintained in the [Selection Guide UI module](https://github.com/parcelLab/parcellab-embedded-ui-snippets/tree/main/packages/selection-guide-ui).
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.parcellab.com/docs/developers/size-recommender/size-recommender.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
