Automations

Automations are attached to a Record Type and contain an ActionScript that is evaluated against a record. an Automation is triggered against a record in the following circumstances, depending on the settings on the Automation:

  1. When a new record is added (the Automation is run after the record has been added). Note that it does not matter how the record was added – through the user interface, via data load, API call or by an ActionScript. The Automation will only be triggered if the record matches the Filter Condition set on the Automation.
  2. When a record is edited (the Automation is run after the changes from the edit). Note that it does not matter how the record was added – through the user interface, via data load, API call or by an ActionScript. The Automation will only be triggered if the record matches the Filter Condition set on the Automation.
  3. When a custom event is triggered through an API call or using an ActionScript. If the event name is included in the event names defined on the Automation, then the Automation will be triggered if the record matches the Filter Condition set on the Automation. For further discussion and worked examples, see Automation using Automations and Events.
  4. Overnight, if the Automation’s isRunOvernight flag is set and the record matches the Filter Condition set on the Automation.

There is also a special case for overnight automations. If no record type is specified, the Automation is evaluated once against the whole account. In this case, the assumption is that the Automation’s ActionScript is designed to select the records it acts against, or updates account-wide configuration settings or similar.

Automations are often used to set values such as Status flags that may require more complex logic than can be sensibly included as a DefaultValueCalc in a Field.

Automations effectively provide the mechanism for a ‘calculate and store’ approach to a Field, compared with a straightforward calculated field. Calculated fields are not stored, so their values cannot be used in Filter conditions, and they can affect performance if large numbers of records are being read e.g. to generate a report. Instead, consider writing an Automation and using it to save the value to a Field. In this case, you would normally expect to set the Field flag isUserEditable to false, which will ensure that the field value cannot be edited manually in the user interface.

an Automation is created by adding an Automation record, which contains the following fields:

Read/Write Fields

The following Fields can be Read and Written To. These Fields can be used to load data from Blueprints etc.
They can also be included referred to in Calculations or in Templates.

Field *requiredTitleTypeDetails
Name *NametextMaximum length – 60 characters
RecordTypeNameRecord Typerecordtype The Record Type of records on which this Automation will act.
DescriptionDescriptiontext 
Script *Action Scriptactionscript This script is applied to the record when it is triggered, or to each record in turn for overnight scripts, always provided that the record matches the Filter condition.
FilterFilterfilter Optional Filter expression – leave blank to have the Automation evaluated against any record (which also means against every record in the case of an Overnight Automation). This Automation will be applied only to records that match the Filter condition. This includes newly added records – the Filter will be applied against the record after it is initially created but before the Automation is applied.
EventsTriggering Eventstext An optional comma-separated list of event names that trigger this Automation. As standard, these include add and edit, triggered when a record is added or edited; but events can be given custom-names and triggered using the triggerEvent() function or by API call to provide any level of script behaviour as part of integration with other applications.
Maximum length – 30 characters
isRunOvernightRun Overnight?logical Apply this Automation to all records that match the Filter, overnight. Typically you would use this for Automations that consider states that change over time e.g. changing a status field to Overdue, or generating a new record after the passage of time for recurring events such as a review process.
isRunOncePerRecordRun Once Only per Record?logical If set, then this Automation will only ever run a maximum of once on each record. In any case, if the Automation has already been run against a particular record, then it will not be run again for that record.
ViewGroupView GroupGroup 
EditGroupEdit GroupGroup 

Read-Only Fields

The following Fields can be Read only. They can be referred to in Calculations or in Templates.

FieldTitleType
CreatedCreateddatetime
CreatedByCreated ByPerson
UpdatedUpdateddatetime
UpdatedByUpdated ByPerson

Get Started