# dispatch (/docs/api/actions/functions/dispatch)



```ts
function dispatch<Actions>(
   decision, 
   actions, 
   recipe, 
   options?
): Promise<
  | Dispatched<ActionId<Actions>>
| null>;
```

Sends a routed Decision to the Action it selected: builds with that Action's Adapter, then
performs once. No retries, no timeout of its own: both belong to the caller, as with
`perform`. A send that fails throws `perform`'s `ActionFailedError`, `retryable` intact.

## Type Parameters [#type-parameters]

| Type Parameter                                                              |
| --------------------------------------------------------------------------- |
| `Actions` *extends* [`ActionSet`](/docs/api/actions/type-aliases/ActionSet) |

## Parameters [#parameters]

| Parameter  | Type                                                            | Description                    |
| ---------- | --------------------------------------------------------------- | ------------------------------ |
| `decision` | `Decision`                                                      | -                              |
| `actions`  | `Actions`                                                       | The result of `defineActions`. |
| `recipe`   | `Recipe`                                                        | -                              |
| `options`  | [`PerformOptions`](/docs/api/actions/interfaces/PerformOptions) | -                              |

## Returns [#returns]

`Promise`\<
\| [`Dispatched`](/docs/api/actions/interfaces/Dispatched)\<[`ActionId`](/docs/api/actions/type-aliases/ActionId)\<`Actions`>>
\| `null`>

`null`, sending nothing, when the Decision went to Review or selected no Action.

## Throws [#throws]

ActionBuildError when the Decision names an Action id not in `actions`.
