Zum Inhalt springen

Workflow Event Triggers

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

List of valid attributes:

AttributeDescriptionSpecifics
account_idID of an account a trigger belongs toCannot be set
created_atTimestamp of creationCannot be set
eventThe action that triggers the workflowRequired. See valid combinations below
item_typeThe type of entity that the event applies toRequired. See valid combinations below

Valid event triggers:

item_typeAllowed event values
absencecreate, update, discard
boarding_taskcompleted
contract_signatureprovide
datev_document_synccreate, update
punch_eventcreate, discard
time_trackingcreate, update, discard
usercreate
user_documentupload
user_field_valuecreate, update

Create

Example request:

{
"data": {
"type": "workflow_event_trigger",
"attributes": {
"event": "create",
"item_type": "user"
}
}
}

Example response:

{
"data": {
"id": "85579c3b-22ea-43b8-ab79-d60d05680be5",
"type": "workflow_event_trigger",
"attributes": {
"account_id": "45e9a68c-35ae-4e73-8f9f-8baa6d3c6f7a",
"event": "create",
"item_type": "user"
}
}
}

This endpoint adds a new event trigger to a workflow.

HTTP Request

POST /api/v1/workflows/:workflow_id/event_triggers

URL Parameters

ParameterDescription
workflow_idThe ID of the workflow that the trigger will be added to

Update

Example request:

{
"data": {
"type": "workflow_event_trigger",
"attributes": {
"account_id": "45e9a68c-35ae-4e73-8f9f-8baa6d3c6f7a",
"event": "upload",
"item_type": "user_document"
}
}
}

Example response:

{
"data": {
"id": "85579c3b-22ea-43b8-ab79-d60d05680be5",
"type": "workflow_event_trigger",
"attributes": {
"account_id": "45e9a68c-35ae-4e73-8f9f-8baa6d3c6f7a",
"event": "upload",
"item_type": "user_document"
}
}
}

This endpoint updates an event trigger for a workflow (only if there are no actions connected to the workflow).

HTTP Request

PUT /api/v1/workflows/:workflow_id/event_triggers/:event_trigger_id

URL Parameters

ParameterDescription
workflow_idThe ID of the workflow that the trigger belongs to
event_trigger_idThe ID of the event trigger to update