Skip to content

tys.recommendation()

Method@tryyoursize/sdk

The shopper’s recommended size for a product, in your size labels, without mounting anything (a hidden frame on our origin answers). Sizes only.

A visitor in the A/B holdout always gets unavailable, so you show them no size either. The call never starts a simulation.

recommendation(product: string): Promise<Recommendation>;
productstringRequired

Your product ID or SKU, as synced to TryYourSize.

Promise<Recommendation>: The shopper’s recommended size for the product.

productstringRequired
statusRecommendationStatusRequired

ready (size is set), computing (a try-on the shopper started is still running), none (no size of this garment can be worn on this body), signed_out (no TryYourSize session on your site) or unavailable (no size for this product yet).

sizestring | nullRequired

The recommended size in the store's own label (its size map), or null.

studioSizestring | nullRequired

The same size as entered in TryYourSize Studio, or null.

wearableSizesstring[]Optional

Sizes that can be worn on this body, in the store's labels (when simulated).

const rec = await tys.recommendation("SKU-123");
if (rec.status === "ready") {
sizePicker.value = rec.size; // "M", in your own labels
}

Was this page helpful?