⚑Workflows

Workflows allow you to trigger automation within Stampede by sending an incoming event. This is useful for pushing external event data β€” such as a customer action in a third-party system β€” directly into a Stampede workflow, so it can drive marketing, loyalty, or operational automations.

Send an incoming event

POST /v1/workflows/incoming-event

Request Body

Name
Type
Description

serials

String[]

(Optional) One or more venue serial identifiers (max 12 characters each) to associate with the event

parameters

Object

(Optional) Arbitrary key-value payload with scalar values that will be passed into the workflow. Use the source key to direct the event to a specific workflow (e.g. {"source": "some_service"})

organisation_registration_id*

UUID

The organisation registration ID (UUID format) that the event belongs to

{
  message: string
  event: object
}

Examples

curl --location 'https://global.stampede.ai/v1/workflows/incoming-event' \
--header 'Content-Type: application/json' \
--header 'authorization: Bearer YOUR_ACCESS_TOKEN' \
--data '{
    "serials": ["XXXXXXXXXXXX"],
    "organisation_registration_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "parameters": {
        "source": "some_service",
        "key": "value"
    }
}'

Store a workflow run

POST /v1/workflows/{workflowId}/workflow-runs

Store a workflow run to push a user through a specific workflow, regardless of whether they match the trigger conditions on that workflow. This is useful for forcing workflow execution for specific users or scenarios without needing to satisfy the workflow's standard trigger requirements.

Path Parameters

Name
Type
Description

workflowId

String

The ID of the workflow

Request Body

Name
Type
Description

org_reg_id

UUID

The organisation registration ID (UUID format) for the workflow run

Response

Benefits over incoming-event

Using the Store Workflow Run endpoint provides several advantages over the standard incoming-event approach:

  • Guaranteed Execution: Bypasses workflow trigger conditions, ensuring the workflow always executes regardless of event matching logic. Useful for manual overrides or special scenarios.

  • Direct Workflow Targeting: Explicitly targets a specific workflow by ID, eliminating the need for event routing logic (e.g., using the source parameter to identify workflows).

  • Simplified Integration: Requires minimal request payload (just org_reg_id), making it easier to implement for straightforward workflow execution scenarios.

  • Operational Control: Ideal for internal operations, administrative actions, or system-triggered workflows where you need precise control over which workflow runs.

Examples

Last updated

Was this helpful?