Skip to content

Workflow Date Field Triggers

Attribute Description Details
account_id ID of the account the trigger belongs to Cannot be set.
anniversary_years Repeat on that interval of anniversaries, such as 10 for every 10th year Optional. Positive integer. Empty keeps the once or annual behavior.
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. Ignored when anniversary_years is set.
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.

anniversary_years reminds only on those anniversaries. 10 fires on the 10th, 20th, and 30th anniversary, and offset still applies (for example 14 days before the 10th anniversary). When it is set, that interval wins and ignore_year is ignored, including ignore_year: false. Leave it empty so existing reminders keep firing once (ignore_year: false) or every year (ignore_year: true).

Example request:

{
"data": {
"type": "workflow_date_field_trigger",
"attributes": {
"anniversary_years": null,
"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",
"anniversary_years": null,
"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",
"anniversary_years": null,
"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