Skip to content

Triggers

Workflows can be triggered directly from a script or dispatch

Triggers

Set up the workflow to run based on a tracker being created or some other lifecycle.

Script trigger

When launched from a script you can provide summary, summaryTitle and icon to popupate the view. Additionaly you can provide other parameters that are used in the template.

serviceId = userId .. "-welcome"
workflow = '8bb7b63e-83d1-488a-b472-af680c9a1c70'
data = {
    summaryTitle="Summary title",
    summary="Summary string",
    icon="fad fa-clipboard-list",
    param1="some tracker handle"

}

core.InvokeInbox({
    recipient = userId,         -- seed in the workflow
    id = workflow,              -- workflow id
    data = data,                -- data payload
    serviceId = serviceId       -- optional id to prevent duplicate instances
})