DateAutomation v1.2
Powerful automation rules which are triggered before or after a given date.
Powerful automation rules which are triggered before or after a given date.
A dateAutomation rule describes the event in which a Marketing Automation action is triggered by date:
Actions may be queued when triggered by the event. Queued actions will complete when a rule is paused
, but are aborted when a rule is deleted.
Attribute | Type | Filter | Sort | Description |
---|---|---|---|---|
id | int | Yes | Yes | Unique ID of the Marketing Automation rule. |
actiononweekend | bool | Yes | No | Whether the rule will trigger at weekends. |
actiontarget | string | No | No | Datum used by actiontype, e.g. list ID if actiontype is "addtolist". |
actionhour | string/null | No | Yes | A specific time for the action to occur, format "HH:00:00". |
actiontimediff | int | No | Yes | Offset, in seconds, between a matching event and an consequent action. Can be negative. |
actiontype | enum | No | No | The kind of action to be taken upon a successful match: "addtolist", "email_autoresponder", "notify", "sms_autoresponder". |
name | string | Yes | Yes | Rule name. |
paused | bool | Yes | No | Whether the rule is paused. |
summary | string/null | No | No | English-language description of the rule. |
user_id | int | Yes | No | Unique ID of the user who created this rule. |
cdate | decimal | No | Yes | Creation timestamp. |
mdate | decimal | No | No | Last modification timestamp. |
Attribute | Type | Presence | Description |
---|---|---|---|
id | int | Optional | Unique ID of the Marketing Automation rule. |
actiononweekend | bool | Optional | Whether the rule will trigger at weekends. |
name | string | Optional | Rule name. |
paused | bool | Optional | Whether the rule is paused. |
user_id | int | Optional | Unique ID of the user who created this rule. |
Attribute | Type | Presence | Description |
---|---|---|---|
actiononweekend | bool | Optional* | Whether the rule will trigger at weekends. |
actiontarget | string | Required | Datum used by actiontype, e.g. list ID if actiontype is "addtolist". |
actionhour | string/null | Optional** | A specific time for the action to occur, format "HH:00:00". |
actiontimediff | int | Optional** | Offset, in seconds, between a matching event and an consequent action. Can be negative. |
actiontype | enum | Required | The kind of action to be taken upon a successful match: "addtolist", "email_autoresponder", "notify", "sms_autoresponder". |
name | string | Required | Rule name. |
paused | bool | Optional | Whether the rule is paused. |
summary | string/null | Required | English-language description of the rule. |
* Required if actionhour
or actiontimediff
are set and actiontimediff
is not 0. If these are not set, actiononweekend
will automatically default to true and cannot be explicitly set to false.
** If actiontimediff
is set to 0 and actionhour
is not set, when the rule is triggered, the action will be taken as soon as possible (only for certain actiontypes
.
If actiontype
is set to "addtolist", actiontimediff
must be non-zero. The actiontimediff
can be negative. If actionhour
is set, actiontimediff
must be 0 or a multiple of 1440 (or -1440).
The actionhour
should be set to a local time for the company's timezone.
actiononweekend
can only be set to "false" if one or both of actionhour
or actiontimediff
are set. If neither are set, actiononweekend
will implicitly be set to "true". In this scenario, it will not be permitted to set actiononweekend
to "false" as the rule will be configured to run 'as soon as possible'.
Users will only be permitted to set the message_id
or actiontarget
(if actiontype
is "email_autoresponder" or "sms_autoresponder") to a message they have access to.
If an email message is associated to a dateAutomation rule via a POST/PUT as an actiontarget
for an "email_autoresponder" actiontype
, that message will become non-editable.
Attribute | Type | Presence | Description |
---|---|---|---|
id | int | Required | Unique ID of the Marketing Automation rule. |
actiononweekend | bool | Optional* | Whether the rule will trigger at weekends. |
actiontarget | string | Optional*** | Datum used by actiontype, e.g. list ID if actiontype is "addtolist". |
actionhour | string/null | Optional** | A specific time for the action to occur, format "HH:00:00". |
actiontimediff | int | Optional** | Offset, in seconds, between a matching event and an consequent action. Can be negative. |
actiontype | enum | Optional*** | The kind of action to be taken upon a successful match: "addtolist", "email_autoresponder", "notify", "sms_autoresponder". |
name | string | Optional | Rule name. |
paused | bool | Optional | Whether the rule is paused. |
summary | string/null | Optional | English-language description of the rule. |
* Required if actionhour
or actiontimediff
are set and actiontimediff
is not 0. If these are not set, actiononweekend
will automatically default to true and cannot be explicitly set to false.
** If actiontimediff
is set to 0 and actionhour
is not set, when the rule is triggered, the action will be taken as soon as possible (only for certain actiontypes
).
*** Not all actiontypes
and corresponding actiontargets
can be modified once set.
If the actiontype
is "email_autoresponder" or "sms_autoresponder", actiontype
and actiontarget
cannot be modified via a PUT request.
If enabled for the company, folder restrictions will apply to this endpoint. Users will only be able to create list-related rules for lists in categories that they have access to.
If an email message is associated to a dateAutomation rule via a POST/PUT as an actiontarget
for an "email_autoresponder" actiontype
, that message will become non-editable.
Attribute | Type | Presence | Description |
---|---|---|---|
id | int | Required | Unique ID of the Marketing Automation rule. |
Code | Subcode | Message | Description |
---|---|---|---|
409 | 12 | Automation Rule $id cannot be unpaused: Dependent $resource resource $resource_id no longer exists | If an automation rule dependent resource (usually actiontarget, but for smsAutomation it could be list_id, email_list_id or message_id) is deleted, and the associated rule is paused, this error will be given if the user then tries to unpause the rule without changing the dependent resource. |
Please see error handling for more information on error codes.
{ "id": 12345, "actiononweekend": true, "actiontarget": 123455, "actionhour": "01:00:00", "actiontimediff": -1440, "actiontype": "email_autoresponder", "name": "Birthday Trigger", "paused": false, "summary": "At approximately 01:00, 1 day(s) before it's the subscriber's birthday, send the subscriber the email campaign 'Happy Birthday'", "user_id": 23456, "cdate": 1234966741, "mdate": 1234966741 }