Zum Inhalt springen

Workflow Date Field Triggers

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

Attribute Description Details
account_id ID of the account the trigger belongs to Cannot be set.
field_id ID of the Field whose value determines the trigger date Required. Must reference a date field.
ignore_year When true, only month and day of the stored date are relevant Required. Boolean.
offset Number of days added to (positive) or subtracted from (negative) the date Required. Integer. Example: -1 is one day before, 1 is one day after.
offset_unit Unit for the offset Required. Currently only day is supported.

Example request:

{
"data": {
"type": "workflow_date_field_trigger",
"attributes": {
"field_id": "6d3c5c2a-b4e9-41d0-a4c8-3327f9012abc",
"ignore_year": true,
"offset": 1,
"offset_unit": "day"
}
}
}

Example response:

{
"data": {
"id": "ad21caa3-c798-4be2-8af4-019fec9b21be",
"type": "workflow_date_field_trigger",
"attributes": {
"account_id": "c2546da1-e5ef-4f31-a205-9539c45805d2",
"field_id": "6d3c5c2a-b4e9-41d0-a4c8-3327f9012abc",
"ignore_year": true,
"offset": 1,
"offset_unit": "day"
}
}
}

Creating a date field trigger also creates the associated workflow trigger linking it to the workflow.

POST /api/v1/workflows/:workflow_id/date_field_triggers

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

Example request:

{
"data": {
"type": "workflow_date_field_trigger",
"attributes": {
"offset": 7
}
}
}

Example response:

{
"data": {
"id": "ad21caa3-c798-4be2-8af4-019fec9b21be",
"type": "workflow_date_field_trigger",
"attributes": {
"account_id": "c2546da1-e5ef-4f31-a205-9539c45805d2",
"field_id": "6d3c5c2a-b4e9-41d0-a4c8-3327f9012abc",
"ignore_year": true,
"offset": 7,
"offset_unit": "day"
}
}
}

This endpoint updates a date field trigger in a workflow.

PUT /api/v1/workflows/:workflow_id/date_field_triggers/:date_field_trigger_id

Parameter Description
workflow_id The ID of the workflow that the trigger belongs to
date_field_trigger_id The ID of the date field trigger to update