Skip to content

Schedule Action Document Overview

Term Description
System Action A system action is a document that is set to run an action once only at a specified future time.
System Schedule A system schedule is a document that sets an action to occur repeatedly on the Formbird server

System Action

A system action is a document that is set to run an action once only at a specified future time.

A system action has associated with it the following properties needed to effect a timed action:

Property Description
.systemHeader.systemType Set value "systemaction"
.document A reference to a document on which the action is to occur.
This by custom contains an entire document structure, but need only contain the documentId of the document.
.dueDate Date/time at which the action is to occur.
.ruleSetId Document ID of the ruleset to run.
.userId ID of the user account under whose credentials the action runs.
.actionedDate The date/time the system action was run. This is set by the server.
Once this is set, the system action is considered done, and will not run again.

Typically a system action is generated through use of the ruleset function scheduleNewSystemAction.

However, it is also possible to have a template that generates a system action as for any document. The template needs to conform to the following:

Property Description
.systemTypeOverride Set value "systemaction"
.document At present, the system action needs to save a structure called .document, which must at least carry the property documentId
.dueDate A date field to receive the date/time at which the action is to occur.
.ruleSetId Document ID of the ruleset to run.
This can be generated by having a .ruleSetRel related document field, with a fieldDefault set to copy the Id to .ruleSetId
.actionedDate The date/time the system action was run. This is set by the server.
Once this is set, the system action is considered done, and will not run again