Triggers are a very basic form of workflow. They simply fire off whenever a record is created or modified and a given set of criteria is true (usually a query). In the Workflows Manager, click Triggers at the top to see what triggers you currently have and to create new ones.
To create a new trigger, click the new button at the top. This will prompt you for a few pieces of information:
- Name: The name you want to give the trigger. This is what will show on the list of triggers.
- Description (optional): A detailed description of what the trigger is doing and why. Can also be used to add notes about the history of changes made to a trigger over time.
- Record Type: The type of record this trigger affects (such as matters, contacts, or bills).
- Trigger when: Sets when the trigger will fire. Values include:
- Record is created: Fires one time when records of this type are created. Keep in mind that this happens after the record is created, but before any of the data has been saved to it. Therefore, if you try to merge a document, send an e-mail, or set up a query with any of the fields from the record that was created, it won’t have any data.
- Record is modified: Fires every time a record of this type is modified.
- Activity is scheduled: Only shows up for Activity triggers. Fires if the people scheduled for an activity have changed.
- Import process has completed: Fires when an import has finished for records of the given type. This trigger is special in that it doesn’t have a reference to any of the records that were imported. It is simply used to perform more general operations like creating a new record or sending a generic e-mail.
Note: When a record is created, it first fires any created triggers and then fires any modified triggers after its initial fields have been set.
When you create a new trigger, it will create a basic workflow with a Start node, End node, and an Automatic action connecting them. Each trigger should simply have a start node, end node, and an automatic action connecting the two. You’ll want to limit any changes you make to the triggers structure as it will, at best, not do anything, or at worst stop the trigger from working.
Usually, you will want to add some further criteria on when the trigger will fire beyond just “every time a record is modified”. To do this, simply click the cog next to the automatic action and select Edit.
Here you can select a query for the trigger.
The trigger will only run if the record that was created/modified would return true for the given query. For instance, you might have a trigger that auto-fills the Open Date of a Matter, but only if it does not have a value. In this case, you could set up a query that has the condition Open Date is Empty. You can also adjust the Trigger Type on this screen if you need to.
Other Trigger Articles: