# element.getRecommendation()

> The shopper's recommended size for this product once known (see the recommendation event).

Source: https://docs.tryyoursize.com/reference/web/element-get-recommendation/

*Method* · `@tryyoursize/sdk`

The shopper's recommended size for this product once known (see the `recommendation` event).

```ts
getRecommendation(): Promise<Recommendation>;
```

## Returns

`Promise<Recommendation>`: Resolves with the first recommendation once known (see `tys.recommendation()` for the fields).

## Example

**JavaScript**

```js
const r = await guide.getRecommendation();
if (r.status === "ready") preselect(r.size);
```

**React**

```tsx
const ref = useRef<ElementHandle>(null);
const r = await ref.current?.getRecommendation();
```
