- Actions are steps your app performs. A merchant adds “Send an SMS (Your App)” to a workflow, maps values into its inputs, and when a run reaches the step Salesive sends a signed request to your app. What you answer is available to the steps after it.
- Triggers are events your app reports. A merchant starts a workflow from “Loyalty tier changed (Your App)”, and your server fires it with one API call.
Declaring them
Open your app in Apps > Developer, then fill in Workflow steps with JSON:- Up to 20 actions and 20 triggers. An
idis lower case letters, numbers,_or-, starts with a letter, at most 48 characters, and is unique in its list.labelis required (80 characters),descriptionis optional (300). pathis a path on the host of your webhook URL for the install’s environment, for example/salesive/workflow/send-sms. No host, query string or...- Schemas are a small part of JSON Schema: an object with flat
properties(at most 30) of typestring,number,integerorboolean. Each may havetitle,description,enum,maxLength(strings),minimumandmaximum(numbers), andrequiredlists the properties that must be set. Nested objects, arrays and$refare not supported. - Declaring actions needs a webhook URL, because that is where actions are sent and its secret is what signs them.
Receiving an action
- Verify the signature exactly as for webhooks: base64 HMAC-SHA256 of the raw body with your webhook signing secret. A development install uses your development webhook URL and its own secret; production uses the production pair.
- Inputs have already been checked against your
inputSchema, and numbers and booleans arrive as JSON numbers and booleans. runtells you where the call comes from. It carries ids and the trigger’s topic, never the trigger’s data or customer details: you receive what the merchant mapped into your inputs, nothing more.testis true for a test run from the builder.- Be idempotent. A call that times out or gets a 5xx is retried (3 attempts in all),
always with the same
idandX-Salesive-Event-Id. Each pass of a “For each” loop has its own id (iterationis set). Ignore an id you have already handled.
Answering
Answer within 10 seconds with a 2xx. To hand values to later steps, return JSON with anoutputs object:
{{nodes.<step>.outputs.messageId}}, or {{vars.<name>.messageId}}
when the merchant saves the result under a name.
Your address must be a public
https host on port 443 (or http on 80). Private and
local addresses are refused, so to test a development install from your machine use a
public tunnel (for example cloudflared or ngrok) as your development webhook URL.
Firing a trigger
Your app needs theWRITE_WORKFLOW_TRIGGERS scope. Then:
- Workflows of the store your token belongs to that start from this trigger run, with
your payload as
{{trigger.data.*}}. No other store is affected. - The body must match
payloadSchemaexactly: required fields present, declared types, no extra fields. A mismatch is a400listing the fields. Idempotency-Key(optional,[A-Za-z0-9._:-], up to 128 characters) makes a retry safe: the same key never starts the same workflow twice.- The answer is
202whether or not any workflow uses the trigger.

