ReturnShield AIDocumentationSizing Recommendation Widget

Sizing Recommendation Widget

Sizing is the single biggest driver of returns in apparel, footwear, and accessories — accounting for 30–60% of all returns in most fashion stores. ReturnShield AI's Sizing Recommendation Widget puts your return data to work at the moment it matters most: when a customer is choosing their size before checkout.

The widget does not guess based on generic size charts. It calculates recommendations from your store's actual return history — the same customers, the same products, the same sizing patterns you already have in your data.


What the Widget Shows

When a customer opens a product page with the sizing widget enabled, they see a recommendation drawn directly from your return data:

"85% of customers who ordered Size M kept it."

Or, when the data tells a different story:

"62% of customers in Size L returned it — Size XL may fit better based on your store's return patterns."

This is not a size chart. It is a real signal from real customers who bought this exact product and either kept it or returned it. No external size database, no generic fit algorithm, no manual data entry required.


How the AI Calculates Sizing Recommendations

Data Sources

ReturnShield AI analyzes:

  1. Return history by size — which sizes of this product were returned most frequently and why (sizing reason vs. other reasons)
  2. Keep rate by size — what percentage of customers in each size kept the product after receiving it
  3. Sizing return reason — ReturnShield distinguishes between returns for "Wrong size" or "Doesn't fit" vs. other reasons (defect, not as described, changed mind). Only sizing-related returns inform the widget.
  4. Customer segment context — At Risk and Serial Returner customers have their own sizing history that may differ from the average

Minimum Data Threshold

The widget only activates on a product/size combination when:

  • At least 20 orders have been placed for this product in the relevant size, AND
  • At least 60 days of order history exists for this product

Below this threshold, the widget is hidden for that size. Showing a recommendation based on 3 orders would be statistically meaningless and potentially misleading.

You can adjust these minimums in ReturnShield AI → Settings → Sizing Widget → Data thresholds.

Recommendation Logic

For each size of a product, the widget calculates:

| Signal | How it's used | |---|---| | Keep rate | Primary signal — "X% of customers who ordered this size kept it" | | Sizing return rate | Identifies when a size runs small or large based on "wrong size" returns | | Common return reason | If most returns cite "too small," the widget recommends sizing up | | Cross-size comparison | Compares keep rates across all sizes to identify the best-performing size |

The displayed message adapts based on what the data shows:

  • Keep rate above 80%: Positive reinforcement — "Most customers who ordered this size kept it"
  • Keep rate 60–80%: Neutral guidance — shows the keep rate without a strong recommendation
  • Keep rate below 60% with sizing returns: Active upsell — "Many customers found this size runs [small/large]. Consider [adjacent size]."

Embedding via Shopify Metafields

The sizing widget is injected into your product pages using Shopify metafields — no custom theme code, no Liquid template edits, and no developer required.

How Metafield Injection Works

ReturnShield AI automatically writes sizing data to a metafield on each product object:

  • Namespace: returnshield
  • Key: sizing_data
  • Type: JSON (structured sizing signals per size variant)

The widget script (loaded via your Shopify theme's App Block) reads this metafield and renders the recommendation in the correct position on the product page.

Adding the App Block

  1. In your Shopify admin, go to Online Store → Themes
  2. Click "Customize" on your active theme
  3. Navigate to a product page template
  4. Click "Add block" in the product information section
  5. Find "ReturnShield Sizing Widget" under the Apps section
  6. Drag it to the position below your size selector
  7. Save

The widget is now live on all product pages where ReturnShield has sufficient data. Products below the minimum data threshold show nothing — no empty space, no placeholder text.

Block Placement Guidance

The widget works best immediately below the size selector, before the "Add to Cart" button. This is the highest-impact position — the customer is actively choosing a size when they see the recommendation.

In most Shopify themes, the recommended block order in the product form section is:

  1. Product title
  2. Price
  3. Variant selector (size, color)
  4. ReturnShield Sizing Widget ← place here
  5. Quantity selector
  6. Add to Cart button

Return Rates by Size Visualization

The widget includes an expandable panel that shows the full return rate breakdown across all sizes for the current product. A customer who wants more context can click "See sizing data" to expand this view.

The expanded view shows:

| Size | Orders | Keep rate | Common return reason | |---|---|---|---| | XS | 34 | 91% | — | | S | 127 | 88% | — | | M | 289 | 85% | — | | L | 201 | 67% | Runs small | | XL | 156 | 79% | — | | XXL | 43 | 83% | — |

This transparency converts hesitant customers. Instead of abandoning the page because they are unsure about sizing, they can see quantified evidence that other customers had a positive experience.

You can enable or disable the expanded view independently of the main recommendation message in Settings → Sizing Widget → Show detailed breakdown.


Customizing Widget Appearance

The sizing widget is designed to blend with your theme's visual style. Customization is available in the App Block settings in the theme editor and in ReturnShield AI → Settings → Sizing Widget → Appearance.

App Block Settings (Theme Editor)

| Option | Description | |---|---| | Position | Above or below size selector | | Show detailed breakdown | Whether to show the expandable return rates table | | Minimum keep rate to show | Hide the widget if keep rate is above X% (reduces noise for products with very few returns) |

Appearance Settings (ReturnShield Admin)

| Option | Options | Default | |---|---|---| | Widget style | Inline, Card, Tooltip | Inline | | Icon | Checkmark, Ruler, Shield, None | Checkmark | | Primary color | Hex code or "inherit from theme" | Inherit | | Font size | Small (12px), Default (14px), Large (16px) | Default | | Positive message color | Hex code | #16a34a (green) | | Warning message color | Hex code | #d97706 (amber) | | Show sample count | Yes / No | Yes | | Language | Auto (follows Shopify storefront language) | Auto |

Inline Style

Renders as a single line of text below the size selector: "85% of customers who ordered Size M kept it (based on 289 orders)". Minimal footprint, highest conversion impact.

Card Style

Renders as a small card with a light background, icon, recommendation text, and optional "See full data" link. Slightly more prominent — works well for stores where returns are a known customer concern.

Tooltip Style

Adds a small "i" icon next to the size selector. Hovering or tapping the icon reveals the recommendation. Least intrusive option for stores that want the data available without disrupting the product page layout.


Language and Localization

When the storefront language is set via Shopify Markets or a language app, the sizing widget automatically renders in the customer's language.

Supported languages: English, Polish, German, French, Spanish, Portuguese, Japanese (matching the six Shopify storefront languages).

Custom translations for the widget strings are available in Settings → Sizing Widget → Translations — override any string for any language if the defaults do not match your brand voice.


A/B Testing Sizing Widget Impact on Returns

ReturnShield AI includes a built-in A/B test for the sizing widget that measures its impact on return rates and conversion.

Setting Up the A/B Test

  1. Navigate to ReturnShield AI → Sizing Widget → A/B Test
  2. Set the test split (default: 50/50 — half of product page visits show the widget, half do not)
  3. Set the test duration (recommended: 30 days minimum for statistical significance)
  4. Click "Start Test"

The A/B split is random and cookied — a customer who sees the widget on their first visit will continue to see it on subsequent visits (ensuring consistent experience and accurate attribution).

Metrics Tracked

| Metric | What it measures | |---|---| | Return rate | Returns as a percentage of orders — the primary metric | | Sizing return rate | Specifically sizing-related returns — the direct impact of the widget | | Conversion rate | Add-to-cart and checkout completion rate — ensures the widget doesn't reduce purchases | | Average order value | Whether size upsells impact order value | | Return rate by size | Which specific sizes show the most improvement |

Reading the Results

The A/B test report shows these metrics side by side for the control group (no widget) and the test group (widget shown):

| Metric | Control | Widget | Delta | |---|---|---|---| | Overall return rate | 18.4% | 13.1% | -5.3pp | | Sizing return rate | 9.2% | 4.8% | -4.4pp | | Conversion rate | 3.8% | 3.6% | -0.2pp |

In this example, the widget reduced sizing returns by nearly half with a negligible conversion rate impact. The ROI calculation in the report estimates the reduction in return processing costs based on your configured cost per return.

Statistical Confidence

The report shows statistical confidence for each metric. Results below 95% confidence are marked with a warning — do not make decisions based on low-confidence results. Extend the test period if confidence is insufficient after the initial duration.

Ending the Test

Once the test reaches statistical significance and the minimum duration:

  1. Review the full report
  2. If the widget shows positive impact: click "Enable for all visitors"
  3. If the widget shows negative conversion impact that outweighs return savings: click "Keep disabled" and review appearance settings

The Conversion Angle

The sizing widget is not only a return reduction tool — it is a conversion tool. Sizing uncertainty is a major reason customers abandon product pages without purchasing:

  • A customer who is between sizes and unsure often does not buy at all
  • "85% of customers kept Size M" eliminates the hesitation — the customer has social proof from real purchasers
  • Customers who buy with confidence return less — they chose the right size based on evidence

Stores that deploy the sizing widget typically see:

  • 20–40% reduction in sizing-related returns (measured by the A/B test)
  • 3–8% increase in conversion rate on products where the widget shows strong positive signals

The widget pays for itself in return cost reduction and pays a second time in incremental conversion on fence-sitters.


Technical Notes

Metafield Update Frequency

ReturnShield AI recalculates sizing data nightly. Metafields are updated during the nightly analysis run (between 02:00–05:00 UTC). New return data flows into widget recommendations the following day.

Products with No Data

Products below the minimum data threshold have their metafield set to null. The App Block detects a null value and renders nothing — no empty space, no loading spinner. The product page looks exactly as it did before the widget was added.

Theme Compatibility

The widget is compatible with all Shopify Online Store 2.0 themes (OS2.0) and most legacy themes. For legacy themes (pre-OS2.0), the widget is added via a script tag rather than an App Block — contact support for the manual installation instructions.


Next Steps

Edit this page on GitHub
Was this page helpful?