Storeware Docs

Automation actions

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

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

verifyActionRequest

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

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.

NameTypeDescription
storeIdstring
automationIdstring
runIdstring
step{ id: string; index: number }Which step of the automation this is: its id, and where it sits.
actionstringThe action's key, as your manifest declares it.
fieldsRecord<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> } | nullThe 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.

const IDEMPOTENCY_HEADER: 'idempotency-key'

On this page