Let’s create a simple Trigger to demonstrate how it can be used. I’m going to create a trigger that fills in the E-mail Address on a matter (if it is empty) with the client’s e-mail address. First, we’ll get to the Workflow Manager by hovering over the Settings Cog and selecting Manage Workflows. From here I’ll click on Triggers and select New. I’ll give it the name “Copy Client E-mail to Matter”, a basic description, select the Matter item type and set the trigger to item is modified and hit Save.
This created a basic trigger with a Start and End node as well as an automatic action connecting them. Now, I don’t want this trigger to happen every single time the matter is modified, just if the Matter E-mail Address is empty. So, I’ll need to head back over to Centerbase and create a basic Matter query. I’ll setup the query by saying the E-mail field is empty and the Client.E-mail field is not empty and save it as WF – E-mail is Empty. I like to preface queries that are used by the Workflow with WF so people know not to change them or delete them because they know they are part of the workflow.
Now, I’ll head back to the trigger, click the S, and set the query on the automatic action by clicking the cog icon and selecting Edit.
I’ll set the Query to WF – E-mail is Empty and hit Save.
Ok. At this point I have a trigger setup to go off when any matter is modified and the e-mail address is empty, but it’s not really doing anything. Now I need to add a command to it. I’ll click the cog icon again and add an Update command. By default, it is already set to update the Matter, so I don’t need to change that. I’ll choose E-mail as the Field to Set. For the Value Type I’ll choose Matter.Client so it will pull values from the matter’s client and for the Value I’ll choose E-mail.
Now I can test out the trigger by creating a new Matter. If I leave the E-mail field blank and set the client, you’ll see after saving it will copy the client’s e-mail address over. If I change the e-mail address, my changes will not be overwritten because the trigger only fires if the E-mail field is empty. If I then clear out the e-mail field, you’ll see it immediately triggers again and copies the e-mail address again. Similarly, you’ll see if I create a matter and fill in the e-mail address, this does not trigger.