Last modified by MammaMia - 2 years ago
117 Views
2 min read

How triggers work?

Triggers is a workflow component and can be accessed through plugin settings of the supporting plugins. It is used to automate execution of your business rules every time a record is created or updated. Major email clients include filters or rules functionality similar to triggers.

A trigger is composed of conditions, operators and actions. You combine these to create 'if' and 'then' statements.

There are two types of conditions:

  • all conditions
  • any conditions

The all conditions means ALL of your conditions must be met for a trigger to run. If one of the conditions are not met, the trigger does not run. The any conditions means only one of your ANY conditions needs to be true for the trigger to run.

Operators are used to compare or validate a single or set of values in conditions. For example, if the department is Marketing or if the campaign cost is greater than $1000. Actions are instructions or what you want to happen when the conditions you set are met or true. You can add multiple conditions and actions to a single trigger. You can also create multiple triggers which run in the order you set.

Avoiding trigger conflicts

The order that triggers run is very important. Every time a record is created or updated, all of your triggers run in an order against that record. The trigger at the top of your list runs first. You can set the run order of your triggers using drag and drop.

You should watch out for the triggers that undo or modify an action that was performed in another trigger. To avoid conflicting trigger runs, use the funnel method. Start with a broad trigger at the top of your list and then create more limited in scope triggers. Let's assume that you have two triggers.

  1. Assign all support tickets created through email channel to the email-handlers group
  2. Assign all support tickets created through email channel with critical priority to the critical-handlers group

The goal is to assign tickets received by email to the email-handlers group unless they are tagged as critical, in which case you want those tickets assigned to the critical-handlers group. If you run #2 trigger before #1 then no tickets will be assigned to the critical-handlers group because #1 rule will assign all tickets back to the email-handlers group.

Using the funnel method, #1 has a larger scope (all tickets through email) and #2 has a relatively narrower scope. That's why #2 trigger must run after #1. You can resolve trigger conflicts by reordering your triggers. If changing the trigger run order does not work for your use case, you'll need to modify or deactivate your triggers instead.

Related Embeds
Related Articles
Previous Next
Was this information helpful?