Skip to content

Workflow Event Triggers

List of valid attributes:

Attribute Description Specifics
account_id ID of an account a trigger belongs to Cannot be set
created_at Timestamp of creation Cannot be set
event The action that triggers the workflow Required. See valid combinations below
item_type The type of entity that the event applies to Required. See valid combinations below

Valid event triggers:

item_type Allowed event values
absence create, update, discard
account_document upload
agent_message_feedback_details create
boarding_task completed
contract_signature provide, requested
datev_document_sync create, update
punch_event create, discard
product_update create
time_tracking create, update, discard
user create, update
user_document upload
user_field_value create, update

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.

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

Parameter Description
workflow_id The ID of the workflow that the trigger will be added to

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).

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

Parameter Description
workflow_id The ID of the workflow that the trigger belongs to
event_trigger_id The ID of the event trigger to update