Recommendation
The shopper’s recommended size for one product, in the store’s own size labels.
Properties
Section titled “Properties”productStringRequiredstatusStatusRequiredsizeString?RequiredThe recommended size in the store's label (its size map), or nil.
studioSizeString?RequiredThe same size as entered in TryYourSize Studio, or nil.
wearableSizes[String]?RequiredSizes that can be worn on this body, in the store's labels (when simulated).
Example
Section titled “Example”let rec = try await tys.recommendation(for: "SKU-123")if rec.status == .ready, let size = rec.size { selectedSize = size }lifecycleScope.launch { val rec = tys.recommendation("SKU-123") if (rec.status == Recommendation.Status.READY) selected = rec.size}const rec = await getRecommendation("SKU-123");if (rec.status === "ready") setSize(rec.size);final rec = await tys.recommendation('SKU-123');if (rec.status == RecommendationStatus.ready) setState(() => size = rec.size);status: .ready (size is set), .computing, .noSize ("none" on the web: no size can be worn), .signedOut, .unavailable.
Was this page helpful?
Thank you. We read every answer.