Skip to content

Lifecycle hooks

Lifecycle data is available via the param function. The mock function can be used to test the script by populating a test avlue.

Example

mock("dispatchId", "a4976adf-997e-4f27-b8a8-080a4c55550b");
local dispatchId = param("dispatchId")


-- the dispatchId represents the dispatch that triggered the lifecycle

General attributes

  • userId: user id
  • dispatchId: relevant dispatch id
  • trackerId: tracker id
  • labelId
  • groupId
  • disposition: create
  • programId
  • body: JSON body
  • payload: JSON body

Events

Event Paramters
User lifecycle userId
Web hook body
Program event userId, programId, disposition
Label event userId, labelId, disposition
Group event userId, groupId, disposition
Dispatch userId, dispatchId, trackerId
Payment userId, disposition, payload
Inbox userId, from, to, payload, entity, rule, step