# Automation actions

> Run a step a merchant added to one of their automations.

Source: https://storeware.ai/docs/sdk/actions

```ts
import { ... } from '@storeware/plugin-sdk';
```

### verifyActionRequest

Verifies an automation action request and returns what it asked for.

```ts
function verifyActionRequest(options: VerifyWebhookOptions): Promise<AutomationActionRequest>
```

### AutomationActionRequest

What Storeware posts to one of your `[[automations.actions]]`, when a merchant's automation reaches a step that asks your app to do it.

| Name | Type | Description |
| --- | --- | --- |
| `storeId` | `string` |  |
| `automationId` | `string` |  |
| `runId` | `string` |  |
| `step` | `{ id: string; index: number }` | Which step of the automation this is: its id, and where it sits. |
| `action` | `string` | The action's `key`, as your manifest declares it. |
| `fields` | `Record<string, string \| number \| boolean>` | What the merchant filled in for your declared fields. Text may have named a field of the event in braces, such as `\{order.number\}`, and arrives with it filled in. |
| `event` | `{ id: string; topic: string; fields: Record<string, unknown> } \| null` | The event that started the automation, or null for one run on a schedule or by hand. `fields` are named as a merchant's conditions name them (`order.total`, or `data.points` for an app's trigger), and are left empty for a platform event your app's scopes do not cover. |

### IDEMPOTENCY_HEADER

The header carrying `&lt;runId&gt;:&lt;step index&gt;`, the same on every retry.

```ts
const IDEMPOTENCY_HEADER: 'idempotency-key'
```
