<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [fetchAndSaveRecommendations](./x-components.fetchandsaverecommendations.md)

## fetchAndSaveRecommendations() function

Default implementation for [RecommendationsActions.fetchAndSaveRecommendations](./x-components.recommendationsactions.fetchandsaverecommendations.md) action.

**Signature:**

```typescript
fetchAndSaveRecommendations: (context: RecommendationsActionContext, request: RecommendationsRequest | null) => void | Promise<void>
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  context | [RecommendationsActionContext](./x-components.recommendationsactioncontext.md) |  |
|  request | RecommendationsRequest \| null |  |

**Returns:**

void \| Promise&lt;void&gt;

