---
title: "Interface UseActionResult<TParameters, TKind>"
url: "https://www.metabase.com/docs/latest/embedding/sdk/api/UseActionResult"
version: "65"
---

> For the complete documentation index, see [llms.txt](https://www.metabase.com/docs/llms.txt).

# Interface UseActionResult<TParameters, TKind>

**`Expand`**

## Type Parameters

| Type Parameter                                                                                                                             |
| :----------------------------------------------------------------------------------------------------------------------------------------- |
| `TParameters` _extends_ [`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)\<`string`, `unknown`\> |
| `TKind` _extends_ [`ActionKind`](https://www.metabase.com/docs/latest/embedding/sdk/api/ActionKind.md) \| `undefined`                                                                       |

## Properties

| Property                               | Type                                                                                                                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| :------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `error`             | [`ActionExecuteError`](https://www.metabase.com/docs/latest/embedding/sdk/api/ActionExecuteError.md) \| `null`                                                                                                                                                  | Last thrown error, normalized to the public `ActionExecuteError` shape, or `null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `execute`         | (`parameters`: `TParameters`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`ActionResultForKind`](https://www.metabase.com/docs/latest/embedding/sdk/api/ActionResultForKind.md)\<`TKind`\> \| `null`\> | Trigger the action with the given parameters. Returns the response body on success AND throws on failure — the same error is stored in `error` for render-time consumers. Resolves to the discriminated `result` shape (see `ActionResultForKind<TKind>`); when `TKind` is omitted it resolves to `AnyActionResult`, narrowable via `"<key>" in r`. Resolves to `null` (without making a request) when `actionId` is `null` or the SDK is not yet initialized — guard the host-side caller with `if (!actionId) return;` if these cases are reachable. |
| `isExecuting` | `boolean`                                                                                                                                                                                                      | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `reset`             | () => `void`                                                                                                                                                                                                   | Clear `result` and `error`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `result`           | [`ActionResultForKind`](https://www.metabase.com/docs/latest/embedding/sdk/api/ActionResultForKind.md)\<`TKind`\> \| `null`                                                                                                                                     | Last response, or `null` before first call and after `reset()`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
