Ir al contenido

tys.recommendation()

Esta página aún no está disponible en tu idioma.

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>;
productstringObligatorio

Your product ID or SKU, as synced to TryYourSize.

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

productstringObligatorio
statusRecommendationStatusObligatorio

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 | nullObligatorio

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

studioSizestring | nullObligatorio

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

wearableSizesstring[]Opcional

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
}

¿Te ha resultado útil esta página?